Thread (16 messages) 16 messages, 5 authors, 2024-10-21

RE: [PATCH v6 1/5] x86/mce: Add wrapper for struct mce to export vendor specific info

From: "Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>
Date: 2024-10-17 06:03:03
Also in: linux-edac, lkml

quoted hunk ↗ jump to hunk
From: Avadhut Naik <avadhut.naik@amd.com>
[...]
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
[...]
@@ -1506,13 +1528,14 @@ noinstr void do_machine_check(struct pt_regs
*regs)

 	this_cpu_inc(mce_exception_count);

-	mce_gather_info(&m, regs);
-	m.tsc = rdtsc();
+	mce_gather_info(&err, regs);
+	m = &err.m;
+	m->tsc = rdtsc();

-	final = this_cpu_ptr(&mces_seen);
-	*final = m;
+	final = this_cpu_ptr(&hw_errs_seen);
+	final = &err;
It's not about getting the 'final' pointer to point to 'err', instead initialize the data it points to with 'err'.
So, it should be:

    s/final = &err/*final = err/

[...]

-Qiuxu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help