Re: [PATCH 4/5] platform/x86/intel/ifs: Implement Array BIST test

From: Dave Hansen
Date: Wed Feb 01 2023 - 14:35:53 EST


On 1/31/23 15:43, Jithu Joseph wrote:
> +union ifs_array {
> + u64 data;
> + struct {
> + u32 array_bitmask :32;
> + u32 array_bank :16;
> + u32 rsvd :15;
> + u32 ctrl_result :1;
> + };
> +};

Why bother with a bitfield? Just do:

union ifs_array {
u64 data;
struct {
u32 array_bitmask;
u16 array_bank;
u16 flags;
};
};

Then you only need to mask 'ctrl_result' out of flags. You don't need
any crazy macros.