diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-17 18:27:37 +0100 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-02-17 18:28:05 +0100 |
| commit | b7e56edba4b02f2079042c326a8cd72a44635817 (patch) | |
| tree | b5042002e9747cd8fb1278d61f86d8b92a74c018 /arch/m32r/kernel/time.c | |
| parent | 13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff) | |
| parent | b0483e78e5c4c9871fc5541875b3bc006846d46b (diff) | |
Merge branch 'linus' into x86/mm
x86/mm is on 32-rc4 and missing the spinlock namespace changes which
are needed for further commits into this topic.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/m32r/kernel/time.c')
| -rw-r--r-- | arch/m32r/kernel/time.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index e7fee0f198d..9cedcef1157 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c @@ -75,7 +75,7 @@ u32 arch_gettimeoffset(void) count = 0; count = (latch - count) * TICK_SIZE; - elapsed_time = (count + latch / 2) / latch; + elapsed_time = DIV_ROUND_CLOSEST(count, latch); /* NOTE: LATCH is equal to the "interval" value (= reload count). */ #else /* CONFIG_SMP */ @@ -93,7 +93,7 @@ u32 arch_gettimeoffset(void) p_count = count; count = (latch - count) * TICK_SIZE; - elapsed_time = (count + latch / 2) / latch; + elapsed_time = DIV_ROUND_CLOSEST(count, latch); /* NOTE: LATCH is equal to the "interval" value (= reload count). */ #endif /* CONFIG_SMP */ #elif defined(CONFIG_CHIP_M32310) @@ -211,7 +211,7 @@ void __init time_init(void) bus_clock = boot_cpu_data.bus_clock; divide = boot_cpu_data.timer_divide; - latch = (bus_clock/divide + HZ / 2) / HZ; + latch = DIV_ROUND_CLOSEST(bus_clock/divide, HZ); printk("Timer start : latch = %ld\n", latch); |
