diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 18:22:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 18:22:46 -0800 |
commit | b64c5fda3868cb29d5dae0909561aa7d93fb7330 (patch) | |
tree | 2ac4be822f32fe5a8e8f33138be81b221ff52384 /drivers | |
parent | f57d54bab696133fae569c5f01352249c36fc74f (diff) | |
parent | 9c3f9e281697d02889c3b08922f3b30be75f56c2 (diff) | |
download | linux-b64c5fda3868cb29d5dae0909561aa7d93fb7330.tar.bz2 |
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core timer changes from Ingo Molnar:
"It contains continued generic-NOHZ work by Frederic and smaller
cleanups."
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
time: Kill xtime_lock, replacing it with jiffies_lock
clocksource: arm_generic: use this_cpu_ptr per-cpu helper
clocksource: arm_generic: use integer math helpers
time/jiffies: Make clocksource_jiffies static
clocksource: clean up parse_pmtmr()
tick: Correct the comments for tick_sched_timer()
tick: Conditionally build nohz specific code in tick handler
tick: Consolidate tick handling for high and low res handlers
tick: Consolidate timekeeping handling code
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clocksource/acpi_pm.c | 17 | ||||
-rw-r--r-- | drivers/clocksource/arm_generic.c | 6 | ||||
-rw-r--r-- | drivers/clocksource/i8253.c | 2 |
3 files changed, 12 insertions, 13 deletions
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index 6b5cf02c35c8..5d1b9268bcaf 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c @@ -233,16 +233,15 @@ fs_initcall(init_acpi_pm_clocksource); */ static int __init parse_pmtmr(char *arg) { - unsigned long base; + unsigned int base; + int ret; - if (strict_strtoul(arg, 16, &base)) - return -EINVAL; -#ifdef CONFIG_X86_64 - if (base > UINT_MAX) - return -ERANGE; -#endif - printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04lx\n", - pmtmr_ioport, base); + ret = kstrtouint(arg, 16, &base); + if (ret) + return ret; + + pr_info("PMTMR IOPort override: 0x%04x -> 0x%04x\n", pmtmr_ioport, + base); pmtmr_ioport = base; return 1; diff --git a/drivers/clocksource/arm_generic.c b/drivers/clocksource/arm_generic.c index c4d9f9566c64..c210f4f1ecfd 100644 --- a/drivers/clocksource/arm_generic.c +++ b/drivers/clocksource/arm_generic.c @@ -127,7 +127,7 @@ static void __init arch_timer_calibrate(void) /* Cache the sched_clock multiplier to save a divide in the hot path. */ - sched_clock_mult = NSEC_PER_SEC / arch_timer_rate; + sched_clock_mult = DIV_ROUND_CLOSEST(NSEC_PER_SEC, arch_timer_rate); pr_info("Architected local timer running at %u.%02uMHz.\n", arch_timer_rate / 1000000, (arch_timer_rate / 10000) % 100); @@ -221,10 +221,10 @@ int __init arm_generic_timer_init(void) clocksource_register_hz(&clocksource_counter, arch_timer_rate); /* Calibrate the delay loop directly */ - lpj_fine = arch_timer_rate / HZ; + lpj_fine = DIV_ROUND_CLOSEST(arch_timer_rate, HZ); /* Immediately configure the timer on the boot CPU */ - arch_timer_setup(per_cpu_ptr(&arch_timer_evt, smp_processor_id())); + arch_timer_setup(this_cpu_ptr(&arch_timer_evt)); register_cpu_notifier(&arch_timer_cpu_nb); diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c index e7cab2da910f..14ee3efcc404 100644 --- a/drivers/clocksource/i8253.c +++ b/drivers/clocksource/i8253.c @@ -35,7 +35,7 @@ static cycle_t i8253_read(struct clocksource *cs) raw_spin_lock_irqsave(&i8253_lock, flags); /* - * Although our caller may have the read side of xtime_lock, + * Although our caller may have the read side of jiffies_lock, * this is now a seqlock, and we are cheating in this routine * by having side effects on state that we cannot undo if * there is a collision on the seqlock and our caller has to |