public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] UV: NMI: insert per_cpu accessor function on uv_hub_nmi.
@ 2015-04-30 13:29 George Beshers
  2015-04-30 13:29 ` [PATCH 2/2] UV: NMI: simple dump failover if kdump fails George Beshers
  2015-05-01  7:21 ` [PATCH 1/2] UV: NMI: insert per_cpu accessor function on uv_hub_nmi Ingo Molnar
  0 siblings, 2 replies; 7+ messages in thread
From: George Beshers @ 2015-04-30 13:29 UTC (permalink / raw)
  To: George Beshers, Mike Travis, linux-kernel, Alex Thorlton,
	Dimitri Sivanich, Ingo Molnar, Hedi Berriche, Russ Anderson
  Cc: George Beshers

UV: NMI: insert this_cpu_read accessor function on uv_hub_nmi.

UV NMI was accidently broken by this patch.

    commit e16321709c8270f9803bbfdb51e5e02235078c7f
    Author: Christoph Lameter <cl@linux.com>
    Date:   Sun Aug 17 12:30:41 2014 -0500

This patch insert this_cpu_read() on when accessing the
PER_CPU uv_cpu_nmi variable.

Signed-off-by: George Beshers <gbeshers@sgi.com>
Acked-by: Mike Travis <travis@sgi.com>
Cc: Russ Anderson <rja@sgi.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Hedi Berriche <hedi@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Christoph Lameter <cl@linux.com>

diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index a00ad8f..ea707478 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -609,7 +609,7 @@ struct uv_cpu_nmi_s {
 
 DECLARE_PER_CPU(struct uv_cpu_nmi_s, uv_cpu_nmi);
 
-#define uv_hub_nmi			(uv_cpu_nmi.hub)
+#define uv_hub_nmi			this_cpu_read(uv_cpu_nmi.hub)
 #define uv_cpu_nmi_per(cpu)		(per_cpu(uv_cpu_nmi, cpu))
 #define uv_hub_nmi_per(cpu)		(uv_cpu_nmi_per(cpu).hub)
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH 1/2] UV: NMI: insert per_cpu accessor function on uv_hub_nmi.
@ 2015-09-13  2:51 George Beshers
  0 siblings, 0 replies; 7+ messages in thread
From: George Beshers @ 2015-09-13  2:51 UTC (permalink / raw)
  To: George Beshers, Mike Travis, linux-kernel, Alex Thorlton,
	Dimitri Sivanich, Ingo Molnar, Hedi Berriche, Russ Anderson
  Cc: George Beshers

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: Russ Anderson <rja@sgi.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Hedi Berriche <hedi@sgi.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Christoph Lameter <cl@linux.com>

diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index a00ad8f..ea707478 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -609,7 +609,7 @@ struct uv_cpu_nmi_s {
 
 DECLARE_PER_CPU(struct uv_cpu_nmi_s, uv_cpu_nmi);
 
-#define uv_hub_nmi			(uv_cpu_nmi.hub)
+#define uv_hub_nmi			this_cpu_read(uv_cpu_nmi.hub)
 #define uv_cpu_nmi_per(cpu)		(per_cpu(uv_cpu_nmi, cpu))
 #define uv_hub_nmi_per(cpu)		(uv_cpu_nmi_per(cpu).hub)
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-13  2:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30 13:29 [PATCH 1/2] UV: NMI: insert per_cpu accessor function on uv_hub_nmi George Beshers
2015-04-30 13:29 ` [PATCH 2/2] UV: NMI: simple dump failover if kdump fails George Beshers
2015-05-01  7:27   ` Ingo Molnar
2015-05-01 16:33     ` Mike Travis
2015-05-01 16:42       ` Ingo Molnar
2015-05-01  7:21 ` [PATCH 1/2] UV: NMI: insert per_cpu accessor function on uv_hub_nmi Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2015-09-13  2:51 George Beshers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox