Skip to content

Commit d60c304

Browse files
John Stultzjohnstultz-work
authored andcommitted
ia64: convert to clocksource_register_hz/khz
This converts the ia64 clocksources to use clocksource_register_hz/khz CC: Tony Luck <tony.luck@intel.com> CC: Thomas Gleixner <tglx@linutronix.de> Tested-by: Tony Luck <tony.luck@intel.com> [clocksource_itc path] Signed-off-by: John Stultz <johnstul@us.ibm.com>
1 parent b01cc1b commit d60c304

4 files changed

Lines changed: 5 additions & 22 deletions

File tree

‎arch/ia64/kernel/cyclone.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ static struct clocksource clocksource_cyclone = {
3131
.rating = 300,
3232
.read = read_cyclone,
3333
.mask = (1LL << 40) - 1,
34-
.mult = 0, /*to be caluclated*/
35-
.shift = 16,
3634
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
3735
};
3836

@@ -118,9 +116,7 @@ int __init init_cyclone_clock(void)
118116
/* initialize last tick */
119117
cyclone_mc = cyclone_timer;
120118
clocksource_cyclone.fsys_mmio = cyclone_timer;
121-
clocksource_cyclone.mult = clocksource_hz2mult(CYCLONE_TIMER_FREQ,
122-
clocksource_cyclone.shift);
123-
clocksource_register(&clocksource_cyclone);
119+
clocksource_register_hz(&clocksource_cyclone, CYCLONE_TIMER_FREQ);
124120

125121
return 0;
126122
}

‎arch/ia64/kernel/time.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ static struct clocksource clocksource_itc = {
7373
.rating = 350,
7474
.read = itc_get_cycles,
7575
.mask = CLOCKSOURCE_MASK(64),
76-
.mult = 0, /*to be calculated*/
77-
.shift = 16,
7876
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
7977
#ifdef CONFIG_PARAVIRT
8078
.resume = paravirt_clocksource_resume,
@@ -374,11 +372,8 @@ ia64_init_itm (void)
374372
ia64_cpu_local_tick();
375373

376374
if (!itc_clocksource) {
377-
/* Sort out mult/shift values: */
378-
clocksource_itc.mult =
379-
clocksource_hz2mult(local_cpu_data->itc_freq,
380-
clocksource_itc.shift);
381-
clocksource_register(&clocksource_itc);
375+
clocksource_register_hz(&clocksource_itc,
376+
local_cpu_data->itc_freq);
382377
itc_clocksource = &clocksource_itc;
383378
}
384379
}

‎arch/ia64/sn/kernel/sn2/timer.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ static struct clocksource clocksource_sn2 = {
3333
.rating = 450,
3434
.read = read_sn2,
3535
.mask = (1LL << 55) - 1,
36-
.mult = 0,
37-
.shift = 10,
3836
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
3937
};
4038

@@ -57,9 +55,7 @@ ia64_sn_udelay (unsigned long usecs)
5755
void __init sn_timer_init(void)
5856
{
5957
clocksource_sn2.fsys_mmio = RTC_COUNTER_ADDR;
60-
clocksource_sn2.mult = clocksource_hz2mult(sn_rtc_cycles_per_second,
61-
clocksource_sn2.shift);
62-
clocksource_register(&clocksource_sn2);
58+
clocksource_register_hz(&clocksource_sn2, sn_rtc_cycles_per_second);
6359

6460
ia64_udelay = &ia64_sn_udelay;
6561
}

‎drivers/char/hpet.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ static struct clocksource clocksource_hpet = {
8484
.rating = 250,
8585
.read = read_hpet,
8686
.mask = CLOCKSOURCE_MASK(64),
87-
.mult = 0, /* to be calculated */
88-
.shift = 10,
8987
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
9088
};
9189
static struct clocksource *hpet_clocksource;
@@ -934,9 +932,7 @@ int hpet_alloc(struct hpet_data *hdp)
934932
if (!hpet_clocksource) {
935933
hpet_mctr = (void __iomem *)&hpetp->hp_hpet->hpet_mc;
936934
CLKSRC_FSYS_MMIO_SET(clocksource_hpet.fsys_mmio, hpet_mctr);
937-
clocksource_hpet.mult = clocksource_hz2mult(hpetp->hp_tick_freq,
938-
clocksource_hpet.shift);
939-
clocksource_register(&clocksource_hpet);
935+
clocksource_register_hz(&clocksource_hpet, hpetp->hp_tick_freq);
940936
hpetp->hp_clocksource = &clocksource_hpet;
941937
hpet_clocksource = &clocksource_hpet;
942938
}

0 commit comments

Comments
 (0)