lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [x86/rapl] BUG: unable to handle kernel paging request at 000000000000d968
On Thu, 25 Sep 2014, Fengguang Wu wrote:

> [ 36.889742] BUG: unable to handle kernel paging request at 000000000000d968
> [ 36.897739] IP: [<ffffffff81038282>] rapl_event_update+0x82/0xb0

Does this fix it?


Subject: Fix this_cpu_read() in rapl_scale

rapl_pmu is a percpu variable containing a pointer not a percpu struct
from which we would like to fetch the value of a field.

Thus the read must get the pointer and not the target field.

Signed-off-by: Christoph Lameter <cl@linux.com>

Index: linux/arch/x86/kernel/cpu/perf_event_intel_rapl.c
===================================================================
--- linux.orig/arch/x86/kernel/cpu/perf_event_intel_rapl.c 2014-09-25 08:53:33.262406130 -0500
+++ linux/arch/x86/kernel/cpu/perf_event_intel_rapl.c 2014-09-25 13:42:33.636661521 -0500
@@ -135,7 +135,7 @@ static inline u64 rapl_scale(u64 v)
* or use ldexp(count, -32).
* Watts = Joules/Time delta
*/
- return v << (32 - __this_cpu_read(rapl_pmu->hw_unit));
+ return v << (32 - __this_cpu_read(rapl_pmu)->hw_unit);
}

static u64 rapl_event_update(struct perf_event *event)[unhandled content-type:application/octet-stream]_______________________________________________
LKP mailing list
LKP@linux.intel.com
\
 
 \ /
  Last update: 2014-09-25 21:21    [W:0.037 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site