Re: [PATCH v2] ACPI: APEI: EINJ: Fix EINJv2 memory injection

From: Jiaqi Yan

Date: Wed Apr 15 2026 - 14:54:41 EST


Hi Tony,

On Wed, Apr 15, 2026 at 11:15 AM Luck, Tony <tony.luck@xxxxxxxxx> wrote:
>
> > > +static bool is_memory_injection(u32 type, u64 param2)
> > > +{
> > > + if (is_v2)
> > > + return type & BIT(1);
> >
> > Hi Tony, just a nit: for readability would it better to introduce a
> > macro for BIT(1)? like ACPI65_EINJV2_ERROR_TYPE_MEMORY
>
> I thought about that. The old (v1?) EINJ type bits are in <acpi/actbl1.h>
>
> So "the right thing"(TM) might be to add some V2 defines there:
>
> #define ACPI_EINJV2_PROCESSOR BIT(0)
> #define ACPI_EINJV2_MEMORY BIT(1)
> #define ACPI_EINJV2_PCIX BIT(2)

Looks good to me. Let's see what Rafael thinks about adding them.

>
> Rafael: Do you want that? I can start the process in the ACPICA tree if you do.
>
> -Tony