aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/preemptirq_delay_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/preemptirq_delay_test.c')
-rw-r--r--kernel/trace/preemptirq_delay_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/preemptirq_delay_test.c b/kernel/trace/preemptirq_delay_test.c
index f704390db9fc..d8765c952fab 100644
--- a/kernel/trace/preemptirq_delay_test.c
+++ b/kernel/trace/preemptirq_delay_test.c
@@ -5,12 +5,12 @@
5 * Copyright (C) 2018 Joel Fernandes (Google) <joel@joelfernandes.org> 5 * Copyright (C) 2018 Joel Fernandes (Google) <joel@joelfernandes.org>
6 */ 6 */
7 7
8#include <linux/trace_clock.h>
8#include <linux/delay.h> 9#include <linux/delay.h>
9#include <linux/interrupt.h> 10#include <linux/interrupt.h>
10#include <linux/irq.h> 11#include <linux/irq.h>
11#include <linux/kernel.h> 12#include <linux/kernel.h>
12#include <linux/kthread.h> 13#include <linux/kthread.h>
13#include <linux/ktime.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/printk.h> 15#include <linux/printk.h>
16#include <linux/string.h> 16#include <linux/string.h>
@@ -25,13 +25,13 @@ MODULE_PARM_DESC(test_mode, "Mode of the test such as preempt or irq (default ir
25 25
26static void busy_wait(ulong time) 26static void busy_wait(ulong time)
27{ 27{
28 ktime_t start, end; 28 u64 start, end;
29 start = ktime_get(); 29 start = trace_clock_local();
30 do { 30 do {
31 end = ktime_get(); 31 end = trace_clock_local();
32 if (kthread_should_stop()) 32 if (kthread_should_stop())
33 break; 33 break;
34 } while (ktime_to_ns(ktime_sub(end, start)) < (time * 1000)); 34 } while ((end - start) < (time * 1000));
35} 35}
36 36
37static int preemptirq_delay_run(void *data) 37static int preemptirq_delay_run(void *data)