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

Re: [PATCH v2 1/4] x86/mce: Add wrapper for struct mce to export vendor specific info

From: Borislav Petkov <bp@alien8.de>
Date: 2024-06-26 18:10:45
Also in: linux-acpi, linux-edac, lkml

On Wed, Jun 26, 2024 at 05:11:29PM +0000, Luck, Tony wrote:
quoted
Tony, any comments? You ok with this, would that fit any Intel-specific vendor
fields too or do you need some additional Intel-specific changes?
It looks easy enough to add any Intel specific bits to the union later.

Is there anyway that the trace event could be "smarter" about what vendor specific
information to include based on boot_cpu_data.x86_vendor? As currently written
Intel systems are going to see 3*u64 decoded into ascii, that are all zero. Not a
huge deal, I think it will just look like "0x0,0x0,0x0"
Hmm, good question.

Yo, Steve, is there a way to do conditional things in a TP?

For example:
@@ -83,7 +87,8 @@ TRACE_EVENT(mce_record,
                __entry->walltime,
                __entry->socketid,
                __entry->apicid,
-               __entry->microcode)
+               __entry->microcode,
	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
		__print_array(__get_dynamic_array(v_data), __entry->len / 8, 8))

i.e., print that array only when on a AMD.

I'm sure this won't fly as it is macro magic - this is just to show the
intent...

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help