From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756594AbcE0VhF (ORCPT ); Fri, 27 May 2016 17:37:05 -0400 Received: from mga03.intel.com ([134.134.136.65]:63528 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754766AbcE0VhD (ORCPT ); Fri, 27 May 2016 17:37:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,375,1459839600"; d="scan'208";a="990246168" Message-Id: From: Tony Luck Date: Fri, 27 May 2016 14:11:06 -0700 Subject: [PATCH] x86/mce: Do not use bank 1 for APEI generated error logs. To: Borislav Petkov Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Aristeu Rozanski Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BIOS can report a memory error to Linux using ACPI/APEI mechanism. When it does this, we create a fictitious machine check error record and feed it into the standard mce_Log() function. The error record needs a machine check bank number, and for some reason we chose "1" for this. But "1" is a valid bank number, and this causes confusion and heartburn among h/w folks who are concerned that a memory error signature was somehow logged in bank 1. Change to use "mca_cfg.banks" (one higher than the largest bank number supported on the platform) so that it will be clearer that this error did not originate in a machine check bank. Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/mcheck/mce-apei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c index 34c89a3e8260..9d2c02337713 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-apei.c +++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c @@ -46,7 +46,7 @@ void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err) return; mce_setup(&m); - m.bank = 1; + m.bank = mca_cfg.banks; /* Fake a memory read error with unknown channel */ m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | 0x9f; -- 2.5.0