diff options
Diffstat (limited to 'arch/x86/kernel/nmi.c')
-rw-r--r-- | arch/x86/kernel/nmi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index 0920212e6159..ba77ebc2c353 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c | |||
@@ -111,7 +111,7 @@ static int __kprobes nmi_handle(unsigned int type, struct pt_regs *regs, bool b2 | |||
111 | */ | 111 | */ |
112 | list_for_each_entry_rcu(a, &desc->head, list) { | 112 | list_for_each_entry_rcu(a, &desc->head, list) { |
113 | u64 before, delta, whole_msecs; | 113 | u64 before, delta, whole_msecs; |
114 | int decimal_msecs, thishandled; | 114 | int remainder_ns, decimal_msecs, thishandled; |
115 | 115 | ||
116 | before = local_clock(); | 116 | before = local_clock(); |
117 | thishandled = a->handler(type, regs); | 117 | thishandled = a->handler(type, regs); |
@@ -123,8 +123,9 @@ static int __kprobes nmi_handle(unsigned int type, struct pt_regs *regs, bool b2 | |||
123 | continue; | 123 | continue; |
124 | 124 | ||
125 | nmi_longest_ns = delta; | 125 | nmi_longest_ns = delta; |
126 | whole_msecs = do_div(delta, (1000 * 1000)); | 126 | whole_msecs = delta; |
127 | decimal_msecs = do_div(delta, 1000) % 1000; | 127 | remainder_ns = do_div(whole_msecs, (1000 * 1000)); |
128 | decimal_msecs = remainder_ns / 1000; | ||
128 | printk_ratelimited(KERN_INFO | 129 | printk_ratelimited(KERN_INFO |
129 | "INFO: NMI handler (%ps) took too long to run: " | 130 | "INFO: NMI handler (%ps) took too long to run: " |
130 | "%lld.%03d msecs\n", a->handler, whole_msecs, | 131 | "%lld.%03d msecs\n", a->handler, whole_msecs, |