From: Marc Zyngier <maz@kernel.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
LKML <linux-kernel@vger.kernel.org>,
"open list:MIPS" <linux-mips@vger.kernel.org>
Subject: Re: [PATCH for-5.19 1/2] irqchip/loongson-liointc: Use architecture register to get coreid
Date: Thu, 09 Jun 2022 17:44:36 +0100 [thread overview]
Message-ID: <877d5p4wi3.wl-maz@kernel.org> (raw)
In-Reply-To: <01dd74cb-b53c-93e3-d27f-57603d348f67@flygoat.com>
On Sat, 04 Jun 2022 14:46:30 +0100,
Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
>
>
>
> 在 2022/6/4 14:18, Huacai Chen 写道:
> > Hi, Jiaxun,
> >
> > On Sat, Jun 4, 2022 at 8:41 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> >> 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>
> >> ---
> >> drivers/irqchip/irq-loongson-liointc.c | 10 +++++++++-
> >> 1 file changed, 9 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
> >> index aed88857d90f..c11cf97bcd1a 100644
> >> --- a/drivers/irqchip/irq-loongson-liointc.c
> >> +++ b/drivers/irqchip/irq-loongson-liointc.c
> >> @@ -39,6 +39,14 @@
> >>
> >> #define LIOINTC_ERRATA_IRQ 10
> >>
> >> +#if defined(CONFIG_MIPS)
> >> +#define liointc_core_id get_ebase_cpunum()
> >> +#elif defined(CONFIG_LOONGARCH)
> >> +#define liointc_core_id get_csr_cpuid()
> >> +#else
> >> +#define liointc_core_id 0
> >> +#endif
> > Thank you for your quick fix. But I think it is better to do like this:
> >
> > #if defined(CONFIG_LOONGARCH)
> > #define liointc_core_id get_csr_cpuid()
> > #else
> > #define liointc_core_id get_ebase_cpunum()
> > #endif
> >
> > Because this driver doesn't depend on COMPILE_TEST, it can only be
> > built under MIPS and LOONGARCH. Moreover, let the else branch be the
> > same as the old behavior looks more reasonable.
> Thanks for the suggestion.
> Will do for v2.
Any update on this? I believe MIPS is still broken.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2022-06-09 16:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-04 12:40 [PATCH for-5.19 1/2] irqchip/loongson-liointc: Use architecture register to get coreid Jiaxun Yang
2022-06-04 12:40 ` [PATCH for-5.19 2/2] loongarch: Mask out higher bits for get_csr_cpuid Jiaxun Yang
2022-06-04 13:11 ` Huacai Chen
2022-06-04 13:18 ` [PATCH for-5.19 1/2] irqchip/loongson-liointc: Use architecture register to get coreid Huacai Chen
2022-06-04 13:46 ` Jiaxun Yang
2022-06-09 16:44 ` Marc Zyngier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d5p4wi3.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).