Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] x86/mce: add a switch of CONFIG_X86_MCELOG_LEGACY
@ 2019-09-11 15:28 Xiaochun Lee
  2019-09-11 15:40 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaochun Lee @ 2019-09-11 15:28 UTC (permalink / raw)
  To: tony.luck, bp
  Cc: tglx, mingo, hpa, x86, linux-edac, linux-kernel, lixiaochun.2888,
	Xiaochun Lee

From: Xiaochun Lee <lixc17@lenovo.com>

Add CONFIG_X86_MCELOG_LEGACY to control the
behavior of several functions be compiled.

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

diff --git a/arch/x86/kernel/cpu/mce/dev-mcelog.c b/arch/x86/kernel/cpu/mce/dev-mcelog.c
index 7c8958d..6add0ce 100644
--- a/arch/x86/kernel/cpu/mce/dev-mcelog.c
+++ b/arch/x86/kernel/cpu/mce/dev-mcelog.c
@@ -82,7 +82,7 @@ static void mce_do_trigger(struct work_struct *work)
 
 static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
 
-
+#ifdef CONFIG_X86_MCELOG_LEGACY
 void mce_work_trigger(void)
 {
 	if (mce_helper[0])
@@ -113,6 +113,7 @@ static ssize_t set_trigger(struct device *s, struct device_attribute *attr,
 }
 
 DEVICE_ATTR(trigger, 0644, show_trigger, set_trigger);
+#endif
 
 /*
  * mce_chrdev: Character device /dev/mcelog to read and clear the MCE log.
@@ -276,6 +277,7 @@ static long mce_chrdev_ioctl(struct file *f, unsigned int cmd,
 	}
 }
 
+#ifdef CONFIG_X86_MCELOG_LEGACY
 void mce_register_injector_chain(struct notifier_block *nb)
 {
 	blocking_notifier_chain_register(&mce_injector_chain, nb);
@@ -287,6 +289,7 @@ void mce_unregister_injector_chain(struct notifier_block *nb)
 	blocking_notifier_chain_unregister(&mce_injector_chain, nb);
 }
 EXPORT_SYMBOL_GPL(mce_unregister_injector_chain);
+#endif
 
 static ssize_t mce_chrdev_write(struct file *filp, const char __user *ubuf,
 				size_t usize, loff_t *off)
-- 
1.8.3.1



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

* Re: [PATCH] x86/mce: add a switch of CONFIG_X86_MCELOG_LEGACY
  2019-09-11 15:28 [PATCH] x86/mce: add a switch of CONFIG_X86_MCELOG_LEGACY Xiaochun Lee
@ 2019-09-11 15:40 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2019-09-11 15:40 UTC (permalink / raw)
  To: Xiaochun Lee
  Cc: tony.luck, tglx, mingo, hpa, x86, linux-edac, linux-kernel, Xiaochun Lee

On Wed, Sep 11, 2019 at 11:28:50PM +0800, Xiaochun Lee wrote:
> From: Xiaochun Lee <lixc17@lenovo.com>
> 
> Add CONFIG_X86_MCELOG_LEGACY to control the
> behavior of several functions be compiled.

... because?

Your commit messages structure should look something like this:

Problem is A.

It happens because of B.

Fix it by doing C.

(Potentially do D).

For more detailed info, see
Documentation/process/submitting-patches.rst, Section "2) Describe your
changes".

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 15:28 [PATCH] x86/mce: add a switch of CONFIG_X86_MCELOG_LEGACY Xiaochun Lee
2019-09-11 15:40 ` Borislav Petkov

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org linux-edac@archiver.kernel.org
	public-inbox-index linux-edac


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/ public-inbox