aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index bb9915291644..1d0c1b4886d7 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2156,7 +2156,7 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
2156 s64 remaining; 2156 s64 remaining;
2157 struct hrtimer_sleeper t; 2157 struct hrtimer_sleeper t;
2158 2158
2159 hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 2159 hrtimer_init_sleeper_on_stack(&t, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
2160 hrtimer_set_expires(&t.timer, spin_until); 2160 hrtimer_set_expires(&t.timer, spin_until);
2161 2161
2162 remaining = ktime_to_ns(hrtimer_expires_remaining(&t.timer)); 2162 remaining = ktime_to_ns(hrtimer_expires_remaining(&t.timer));
@@ -2170,11 +2170,9 @@ static void spin(struct pktgen_dev *pkt_dev, ktime_t spin_until)
2170 end_time = ktime_get(); 2170 end_time = ktime_get();
2171 } while (ktime_compare(end_time, spin_until) < 0); 2171 } while (ktime_compare(end_time, spin_until) < 0);
2172 } else { 2172 } else {
2173 /* see do_nanosleep */
2174 hrtimer_init_sleeper(&t, current);
2175 do { 2173 do {
2176 set_current_state(TASK_INTERRUPTIBLE); 2174 set_current_state(TASK_INTERRUPTIBLE);
2177 hrtimer_start_expires(&t.timer, HRTIMER_MODE_ABS); 2175 hrtimer_sleeper_start_expires(&t, HRTIMER_MODE_ABS);
2178 2176
2179 if (likely(t.task)) 2177 if (likely(t.task))
2180 schedule(); 2178 schedule();