Commit fa84f893 authored by Huacai Chen's avatar Huacai Chen

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: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 987a3e03
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/irqchip/chained_irq.h> #include <linux/irqchip/chained_irq.h>
#ifdef CONFIG_MIPS
#include <loongson.h> #include <loongson.h>
#else
#include <asm/loongson.h>
#endif
#define LIOINTC_CHIP_IRQ 32 #define LIOINTC_CHIP_IRQ 32
#define LIOINTC_NUM_PARENT 4 #define LIOINTC_NUM_PARENT 4
...@@ -53,7 +57,7 @@ static void liointc_chained_handle_irq(struct irq_desc *desc) ...@@ -53,7 +57,7 @@ static void liointc_chained_handle_irq(struct irq_desc *desc)
struct liointc_handler_data *handler = irq_desc_get_handler_data(desc); struct liointc_handler_data *handler = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc); struct irq_chip *chip = irq_desc_get_chip(desc);
struct irq_chip_generic *gc = handler->priv->gc; struct irq_chip_generic *gc = handler->priv->gc;
int core = get_ebase_cpunum() % LIOINTC_NUM_CORES; int core = cpu_logical_map(smp_processor_id()) % LIOINTC_NUM_CORES;
u32 pending; u32 pending;
chained_irq_enter(chip, desc); chained_irq_enter(chip, desc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment