linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiaochun Lee <lixiaochun.2888@163.com>
To: tony.luck@intel.com, bp@alien8.de
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org, Xiaochun Lee <lixc17@lenovo.com>
Subject: [PATCH] x86/mce: show the status of cmci_disabled to user
Date: Mon, 26 Aug 2019 14:16:04 +0800	[thread overview]
Message-ID: <1566800164-6428-1-git-send-email-lixiaochun.2888@163.com> (raw)

From: Xiaochun Lee <lixc17@lenovo.com>

When enabled Firmware First mode in UEFI, we need to
set the cmci_disabled and ignore_ce in mca cfg
that users can check correct status from
"/sys/devices/system/machinecheck/machinecheckXXX/cmci_disabled"

Signed-off-by: Xiaochun Lee <lixc17@lenovo.com>
---
 arch/x86/kernel/cpu/mce/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 743370e..932c701 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -1909,6 +1909,8 @@ static void __mce_disable_bank(void *arg)
 	int bank = *((int *)arg);
 	__clear_bit(bank, this_cpu_ptr(mce_poll_banks));
 	cmci_disable_bank(bank);
+	mca_cfg.cmci_disabled = true;
+	mca_cfg.ignore_ce = true;
 }
 
 void mce_disable_bank(int bank)
-- 
1.8.3.1


             reply	other threads:[~2019-08-26  6:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26  6:16 Xiaochun Lee [this message]
2019-08-26 10:04 ` [PATCH] x86/mce: show the status of cmci_disabled to user Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1566800164-6428-1-git-send-email-lixiaochun.2888@163.com \
    --to=lixiaochun.2888@163.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixc17@lenovo.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).