public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
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:47:12 +0100	[thread overview]
Message-ID: <86zg6bmezz.wl-maz@kernel.org> (raw)
In-Reply-To: <3c76bea5e45a5ae9ea58b3ff87f9971955a3a021.camel@physik.fu-berlin.de>

On Thu, 11 May 2023 08:22:20 +0100,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
> 
> 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.

You're not answering my question. Does it mean JCore never worked
upstream?

> > 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.

I'd rather you skip that step and focus on making it work as a modern
architecture. This really looks like ARM circa 2007... :-/

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2023-05-11  8:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 16:33 [PATCH] irqchip/jcore-aic: Fix missing allocation of IRQ descriptors John Paul Adrian Glaubitz
2023-05-11  6:56 ` Marc Zyngier
2023-05-11  7:22   ` John Paul Adrian Glaubitz
2023-05-11  8:47     ` Marc Zyngier [this message]
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=86zg6bmezz.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=dalias@libc.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.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