Skip to content

Commit e53bc3f

Browse files
committed
Merge tag 'ras-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 RAS updates from Ingo Molnar: "Boris is on vacation and he asked us to send you the pending RAS bits: - Print the PPIN field on CPUs that fill them out - Fix an MCE injection bug - Simplify a kzalloc in dev_mcelog_init_device()" * tag 'ras-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce, EDAC/mce_amd: Print PPIN in machine check records x86/mce/dev-mcelog: Use struct_size() helper in kzalloc() x86/mce/inject: Fix a wrong assignment of i_mce.status
2 parents a92ad11 + bb2de0a commit e53bc3f

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

arch/x86/kernel/cpu/mce/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ static void __print_mce(struct mce *m)
245245
pr_cont("ADDR %llx ", m->addr);
246246
if (m->misc)
247247
pr_cont("MISC %llx ", m->misc);
248+
if (m->ppin)
249+
pr_cont("PPIN %llx ", m->ppin);
248250

249251
if (mce_flags.smca) {
250252
if (m->synd)

arch/x86/kernel/cpu/mce/dev-mcelog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static __init int dev_mcelog_init_device(void)
345345
int err;
346346

347347
mce_log_len = max(MCE_LOG_MIN_LEN, num_online_cpus());
348-
mcelog = kzalloc(sizeof(*mcelog) + mce_log_len * sizeof(struct mce), GFP_KERNEL);
348+
mcelog = kzalloc(struct_size(mcelog, entry, mce_log_len), GFP_KERNEL);
349349
if (!mcelog)
350350
return -ENOMEM;
351351

arch/x86/kernel/cpu/mce/inject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ static void do_inject(void)
511511
*/
512512
if (inj_type == DFR_INT_INJ) {
513513
i_mce.status |= MCI_STATUS_DEFERRED;
514-
i_mce.status |= (i_mce.status & ~MCI_STATUS_UC);
514+
i_mce.status &= ~MCI_STATUS_UC;
515515
}
516516

517517
/*

drivers/edac/mce_amd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,9 @@ amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
10941094
if (m->status & MCI_STATUS_ADDRV)
10951095
pr_emerg(HW_ERR "Error Addr: 0x%016llx\n", m->addr);
10961096

1097+
if (m->ppin)
1098+
pr_emerg(HW_ERR "PPIN: 0x%016llx\n", m->ppin);
1099+
10971100
if (boot_cpu_has(X86_FEATURE_SMCA)) {
10981101
pr_emerg(HW_ERR "IPID: 0x%016llx", m->ipid);
10991102

0 commit comments

Comments
 (0)