x86: Convert remaining x86 clocksources to clocksource_register_hz/khz

This converts the remaining x86 clocksources to use
clocksource_register_hz/khz.

CC: jacob.jun.pan@intel.com
CC: Glauber Costa <glommer@redhat.com>
CC: Dimitri Sivanich <sivanich@sgi.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Jeremy Fitzhardinge <jeremy@xensource.com>
CC: Chris McDermott <lcm@us.ibm.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
This commit is contained in:
John Stultz
2010-04-26 19:03:05 -07:00
committed by John Stultz
parent 36d8593ec7
commit b01cc1b0ea
7 changed files with 8 additions and 40 deletions

View File

@@ -177,7 +177,6 @@ static struct clocksource clocksource_apbt = {
.rating = APBT_CLOCKSOURCE_RATING,
.read = apbt_read_clocksource,
.mask = APBT_MASK,
.shift = APBT_SHIFT,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
.resume = apbt_restart_clocksource,
};
@@ -595,14 +594,7 @@ static int apbt_clocksource_register(void)
if (t1 == apbt_read_clocksource(&clocksource_apbt))
panic("APBT counter not counting. APBT disabled\n");
/*
* initialize and register APBT clocksource
* convert that to ns/clock cycle
* mult = (ns/c) * 2^APBT_SHIFT
*/
clocksource_apbt.mult = div_sc(MSEC_PER_SEC,
(unsigned long) apbt_freq, APBT_SHIFT);
clocksource_register(&clocksource_apbt);
clocksource_register_khz(&clocksource_apbt, (u32)apbt_freq*1000);
return 0;
}