x86: Last-minute fixlets
Subsystems (3)
Borislav Petkov
maintainercover x86: Last-minute fixlets
From: Borislav Petkov <[email protected]>
Hi guys,
last three small fixlets for tip before the merge window. Two go to tip:ras/core and one to tip:x86/microcode.
Please queue,
thanks.
Christophe JAILLET (1):
RAS/CEC: Check the correct variable in the debugfs error handling
Colin Ian King (1):
x86/microcode: Make a couple of symbols static
Yazen Ghannam (1):
x86/mce: Always save severity in machine_check_poll()
arch/x86/kernel/cpu/mcheck/mce.c | 7 +------ arch/x86/kernel/cpu/microcode/amd.c | 2 +- arch/x86/kernel/cpu/microcode/intel.c | 2 +- drivers/ras/cec.c | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
2.13.0
Borislav Petkov
maintainerPATCH 1/3 x86/mce: Always save severity in machine_check_poll()
From: Yazen Ghannam <[email protected]>
The MCE severity gives a hint as to how to handle the error. The notifier blocks can then use the severity to decide on an action. It's not necessary for machine_check_poll() to filter errors for the notifier chain, since each block will check its own set of conditions before handling an error.
Also, there isn't any urgency for machine_check_poll() to make decisions based on severity like in do_machine_check().
If we can assume that a severity is set then we can use it in more notifier blocks. For example, the CEC block could check for a "KEEP" severity rather than checking bits in the status. This isn't possible now since the severity is not set except for "DEFFRRED/UCNA" errors with a valid address.
Save the severity since we have it, and let the notifier blocks decide if they want to do anything.
--- arch/x86/kernel/cpu/mcheck/mce.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
arch/x86/kernel/cpu/mcheck/mce.c +1 -6
@@ -673,7 +673,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b) {bool error_seen = false;struct mce m; -int severity;int i;this_cpu_inc (mce_poll_count);
@@ -710,11 +709,7 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)mce_read_aux (&m, i); - severity =mce_severity (&m, mca_cfg.tolerant,NULL , false); - -if (severity ==MCE_DEFERRED_SEVERITY &&mce_is_memory_error (&m)) -if (m.status &MCI_STATUS_ADDRV ) - m.severity = severity; + m.severity =mce_severity (&m, mca_cfg.tolerant,NULL , false);/* * Don't get the IP here because it's unlikely to
Signature · 1 line
2.13.0
Borislav Petkov
maintainerPATCH 2/3 RAS/CEC: Check the correct variable in the debugfs error handling
In reply to Borislav PetkovFrom: Christophe JAILLET <[email protected]>
Check the correct variable when handling a potential error from debugfs_create_file(). Most likely a copy-paste botch.
--- drivers/ras/cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ras/cec.c +1 -1
@@ -481,7 +481,7 @@ static int __init create_debugfs_nodes(void) count =debugfs_create_file ("count_threshold" ,S_IRUSR |S_IWUSR , d, &count_threshold, &count_threshold_ops); -if (!decay) { +if (!count) {pr_warn ("Error creating count_threshold debugfs node!\n" ); goto err; }
Signature · 1 line
2.13.0
Borislav Petkov
maintainerPATCH 3/3 x86/microcode: Make a couple of symbols static
In reply to Borislav PetkovFrom: Colin Ian King <[email protected]>
The helper function __load_ucode_amd() and pointer intel_ucode_patch do not need to be in global scope, so make them static.
Fixes those sparse warnings:
"symbol '__load_ucode_amd' was not declared. Should it be static?" "symbol 'intel_ucode_patch' was not declared. Should it be static?"
--- arch/x86/kernel/cpu/microcode/amd.c | 2 +- arch/x86/kernel/cpu/microcode/intel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/microcode/amd.c +1 -1
@@ -251,7 +251,7 @@ static bool get_builtin_microcode(struct cpio_data *cp, unsigned int family)#endif } -void __load_ucode_amd (unsigned int cpuid_1_eax,struct cpio_data *ret) +static void __load_ucode_amd (unsigned int cpuid_1_eax,struct cpio_data *ret) {struct ucode_cpu_info *uci;struct cpio_data cp;
arch/x86/kernel/cpu/microcode/intel.c +1 -1
@@ -42,7 +42,7 @@static const char ucode_path[] ="kernel/x86/microcode/GenuineIntel.bin" ;/* Current microcode patch used in early patching on the APs. */ -struct microcode_intel *intel_ucode_patch; +static struct microcode_intel *intel_ucode_patch;static inline bool cpu_signatures_match (unsigned int s1,unsigned int p1,unsigned int s2,unsigned int p2)
Signature · 1 line
2.13.0