[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H4m+Wzc-E=owWo34hYBa8fHKQG_uBAw4y4mCFUXEfge0g@mail.gmail.com>
Date: Fri, 19 Aug 2022 16:39:57 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Yupeng Li <liyupeng@...los.com>
Cc: WANG Xuerui <kernel@...0n.name>,
Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <maz@...nel.org>, loongarch@...ts.linux.dev,
LKML <linux-kernel@...r.kernel.org>, Caicai <caizp2008@....com>
Subject: Re: [PATCH 1/2] irqchip: Fixed LoongArch CPU interrupt types defined.
Hi, Yupeng,
This errors can be fixed once this patch be merged:
https://lore.kernel.org/lkml/20220808085319.3350111-1-chenhuacai@loongson.cn/
Huacai
On Fri, Aug 19, 2022 at 3:23 PM Yupeng Li <liyupeng@...los.com> wrote:
>
> When CONFIG_LOONGSON_LIOINTC,CONFIG_LOONGSON_EIOINTC,
> CONFIG_LOONGSON_PCH_LPC,CONFIG_LOONGSON_PCH_PIC was disabled,
> build kernel with errors like:
>
> MODPOST vmlinux.symvers
> MODINFO modules.builtin.modinfo
> GEN modules.builtin
> LD .tmp_vmlinux.kallsyms1
> loongarch64-linux-gnu-ld: drivers/irqchip/irq-loongarch-cpu.o: in function `lpic_get_gsi_domain_id':
> irq-loongarch-cpu.c:(.text+0x8): undefined reference to `pch_lpc_handle'
> loongarch64-linux-gnu-ld: irq-loongarch-cpu.c:(.text+0xc): undefined reference to `pch_lpc_handle'
> loongarch64-linux-gnu-ld: irq-loongarch-cpu.c:(.text+0xc): undefined reference to `pch_lpc_handle'
> make: *** [Makefile:1171:vmlinux] 错误 1
>
> Reviewed-by: Caicai <caizp2008@....com>
> Signed-off-by: Yupeng Li <liyupeng@...los.com>
> ---
> drivers/irqchip/irq-loongarch-cpu.c | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c
> index 327f3ab62c03..d296f704cbb6 100644
> --- a/drivers/irqchip/irq-loongarch-cpu.c
> +++ b/drivers/irqchip/irq-loongarch-cpu.c
> @@ -27,24 +27,30 @@ static u32 lpic_gsi_to_irq(u32 gsi)
>
> static struct fwnode_handle *lpic_get_gsi_domain_id(u32 gsi)
> {
> +#ifdef CONFIG_LOONGSON_PCH_PIC
> int id;
> +#endif
> struct fwnode_handle *domain_handle = NULL;
>
> switch (gsi) {
> case GSI_MIN_CPU_IRQ ... GSI_MAX_CPU_IRQ:
> +#ifdef CONFIG_LOONGSON_LIOINTC
> if (liointc_handle)
> domain_handle = liointc_handle;
> +#endif
> break;
> -
> case GSI_MIN_LPC_IRQ ... GSI_MAX_LPC_IRQ:
> +#ifdef CONFIG_LOONGSON_PCH_LPC
> if (pch_lpc_handle)
> domain_handle = pch_lpc_handle;
> +#endif
> break;
> -
> case GSI_MIN_PCH_IRQ ... GSI_MAX_PCH_IRQ:
> +#ifdef CONFIG_LOONGSON_PCH_PIC
> id = find_pch_pic(gsi);
> if (id >= 0 && pch_pic_handle[id])
> domain_handle = pch_pic_handle[id];
> +#endif
> break;
> }
>
> @@ -92,6 +98,7 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = {
> .xlate = irq_domain_xlate_onecell,
> };
>
> +#ifdef CONFIG_LOONGSON_LIOINTC
> static int __init
> liointc_parse_madt(union acpi_subtable_headers *header,
> const unsigned long end)
> @@ -100,7 +107,8 @@ liointc_parse_madt(union acpi_subtable_headers *header,
>
> return liointc_acpi_init(irq_domain, liointc_entry);
> }
> -
> +#endif
> +#ifdef CONFIG_LOONGSON_EIOINTC
> static int __init
> eiointc_parse_madt(union acpi_subtable_headers *header,
> const unsigned long end)
> @@ -109,13 +117,17 @@ eiointc_parse_madt(union acpi_subtable_headers *header,
>
> return eiointc_acpi_init(irq_domain, eiointc_entry);
> }
> -
> +#endif
> static int __init acpi_cascade_irqdomain_init(void)
> {
> +#ifdef CONFIG_LOONGSON_LIOINTC
> acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC,
> liointc_parse_madt, 0);
> +#endif
> +#ifdef CONFIG_LOONGSON_EIOINTC
> acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC,
> eiointc_parse_madt, 0);
> +#endif
> return 0;
> }
>
> --
> 2.34.1
>
Powered by blists - more mailing lists