From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Rich Felker <dalias@libc.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
Date: Thu, 11 May 2023 09:22:20 +0200 [thread overview]
Message-ID: <3c76bea5e45a5ae9ea58b3ff87f9971955a3a021.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <479a18513b9d8c6e8ccb96093a0f0dd7@kernel.org>
Hi Jason!
On Thu, 2023-05-11 at 07:56 +0100, Marc Zyngier wrote:
> On 2023-05-10 17:33, John Paul Adrian Glaubitz wrote:
> > The initialization function for the J-Core AIC aic_irq_of_init() is
> > currently missing the call to irq_alloc_descs() which allocates and
> > initializes all the IRQ descriptors. Add missing function call and
> > return the error code from irq_alloc_descs() in case the allocation
> > fails.
> >
> > Fixes: 981b58f66cfc ("irqchip/jcore-aic: Add J-Core AIC driver")
> > Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> > ---
> > drivers/irqchip/irq-jcore-aic.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/irqchip/irq-jcore-aic.c
> > b/drivers/irqchip/irq-jcore-aic.c
> > index 5f47d8ee4ae3..b9dcc8e78c75 100644
> > --- a/drivers/irqchip/irq-jcore-aic.c
> > +++ b/drivers/irqchip/irq-jcore-aic.c
> > @@ -68,6 +68,7 @@ static int __init aic_irq_of_init(struct device_node
> > *node,
> > unsigned min_irq = JCORE_AIC2_MIN_HWIRQ;
> > unsigned dom_sz = JCORE_AIC_MAX_HWIRQ+1;
> > struct irq_domain *domain;
> > + int ret;
> >
> > pr_info("Initializing J-Core AIC\n");
> >
> > @@ -100,6 +101,12 @@ static int __init aic_irq_of_init(struct
> > device_node *node,
> > jcore_aic.irq_unmask = noop;
> > jcore_aic.name = "AIC";
> >
> > + ret = irq_alloc_descs(-1, min_irq, dom_sz - min_irq,
> > + of_node_to_nid(node));
> > +
> > + if (ret < 0)
> > + return ret;
> > +
> > domain = irq_domain_add_legacy(node, dom_sz - min_irq, min_irq,
> > min_irq,
> > &jcore_aic_irqdomain_ops,
> > &jcore_aic);
>
> [- Jason]
>
> It really begs the question: how has it ever been working before?
Users already used a locally patched kernel to work around this problem.
> Is there any plan to modernise the port and get it to allocate
> irq_descs on demand, as we do on most architectures?
Yes, there are plans to modernize the port. We're first working on upstreaming
all kinds of patches that have been queuing up over the time.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
next prev parent reply other threads:[~2023-05-11 7:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 16:33 John Paul Adrian Glaubitz
2023-05-11 6:56 ` Marc Zyngier
2023-05-11 7:22 ` John Paul Adrian Glaubitz [this message]
2023-05-11 8:47 ` Marc Zyngier
2023-05-11 9:03 ` John Paul Adrian Glaubitz
2023-05-16 10:06 ` Marc Zyngier
2023-05-16 10:15 ` John Paul Adrian Glaubitz
2023-05-11 14:35 ` Geert Uytterhoeven
2023-05-11 14:47 ` John Paul Adrian Glaubitz
2023-05-12 3:21 ` Rob Landley
2023-06-17 7:02 ` [irqchip: irq/irqchip-next] " irqchip-bot for John Paul Adrian Glaubitz
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=3c76bea5e45a5ae9ea58b3ff87f9971955a3a021.camel@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=dalias@libc.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®