tick-common.c (da733563be5a9da26fe81d9f007262d00b846e22) | tick-common.c (d6ad418763888f617ac5b4849823e4cd670df1dd) |
---|---|
1/* 2 * linux/kernel/time/tick-common.c 3 * 4 * This file contains the base functions to manage periodic tick 5 * related events. 6 * 7 * Copyright(C) 2005-2006, Thomas Gleixner <tglx@linutronix.de> 8 * Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar --- 49 unchanged lines hidden (view full) --- 58} 59 60/* 61 * Periodic tick 62 */ 63static void tick_periodic(int cpu) 64{ 65 if (tick_do_timer_cpu == cpu) { | 1/* 2 * linux/kernel/time/tick-common.c 3 * 4 * This file contains the base functions to manage periodic tick 5 * related events. 6 * 7 * Copyright(C) 2005-2006, Thomas Gleixner <tglx@linutronix.de> 8 * Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar --- 49 unchanged lines hidden (view full) --- 58} 59 60/* 61 * Periodic tick 62 */ 63static void tick_periodic(int cpu) 64{ 65 if (tick_do_timer_cpu == cpu) { |
66 write_seqlock(&xtime_lock); | 66 write_seqlock(&jiffies_lock); |
67 68 /* Keep track of the next tick event */ 69 tick_next_period = ktime_add(tick_next_period, tick_period); 70 71 do_timer(1); | 67 68 /* Keep track of the next tick event */ 69 tick_next_period = ktime_add(tick_next_period, tick_period); 70 71 do_timer(1); |
72 write_sequnlock(&xtime_lock); | 72 write_sequnlock(&jiffies_lock); |
73 } 74 75 update_process_times(user_mode(get_irq_regs())); 76 profile_tick(CPU_PROFILING); 77} 78 79/* 80 * Event handler for periodic ticks --- 44 unchanged lines hidden (view full) --- 125 if ((dev->features & CLOCK_EVT_FEAT_PERIODIC) && 126 !tick_broadcast_oneshot_active()) { 127 clockevents_set_mode(dev, CLOCK_EVT_MODE_PERIODIC); 128 } else { 129 unsigned long seq; 130 ktime_t next; 131 132 do { | 73 } 74 75 update_process_times(user_mode(get_irq_regs())); 76 profile_tick(CPU_PROFILING); 77} 78 79/* 80 * Event handler for periodic ticks --- 44 unchanged lines hidden (view full) --- 125 if ((dev->features & CLOCK_EVT_FEAT_PERIODIC) && 126 !tick_broadcast_oneshot_active()) { 127 clockevents_set_mode(dev, CLOCK_EVT_MODE_PERIODIC); 128 } else { 129 unsigned long seq; 130 ktime_t next; 131 132 do { |
133 seq = read_seqbegin(&xtime_lock); | 133 seq = read_seqbegin(&jiffies_lock); |
134 next = tick_next_period; | 134 next = tick_next_period; |
135 } while (read_seqretry(&xtime_lock, seq)); | 135 } while (read_seqretry(&jiffies_lock, seq)); |
136 137 clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT); 138 139 for (;;) { 140 if (!clockevents_program_event(dev, next, false)) 141 return; 142 next = ktime_add(next, tick_period); 143 } --- 276 unchanged lines hidden --- | 136 137 clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT); 138 139 for (;;) { 140 if (!clockevents_program_event(dev, next, false)) 141 return; 142 next = ktime_add(next, tick_period); 143 } --- 276 unchanged lines hidden --- |