Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip/gic-v3: Rename GICv3 ITS MSI parent

The GICv5 ITS will reuse some GICv3 ITS MSI parent functions therefore
it makes sense to keep the code functionality in a compilation unit
shared by the two drivers.

Rename the GICv3 ITS MSI parent file and update the related
Kconfig/Makefile entries to pave the way for code sharing.

Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250703-gicv5-host-v7-26-12e71f1b3528@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>

authored by

Lorenzo Pieralisi and committed by
Marc Zyngier
b4ead12d cd0ec59a

+19 -4
+4
drivers/irqchip/Kconfig
··· 41 41 select HAVE_ARM_SMCCC_DISCOVERY 42 42 select IRQ_MSI_IOMMU 43 43 44 + config ARM_GIC_ITS_PARENT 45 + bool 46 + 44 47 config ARM_GIC_V3_ITS 45 48 bool 46 49 select GENERIC_MSI_IRQ 47 50 select IRQ_MSI_LIB 51 + select ARM_GIC_ITS_PARENT 48 52 default ARM_GIC_V3 49 53 select IRQ_MSI_IOMMU 50 54
+2 -1
drivers/irqchip/Makefile
··· 33 33 obj-$(CONFIG_IRQ_MSI_LIB) += irq-msi-lib.o 34 34 obj-$(CONFIG_ARM_GIC_V2M) += irq-gic-v2m.o 35 35 obj-$(CONFIG_ARM_GIC_V3) += irq-gic-v3.o irq-gic-v3-mbi.o irq-gic-common.o 36 - obj-$(CONFIG_ARM_GIC_V3_ITS) += irq-gic-v3-its.o irq-gic-v4.o irq-gic-v3-its-msi-parent.o 36 + obj-$(CONFIG_ARM_GIC_ITS_PARENT) += irq-gic-its-msi-parent.o 37 + obj-$(CONFIG_ARM_GIC_V3_ITS) += irq-gic-v3-its.o irq-gic-v4.o 37 38 obj-$(CONFIG_ARM_GIC_V3_ITS_FSL_MC) += irq-gic-v3-its-fsl-mc-msi.o 38 39 obj-$(CONFIG_PARTITION_PERCPU) += irq-partition-percpu.o 39 40 obj-$(CONFIG_ARM_GIC_V5) += irq-gic-v5.o irq-gic-v5-irs.o
-2
drivers/irqchip/irq-gic-common.h
··· 29 29 void gic_enable_of_quirks(const struct device_node *np, 30 30 const struct gic_quirk *quirks, void *data); 31 31 32 - extern const struct msi_parent_ops gic_v3_its_msi_parent_ops; 33 - 34 32 #define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0) 35 33 #define RDIST_FLAGS_RD_TABLES_PREALLOCATED (1 << 1) 36 34 #define RDIST_FLAGS_FORCE_NON_SHAREABLE (1 << 2)
+11
drivers/irqchip/irq-gic-its-msi-parent.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * Copyright (C) 2024 ARM Limited, All Rights Reserved. 4 + */ 5 + 6 + #ifndef _IRQ_GIC_ITS_MSI_PARENT_H 7 + #define _IRQ_GIC_ITS_MSI_PARENT_H 8 + 9 + extern const struct msi_parent_ops gic_v3_its_msi_parent_ops; 10 + 11 + #endif /* _IRQ_GIC_ITS_MSI_PARENT_H */
+1 -1
drivers/irqchip/irq-gic-v3-its-msi-parent.c drivers/irqchip/irq-gic-its-msi-parent.c
··· 7 7 #include <linux/acpi_iort.h> 8 8 #include <linux/pci.h> 9 9 10 - #include "irq-gic-common.h" 10 + #include "irq-gic-its-msi-parent.h" 11 11 #include <linux/irqchip/irq-msi-lib.h> 12 12 13 13 #define ITS_MSI_FLAGS_REQUIRED (MSI_FLAG_USE_DEF_DOM_OPS | \
+1
drivers/irqchip/irq-gic-v3-its.c
··· 41 41 #include <asm/exception.h> 42 42 43 43 #include "irq-gic-common.h" 44 + #include "irq-gic-its-msi-parent.h" 44 45 #include <linux/irqchip/irq-msi-lib.h> 45 46 46 47 #define ITS_FLAGS_CMDQ_NEEDS_FLUSHING (1ULL << 0)