Re: [PATCH v11 09/23] PCI/AER: Report CXL or PCIe bus error type in trace logging

Lukas Wunner
2025-09-11T05:07:26Z

On Tue, Aug 26, 2025 at 08:35:24PM -0500, Terry Bowman wrote:
> +++ b/drivers/pci/pci.h
> @@ -608,6 +608,7 @@ struct aer_err_info {
> int ratelimit_print[AER_MAX_MULTI_ERR_DEVICES];
> int error_dev_num;
> const char *level; /* printk level */
> + bool is_cxl;
>
> unsigned int id:16;
>

Commit 273024ded7b3 ("PCI: pcie, aer: flags to bits") made an effort
to reduce memory size of struct aer_err_info by converting flags and
small integers to bitfields.

So it seems the proper approach would be to take away 1 bit from
__pad1 or __pad2 and use that for the is_cxl flag.

I know bitfields are somewhat controversial, but it is what this
struct is using, so... :)

Thanks,

Lukas