Re: [tip:ras/core] x86/RAS: Simplify SMCA HWID descriptor struct
From: Thomas Gleixner
Date: Thu Nov 10 2016 - 14:56:24 EST
On Thu, 10 Nov 2016, Borislav Petkov wrote:
> On Thu, Nov 10, 2016 at 12:50:04PM -0500, Yazen Ghannam wrote:
> > Adding extra parentheses in HWID_MCATYPE() gives the same assembly as the
> > original code and fixes the behavior.
> >
> > > + hwid_mcatype = HWID_MCATYPE((high & MCI_IPID_HWID)),
> > > + ((high & MCI_IPID_MCATYPE) >> 16));
>
> Argh, the macro should be adding the additional parentheses:
>
> #define HWID_MCATYPE(hwid, mcatype) (((hwid) << 16) | (mcatype))
>
> That should fix the issue too.
Patch please.