perf/x86: Fix incorrect use of do_div() in NMI warning
authorDave Hansen <dave.hansen@linux.intel.com>
Mon, 8 Jul 2013 21:44:04 +0000 (14:44 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 12 Jul 2013 12:13:04 +0000 (14:13 +0200)
commitbaf64b85445546a38b44052d71782dfe7531e350
tree123db75d91d993ec405500d609c67844488db216
parent058ebd0eba3aff16b144eabf4510ed9510e1416e
perf/x86: Fix incorrect use of do_div() in NMI warning

I completely botched understanding the calling conventions of
do_div().  I assumed that do_div() returned the result instead
of realizing that it modifies its argument and returns a
remainder.  The side-effect from this would be bogus numbers
for the "msecs" value in the warning messages:

INFO: NMI handler (perf_event_nmi_handler) took too long to run: 0.114 msecs

Note, there was a second fix posted by Stephane Eranian for
a separate patch which I also botched:

http://lkml.kernel.org/r/20130704223010.GA30625@quad

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Hansen <dave@sr71.net>
Link: http://lkml.kernel.org/r/20130708214404.B0B6EA66@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/nmi.c