[PATCH 1/3] irqchip/gic-v3-its: Give the percpu rdist struct its own flags field

Marc Zyngier maz at kernel.org
Sat Oct 23 02:10:07 PDT 2021


On Fri, 22 Oct 2021 11:33:05 +0100,
Valentin Schneider <valentin.schneider at arm.com> wrote:
> 
> Later patches will require tracking some per-rdist status. Reuse the bytes
> "lost" to padding within the __percpu rdist struct as a flags field, and
> re-encode ->lpi_enabled within said flags.
> 
> No change in functionality intended.
> 
> Signed-off-by: Valentin Schneider <valentin.schneider at arm.com>
> ---
>  drivers/irqchip/irq-gic-v3-its.c   | 26 ++++++++++++++------------
>  include/linux/irqchip/arm-gic-v3.h |  2 +-
>  2 files changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index eb0882d15366..a688ed5c21e8 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -43,8 +43,10 @@
>  #define ITS_FLAGS_WORKAROUND_CAVIUM_22375	(1ULL << 1)
>  #define ITS_FLAGS_WORKAROUND_CAVIUM_23144	(1ULL << 2)
>  
> -#define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING	(1 << 0)
> -#define RDIST_FLAGS_RD_TABLES_PREALLOCATED	(1 << 1)
> +#define RDISTS_FLAGS_PROPBASE_NEEDS_FLUSHING	(1 << 0)
> +#define RDISTS_FLAGS_RD_TABLES_PREALLOCATED	(1 << 1)
> +
> +#define RDIST_FLAGS_LPI_ENABLED                 BIT(0)

Just to reduce the churn and for me not to misread things (because
RDIST/RDISTS is pretty confusing), how about leaving the original
flags as is, and name the per-RD ones like:

#define	RD_LOCAL_LPI_ENABLED	BIT(0)

?

Or something else that'd be adequately different from the original
flags?

Otherwise looks sensible.

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list