File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -98,18 +98,19 @@ static void tick_periodic(int cpu)
98
98
void tick_handle_periodic (struct clock_event_device * dev )
99
99
{
100
100
int cpu = smp_processor_id ();
101
- ktime_t next ;
101
+ ktime_t next = dev -> next_event ;
102
102
103
103
tick_periodic (cpu );
104
104
105
105
if (dev -> mode != CLOCK_EVT_MODE_ONESHOT )
106
106
return ;
107
- /*
108
- * Setup the next period for devices, which do not have
109
- * periodic mode:
110
- */
111
- next = ktime_add (dev -> next_event , tick_period );
112
107
for (;;) {
108
+ /*
109
+ * Setup the next period for devices, which do not have
110
+ * periodic mode:
111
+ */
112
+ next = ktime_add (next , tick_period );
113
+
113
114
if (!clockevents_program_event (dev , next , false))
114
115
return ;
115
116
/*
@@ -123,7 +124,6 @@ void tick_handle_periodic(struct clock_event_device *dev)
123
124
*/
124
125
if (timekeeping_valid_for_hres ())
125
126
tick_periodic (cpu );
126
- next = ktime_add (next , tick_period );
127
127
}
128
128
}
129
129
You can’t perform that action at this time.
0 commit comments