x86/mce/inject: Remove call to mce_notify_irq()
Subsystems (3)
PATCH v2 1/2 x86/mce/inject: Remove call to mce_notify_irq()
The call is actually a noop because when the MCE is raised the early notifier is the only call site that correctly calls mce_notify_irq() because it also sets mce_need_notify. Remove this call, making mce_notify_irq() be private to core.c
Signed-off-by Nikolay Borisov <[email protected]>
--- arch/x86/include/asm/mce.h | 2 -- arch/x86/kernel/cpu/mce/core.c | 44 ++++++++++++++++---------------- arch/x86/kernel/cpu/mce/inject.c | 1 - 3 files changed, 22 insertions(+), 25 deletions(-)
arch/x86/include/asm/mce.h +0 -2
@@ -296,8 +296,6 @@ enum mcp_flags {void machine_check_poll (enum mcp_flags flags,mce_banks_t *b); -bool mce_notify_irq (void ); - DECLARE_PER_CPU(struct mce, injectm);/* Disable CMCI/polling for MCA bank claimed by firmware */
arch/x86/kernel/cpu/mce/core.c +22 -22
56 lines not on this page · raw message
arch/x86/kernel/cpu/mce/inject.c +0 -1
@@ -229,7 +229,6 @@ static int raise_local(void) }else if (m->status) {pr_info ("Starting machine check poll CPU %d\n" , cpu);raise_poll (m); -mce_notify_irq ();pr_info ("Machine check poll done on CPU %d\n" , cpu); }else m->finished =0 ;
Signature · 1 line
2.43.0
PATCH v2 2/2 x86/mce: Make mce_notify_irq() depend on CONFIG_X86_MCELOG_LEGACY
mce_notify_irq() really depends on the legacy mcelog being enabled as otherwise mce_work_trigger() will never schedule the trigger work as mce_helper can't be set unless CONFIG_X86_MCELOG_LEGACY is defined.
Signed-off-by Nikolay Borisov <[email protected]>
--- arch/x86/kernel/cpu/mce/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/mce/core.c +2 -1
@@ -591,6 +591,7 @@ EXPORT_SYMBOL_GPL(mce_is_correctable);*/ static int mce_notify_irq (void ) { +#ifdef CONFIG_X86_MCELOG_LEGACY /* Not more than two messages every minute */ static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2);
@@ -602,7 +603,7 @@ static int mce_notify_irq(void) return 1; } - +#endif return 0 ; }
Signature · 1 line
2.43.0