[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H7HY=vT5Z2d2WEt75LYSxEgrf+TSKebt0hjc7qUNhKd9g@mail.gmail.com>
Date: Fri, 10 Jun 2022 12:44:26 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Yupeng Li <liyupeng@...los.com>
Cc: Jiaxun Yang <jiaxun.yang@...goat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <maz@...nel.org>,
"open list:MIPS" <linux-mips@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, caizp2008@....com
Subject: Re: [PATCH 1/1] irqchip/loongson-liointc: Guard uses of cpu_logical_map
Hi, Yupeng,
On Fri, Jun 10, 2022 at 9:20 AM Yupeng Li <liyupeng@...los.com> wrote:
>
> cpu_logical_map is only defined for CONFIG_SMP builds, when we are in an
> UP configuration, the boot CPU is 0. Some kernel compilation error
> information is as follows:
>
> CALL scripts/atomic/check-atomics.sh
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> CC drivers/irqchip/irq-loongson-liointc.o
> drivers/irqchip/irq-loongson-liointc.c: In function 'liointc_chained_handle_irq':
> drivers/irqchip/irq-loongson-liointc.c:60:13: error: implicit declaration of function 'cpu_logical_map' [-Werror=implicit-function-declaration]
> int core = cpu_logical_map(smp_processor_id()) % LIOINTC_NUM_CORES;
> ^~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:249:drivers/irqchip/irq-loongson-liointc.o] error 1
> make[1]: *** [scripts/Makefile.build:466:drivers/irqchip] error 2
This has been fixed by Jiaxun:
https://lore.kernel.org/lkml/20220609175242.977-1-jiaxun.yang@flygoat.com/T/#t
Huacai
>
> Acked-by: Caicai <caizp2008@....com>
> Signed-off-by: Yupeng Li <liyupeng@...los.com>
> ---
> drivers/irqchip/irq-loongson-liointc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
> index aed88857d90f..927e236bf18e 100644
> --- a/drivers/irqchip/irq-loongson-liointc.c
> +++ b/drivers/irqchip/irq-loongson-liointc.c
> @@ -57,7 +57,11 @@ static void liointc_chained_handle_irq(struct irq_desc *desc)
> struct liointc_handler_data *handler = irq_desc_get_handler_data(desc);
> struct irq_chip *chip = irq_desc_get_chip(desc);
> struct irq_chip_generic *gc = handler->priv->gc;
> +#ifdef CONFIG_SMP
> int core = cpu_logical_map(smp_processor_id()) % LIOINTC_NUM_CORES;
> +#else
> + int core = 0;
> +#endif
> u32 pending;
>
> chained_irq_enter(chip, desc);
> --
> 2.34.1
>
Powered by blists - more mailing lists