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

irqchip: Make irqchip_init() usable on pure ACPI systems

Pure ACPI systems (e.g., LoongArch) do not need OF_IRQ, but still
require irqchip_init() to perform the ACPI irqchip probing,
even when OF_IRQ isn't selected.

Relax the dependency to enable the generic irqchip support when
ACPI_GENERIC_GSI is configured.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn>
[maz: revamped commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220927124557.3246737-1-chenhuacai@loongson.cn

authored by

Huacai Chen and committed by
Marc Zyngier
612d5494 b90cb105

+5 -3
+1 -1
drivers/irqchip/Kconfig
··· 3 3 4 4 config IRQCHIP 5 5 def_bool y 6 - depends on OF_IRQ 6 + depends on (OF_IRQ || ACPI_GENERIC_GSI) 7 7 8 8 config ARM_GIC 9 9 bool
+4 -2
include/linux/of_irq.h
··· 37 37 extern int of_irq_to_resource(struct device_node *dev, int index, 38 38 struct resource *r); 39 39 40 - extern void of_irq_init(const struct of_device_id *matches); 41 - 42 40 #ifdef CONFIG_OF_IRQ 41 + extern void of_irq_init(const struct of_device_id *matches); 43 42 extern int of_irq_parse_one(struct device_node *device, int index, 44 43 struct of_phandle_args *out_irq); 45 44 extern int of_irq_count(struct device_node *dev); ··· 56 57 extern void of_msi_configure(struct device *dev, struct device_node *np); 57 58 u32 of_msi_map_id(struct device *dev, struct device_node *msi_np, u32 id_in); 58 59 #else 60 + static inline void of_irq_init(const struct of_device_id *matches) 61 + { 62 + } 59 63 static inline int of_irq_parse_one(struct device_node *device, int index, 60 64 struct of_phandle_args *out_irq) 61 65 {