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

Configure Feed

Select the types of activity you want to include in your feed.

irqchip/loongson-liointc: Use architecture register to get coreid

fa84f89395e0 ("irqchip/loongson-liointc: Fix build error for
LoongArch") replaced get_ebase_cpunum with physical processor
id from SMP facilities. However that breaks MIPS non-SMP build
and makes booting from other cores inpossible on non-SMP kernel.

Thus we revert get_ebase_cpunum back and use get_csr_cpuid for
LoongArch.

Fixes: fa84f89395e0 ("irqchip/loongson-liointc: Fix build error for LoongArch")
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220609175242.977-1-jiaxun.yang@flygoat.com

authored by

Jiaxun Yang and committed by
Marc Zyngier
6fac824f e3f056a7

+7 -1
+7 -1
drivers/irqchip/irq-loongson-liointc.c
··· 39 39 40 40 #define LIOINTC_ERRATA_IRQ 10 41 41 42 + #if defined(CONFIG_MIPS) 43 + #define liointc_core_id get_ebase_cpunum() 44 + #else 45 + #define liointc_core_id get_csr_cpuid() 46 + #endif 47 + 42 48 struct liointc_handler_data { 43 49 struct liointc_priv *priv; 44 50 u32 parent_int_map; ··· 63 57 struct liointc_handler_data *handler = irq_desc_get_handler_data(desc); 64 58 struct irq_chip *chip = irq_desc_get_chip(desc); 65 59 struct irq_chip_generic *gc = handler->priv->gc; 66 - int core = cpu_logical_map(smp_processor_id()) % LIOINTC_NUM_CORES; 60 + int core = liointc_core_id % LIOINTC_NUM_CORES; 67 61 u32 pending; 68 62 69 63 chained_irq_enter(chip, desc);