Re: [PATCH v2 4/5] x86/mce: Define mce_prep_record() helpers for common and per-CPU fields
From: Yazen Ghannam
Date: Tue Jun 25 2024 - 21:46:06 EST
On Tue, Jun 25, 2024 at 04:19:40PM +0300, Nikolay Borisov wrote:
[...]
> > +
> > +void mce_prep_record_per_cpu(unsigned int cpu, struct mce *m)
> > +{
> > + m->cpu = cpu;
> > + m->extcpu = cpu;
> > + m->apicid = cpu_data(m->extcpu).topo.initial_apicid;
> > + m->microcode = cpu_data(m->extcpu).microcode;
> > + m->ppin = cpu_data(m->extcpu).ppin;
>
> nit: Similar to tglx's feedback for patch 2 you could use topology_ppin()
>
> > + m->socketid = cpu_data(m->extcpu).topo.pkg_id;
> nit: topology_physical_package_id()
>
>
Yes, will update both.
Thanks,
Yazen