Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516416
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks |
| Date | 2016-11-07 19:20 +0100 |
| Message-ID | <sAWGu-6RG-23@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <szrEQ-5cN-69@gated-at.bofh.it> <sAS9Q-3GK-9@gated-at.bofh.it> <sAS9Q-3GK-23@gated-at.bofh.it> <sATIB-4Mo-11@gated-at.bofh.it> <sAVU5-6hX-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Nov 07, 2016 at 06:26:17PM +0100, Sebastian Andrzej Siewior wrote:
> Subject: x86/mcheck: Split threshold_cpu_callback into two callbacks
> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Date: Tue, 25 Oct 2016 18:04:25 +0200
>
> The threshold_cpu_callback callbacks looks like one of the notifier and
> its arguments are almost the same. Split this out and have one ONLINE
> and one DEAD callback. This will come handy later once the main code
> gets changed to use the callback mechanism.
> Also, handle threshold_cpu_callback_online() return value so we don't
> continue if the function fails.
>
> Boris Petkov removed the callback pointer and replaced it with proper
> functions.
>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: linux-edac@vger.kernel.org
> Cc: x86@kernel.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> --- a/arch/x86/include/asm/mce.h
> +++ b/arch/x86/include/asm/mce.h
> @@ -293,9 +293,7 @@ void do_machine_check(struct pt_regs *,
> /*
> * Threshold handler
> */
> -
> extern void (*mce_threshold_vector)(void);
> -extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
>
> /* Deferred error interrupt handler */
> extern void (*deferred_error_int_vector)(void);
> @@ -377,7 +375,12 @@ struct smca_bank_info {
> };
>
> extern struct smca_bank_info smca_banks[MAX_NR_BANKS];
> +extern int mce_threshold_create_device(unsigned int cpu);
> +extern int mce_threshold_remove_device(unsigned int cpu);
> +#else
>
> +static inline int mce_threshold_create_device(unsigned int cpu) { return 0; };
> +static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; };
> #endif
>
> #endif /* _ASM_X86_MCE_H */
Right, just a heads-up for tip guys: this second hunk will cause a merge
conflict with the other RAS changes:
Applying patch 21-x86-mcheck-split_threshold_cpu_callback_into_two_callbacks.patch
patching file arch/x86/include/asm/mce.h
Hunk #1 succeeded at 292 (offset -1 lines).
Hunk #2 FAILED at 375.
1 out of 2 hunks FAILED -- saving rejects to file arch/x86/include/asm/mce.h.rej
The fixup is easy though as it is only a contextual conflict due to
renaming of smca_bank_info to smca_bank:
Index: b/arch/x86/include/asm/mce.h
===================================================================
--- a/arch/x86/include/asm/mce.h 2016-11-07 19:12:14.309920731 +0100
+++ b/arch/x86/include/asm/mce.h 2016-11-07 19:13:47.521922219 +0100
@@ -292,9 +292,7 @@ void do_machine_check(struct pt_regs *,
/*
* Threshold handler
*/
-
extern void (*mce_threshold_vector)(void);
-extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
/* Deferred error interrupt handler */
extern void (*deferred_error_int_vector)(void);
@@ -372,6 +370,11 @@ struct smca_bank {
extern struct smca_bank smca_banks[MAX_NR_BANKS];
extern const char *smca_get_long_name(enum smca_bank_types t);
+extern int mce_threshold_create_device(unsigned int cpu);
+extern int mce_threshold_remove_device(unsigned int cpu);
+#else
+static inline int mce_threshold_create_device(unsigned int cpu) { return 0; };
+static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; };
#endif
#endif /* _ASM_X86_MCE_H */
---
Thanks!
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cpu hotplug: convert more drivers (batch #4) Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[PATCH 04/25] lib/percpu_counter: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[tip:smp/hotplug] lib/percpu_counter: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 10/25] s390/smp: Make cpu notifier symetric Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
Re: [PATCH 10/25] s390/smp: Make cpu notifier symetric Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-11-04 15:30 +0100
[PATCH 10/25 v2] s390/smp: Make cpu notifier symetric Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-04 15:50 +0100
[tip:smp/hotplug] s390/smp: Make cpu notifier symetric tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 11/25] s390/smp: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
Re: [PATCH 11/25] s390/smp: Convert to hotplug state machine Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-11-04 15:40 +0100
[PATCH 11/25 v2] s390/smp: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-04 15:50 +0100
[tip:smp/hotplug] s390/smp: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 25/25] x86/mcheck: Move CPU_DEAD to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[PATCH 14/25] ia64/err-inject: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[tip:smp/hotplug] ia64/err-inject: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 05/25] lib/radix-tree: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[tip:smp/hotplug] lib/radix-tree: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 23/25] x86/mcheck: Make CPU_DOWN_PREPARE the counter part of CPU_STARTING Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[PATCH 02/25] kernel/printk: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[tip:smp/hotplug] kernel/printk: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 06/25] mm/page_alloc: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[tip:smp/hotplug] mm/page_alloc: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 18/25] x86/mcheck: Move threshold_create_device() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
Re: [PATCH 18/25] x86/mcheck: Move threshold_create_device() Borislav Petkov <bp@alien8.de> - 2016-11-07 11:40 +0100
[PATCH 09/25] net/flowcache: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[tip:smp/hotplug] net/flowcache: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks Borislav Petkov <bp@alien8.de> - 2016-11-07 14:30 +0100
Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-07 14:30 +0100
Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks Borislav Petkov <bp@alien8.de> - 2016-11-07 16:10 +0100
Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-07 16:20 +0100
Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-07 18:30 +0100
Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two callbacks Borislav Petkov <bp@alien8.de> - 2016-11-07 19:20 +0100
[PATCH 08/25] net/dev: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[tip:smp/hotplug] net/dev: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:00 +0100
[PATCH 17/25] ia64/topology: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 16:00 +0100
[PATCH 17/25 v2] ia64/topology: Convert to hotplug state machine Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-11-03 18:40 +0100
[tip:smp/hotplug] ia64/topology: Convert to hotplug state machine tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-11-10 00:10 +0100
csiph-web