Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] IP27: Fix clockevent setup

Fix breakage introduced by converting hub_rt to clockevent.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Thomas Bogendoerfer and committed by
Ralf Baechle
b32bb803 2bf8ec2d

+17 -15
+4 -1
arch/mips/sgi-ip27/ip27-smp.c
··· 176 176 static void __cpuinit ip27_init_secondary(void) 177 177 { 178 178 per_cpu_init(); 179 - local_irq_enable(); 180 179 } 181 180 182 181 static void __cpuinit ip27_smp_finish(void) 183 182 { 183 + extern void hub_rt_clock_event_init(void); 184 + 185 + hub_rt_clock_event_init(); 186 + local_irq_enable(); 184 187 } 185 188 186 189 static void __init ip27_cpus_done(void)
+13 -14
arch/mips/sgi-ip27/ip27-timer.c
··· 160 160 161 161 int rt_timer_irq; 162 162 163 + static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent); 164 + static DEFINE_PER_CPU(char [11], hub_rt_name); 165 + 163 166 static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id) 164 167 { 165 - struct clock_event_device *cd = dev_id; 166 168 unsigned int cpu = smp_processor_id(); 169 + struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); 167 170 int slice = cputoslice(cpu); 168 171 169 172 /* ··· 195 192 #define NSEC_PER_CYCLE 800 196 193 #define CYCLES_PER_SEC (NSEC_PER_SEC / NSEC_PER_CYCLE) 197 194 198 - static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent); 199 - static DEFINE_PER_CPU(char [11], hub_rt_name); 200 - 201 - static void __cpuinit hub_rt_clock_event_init(void) 195 + void __cpuinit hub_rt_clock_event_init(void) 202 196 { 203 197 unsigned int cpu = smp_processor_id(); 204 198 struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); ··· 203 203 int irq = rt_timer_irq; 204 204 205 205 sprintf(name, "hub-rt %d", cpu); 206 - cd->name = "HUB-RT", 207 - cd->features = CLOCK_EVT_FEAT_ONESHOT, 206 + cd->name = name; 207 + cd->features = CLOCK_EVT_FEAT_ONESHOT; 208 208 clockevent_set_clock(cd, CYCLES_PER_SEC); 209 209 cd->max_delta_ns = clockevent_delta2ns(0xfffffffffffff, cd); 210 210 cd->min_delta_ns = clockevent_delta2ns(0x300, cd); 211 - cd->rating = 200, 212 - cd->irq = irq, 213 - cd->cpumask = cpumask_of_cpu(cpu), 214 - cd->rating = 300, 215 - cd->set_next_event = rt_next_event, 216 - cd->set_mode = rt_set_mode, 211 + cd->rating = 200; 212 + cd->irq = irq; 213 + cd->cpumask = cpumask_of_cpu(cpu); 214 + cd->set_next_event = rt_next_event; 215 + cd->set_mode = rt_set_mode; 217 216 clockevents_register_device(cd); 218 217 } 219 218 ··· 260 261 { 261 262 hub_rt_clocksource_init(); 262 263 hub_rt_clock_event_global_init(); 264 + hub_rt_clock_event_init(); 263 265 } 264 266 265 267 void __cpuinit cpu_time_init(void) ··· 281 281 282 282 printk("CPU %d clock is %dMHz.\n", smp_processor_id(), cpu->cpu_speed); 283 283 284 - hub_rt_clock_event_init(); 285 284 set_c0_status(SRB_TIMOCLK); 286 285 } 287 286