On 26 February 2018 at 16:05, Ghannam, Yazen <[email protected]> wrote: >> -----Original Message----- >> From: Ard Biesheuvel [mailto:[email protected]] >> Sent: Saturday, February 24, 2018 11:46 AM >> To: Ghannam, Yazen <[email protected]> >> Cc: [email protected]; Linux Kernel Mailing List <linux- >> [email protected]>; Borislav Petkov <[email protected]>; the arch/x86 >> maintainers <[email protected]> >> Subject: Re: [PATCH 8/8] efi: Decode IA32/X64 Context Info structure >> >> On 23 February 2018 at 20:03, Yazen Ghannam >> <[email protected]> wrote: >> > From: Yazen Ghannam <[email protected]> >> > >> > Print the fields of the IA32/X64 Context Information structure. >> > >> > Print the "Register Array" as raw values. Some context types are defined >> > in the UEFI spec, so more detailed decoded may be added in the future. >> > >> > Based on UEFI 2.7 section N.2.4.2.2 IA32/X64 Processor Context >> > Information Structure. >> > >> > Cc: <[email protected]> # 4.16.x >> > Signed-off-by: Yazen Ghannam <[email protected]> >> > --- >> > drivers/firmware/efi/cper-x86.c | 55 >> +++++++++++++++++++++++++++++++++++++++++ >> > 1 file changed, 55 insertions(+) >> > >> > diff --git a/drivers/firmware/efi/cper-x86.c b/drivers/firmware/efi/cper- >> x86.c >> > index 02b1b424f537..bb6cef0b5e53 100644 >> > --- a/drivers/firmware/efi/cper-x86.c >> > +++ b/drivers/firmware/efi/cper-x86.c >> > @@ -13,6 +13,7 @@ >> > #define VALID_LAPIC_ID BIT_ULL(0) >> > #define VALID_CPUID_INFO BIT_ULL(1) >> > #define VALID_PROC_ERR_INFO_NUM(bits) ((bits & GENMASK_ULL(7, 2)) >> >> 2) >> > +#define VALID_PROC_CNXT_INFO_NUM(bits) ((bits & GENMASK_ULL(13, >> 8)) >> 8) >> >> Parens >> >> Also, CNXT isn't really idiomatic when abbreviating 'context' (and you >> use CTX below as well) >> > > The UEFI spec uses PROC_CONTEXT_INFO_NUM. > > Would you prefer 1 or 2 below? > 1) VALID_PROC_CONTEXT_INFO_NUM > 2) VALID_PROC_CTX_INFO_NUM >
Let's go with 2) since you're already using CTX in numerous places.

