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

irqchip/loongson-liointc: Fix build error for LoongArch

liointc driver is shared by MIPS and LoongArch, this patch adjust the
code to fix build error for LoongArch.

Acked-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

+5 -1
+5 -1
drivers/irqchip/irq-loongson-liointc.c
··· 16 16 #include <linux/smp.h> 17 17 #include <linux/irqchip/chained_irq.h> 18 18 19 + #ifdef CONFIG_MIPS 19 20 #include <loongson.h> 21 + #else 22 + #include <asm/loongson.h> 23 + #endif 20 24 21 25 #define LIOINTC_CHIP_IRQ 32 22 26 #define LIOINTC_NUM_PARENT 4 ··· 57 53 struct liointc_handler_data *handler = irq_desc_get_handler_data(desc); 58 54 struct irq_chip *chip = irq_desc_get_chip(desc); 59 55 struct irq_chip_generic *gc = handler->priv->gc; 60 - int core = get_ebase_cpunum() % LIOINTC_NUM_CORES; 56 + int core = cpu_logical_map(smp_processor_id()) % LIOINTC_NUM_CORES; 61 57 u32 pending; 62 58 63 59 chained_irq_enter(chip, desc);