From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755145AbbIMCvJ (ORCPT ); Sat, 12 Sep 2015 22:51:09 -0400 Received: from relay3.sgi.com ([192.48.152.1]:59738 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752686AbbIMCvH (ORCPT ); Sat, 12 Sep 2015 22:51:07 -0400 From: George Beshers To: George Beshers , Mike Travis , linux-kernel@vger.kernel.org, Alex Thorlton , Dimitri Sivanich , Ingo Molnar , Hedi Berriche , Russ Anderson Cc: George Beshers Message-Id: <20150913025103.9932.11080.sendpatchset@gulag2.americas.sgi.com> Subject: [PATCH 1/2] UV: NMI: insert per_cpu accessor function on uv_hub_nmi. Date: Sat, 12 Sep 2015 21:51:05 -0500 (CDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 Acked-by: Mike Travis Cc: Russ Anderson Cc: Dimitri Sivanich Cc: Hedi Berriche Cc: Alex Thorlton Cc: Christoph Lameter 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)