remove spurious optimization in udelay_pit()
authorMichael Davidson <md@google.com>
Fri, 15 Apr 2016 20:30:44 +0000 (13:30 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 15 Apr 2016 20:36:51 +0000 (16:36 -0400)
commitc20f3b8bcb8c2cb9f66db6a5643118aa35da6fff
treebe36bdf71389b3ce5222a9a75c833b142a16a8e8
parent6c4f96784a5589017be22e4f95fd2a50d5a822e9
remove spurious optimization in udelay_pit()

gcc has been optimizing division by a constant into a multiply
and shift for at least 10 years now so there is no need to do
this by hand as a special case - especially in a function that
is going to delay for at least 1 microsecond anyway.

Also remove unnecessary casts - usec is a uint64_t so everything
else in the expression is going to get promoted appropriately.

Signed-off-by: Michael Davidson <md@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/time.c