Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/platform/uv: Insert per_cpu accessor function on uv_hub_nmi

UV: NMI: insert this_cpu_read accessor function on uv_hub_nmi.

On SGI UV systems a 'power nmi' command from the CMC causes
all processors to drop into uv_handle_nmi(). With the 4.0
kernel this results in

BUG: unable to handle kernel paging request

The bug is caused by the current code trying to use the PER_CPU
variable uv_cpu_nmi.hub without an appropriate accessor
function. That oversight occurred in

commit e16321709c82 ("uv: Replace __get_cpu_var")
Author: Christoph Lameter <cl@linux.com>
Date: Sun Aug 17 12:30:41 2014 -0500

This patch inserts this_cpu_read() in the uv_hub_nmi macro
restoring the intended functionality.

Signed-off-by: George Beshers <gbeshers@sgi.com>
Acked-by: Mike Travis <travis@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Hedi Berriche <hedi@sgi.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <rja@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

George Beshers and committed by
Ingo Molnar
7c52198b 6ff33f39

+1 -1
+1 -1
arch/x86/include/asm/uv/uv_hub.h
··· 609 609 610 610 DECLARE_PER_CPU(struct uv_cpu_nmi_s, uv_cpu_nmi); 611 611 612 - #define uv_hub_nmi (uv_cpu_nmi.hub) 612 + #define uv_hub_nmi this_cpu_read(uv_cpu_nmi.hub) 613 613 #define uv_cpu_nmi_per(cpu) (per_cpu(uv_cpu_nmi, cpu)) 614 614 #define uv_hub_nmi_per(cpu) (uv_cpu_nmi_per(cpu).hub) 615 615