| @@ -73,7 +73,7 @@ static __initdata struct sparc64_tick_ops dummy_tick_ops = { · 72 unmodified lines |
| 73 | 73 | .get_tick = dummy_get_tick, |
| 74 | 74 | }; |
| 75 | 75 | |
| 76 | | −struct sparc64_tick_ops *tick_ops = &dummy_tick_ops; |
| 76 | +struct sparc64_tick_ops *tick_ops __read_mostly = &dummy_tick_ops; |
| 77 | 77 | |
| 78 | 78 | #define TICK_PRIV_BIT (1UL << 63) |
| 79 | 79 | |
| @@ -195,7 +195,7 @@ static unsigned long tick_add_tick(unsigned long adj, unsigned long offset) · 115 unmodified lines |
| 195 | 195 | return new_tick; |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | | −static struct sparc64_tick_ops tick_operations = { |
| 198 | +static struct sparc64_tick_ops tick_operations __read_mostly = { |
| 199 | 199 | .init_tick = tick_init_tick, |
| 200 | 200 | .get_tick = tick_get_tick, |
| 201 | 201 | .get_compare = tick_get_compare, |
| @@ -276,7 +276,7 @@ static unsigned long stick_add_compare(unsigned long adj) · 74 unmodified lines |
| 276 | 276 | return new_compare; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | | −static struct sparc64_tick_ops stick_operations = { |
| 279 | +static struct sparc64_tick_ops stick_operations __read_mostly = { |
| 280 | 280 | .init_tick = stick_init_tick, |
| 281 | 281 | .get_tick = stick_get_tick, |
| 282 | 282 | .get_compare = stick_get_compare, |
| @@ -422,7 +422,7 @@ static unsigned long hbtick_add_compare(unsigned long adj) · 139 unmodified lines |
| 422 | 422 | return val; |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | | −static struct sparc64_tick_ops hbtick_operations = { |
| 425 | +static struct sparc64_tick_ops hbtick_operations __read_mostly = { |
| 426 | 426 | .init_tick = hbtick_init_tick, |
| 427 | 427 | .get_tick = hbtick_get_tick, |
| 428 | 428 | .get_compare = hbtick_get_compare, |
| @@ -437,10 +437,9 @@ static struct sparc64_tick_ops hbtick_operations = { · 8 unmodified lines |
| 437 | 437 | * NOTE: On SUN5 systems the ticker interrupt comes in using 2 |
| 438 | 438 | * interrupts, one at level14 and one with softint bit 0. |
| 439 | 439 | */ |
| 440 | | −unsigned long timer_tick_offset; |
| 441 | | −unsigned long timer_tick_compare; |
| 440 | +unsigned long timer_tick_offset __read_mostly; |
| 442 | 441 | |
| 443 | | −static unsigned long timer_ticks_per_nsec_quotient; |
| 442 | +static unsigned long timer_ticks_per_nsec_quotient __read_mostly; |
| 444 | 443 | |
| 445 | 444 | #define TICK_SIZE (tick_nsec / 1000) |
| 446 | 445 | |
| @@ -464,7 +463,7 @@ static inline void timer_check_rtc(void) · 17 unmodified lines |
| 464 | 463 | |
| 465 | 464 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) |
| 466 | 465 | { |
| 467 | | − unsigned long ticks, pstate; |
| 466 | + unsigned long ticks, compare, pstate; |
| 468 | 467 | |
| 469 | 468 | write_seqlock(&xtime_lock); |
| 470 | 469 | |
| @@ -483,14 +482,14 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) · 12 unmodified lines |
| 483 | 482 | : "=r" (pstate) |
| 484 | 483 | : "i" (PSTATE_IE)); |
| 485 | 484 | |
| 486 | | − timer_tick_compare = tick_ops->add_compare(timer_tick_offset); |
| 485 | + compare = tick_ops->add_compare(timer_tick_offset); |
| 487 | 486 | ticks = tick_ops->get_tick(); |
| 488 | 487 | |
| 489 | 488 | /* Restore PSTATE_IE. */ |
| 490 | 489 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" |
| 491 | 490 | : /* no outputs */ |
| 492 | 491 | : "r" (pstate)); |
| 493 | | − } while (time_after_eq(ticks, timer_tick_compare)); |
| 492 | + } while (time_after_eq(ticks, compare)); |
| 494 | 493 | |
| 495 | 494 | timer_check_rtc(); |
| 496 | 495 | |
| @@ -506,11 +505,6 @@ void timer_tick_interrupt(struct pt_regs *regs) · 9 unmodified lines |
| 506 | 505 | |
| 507 | 506 | do_timer(regs); |
| 508 | 507 | |
| 509 | | − /* |
| 510 | | − * Only keep timer_tick_offset uptodate, but don't set TICK_CMPR. |
| 511 | | − */ |
| 512 | | − timer_tick_compare = tick_ops->get_compare() + timer_tick_offset; |
| 513 | | − |
| 514 | 508 | timer_check_rtc(); |
| 515 | 509 | |
| 516 | 510 | write_sequnlock(&xtime_lock); |