Re: [PATCH 0/4] Fix the regression for the thunderx gpio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 10, 2020 at 01:40:56PM -0700, Tim Harvey wrote:
> On Wed, Jan 15, 2020 at 2:20 AM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> >
> > On Tue, Jan 14, 2020 at 9:39 AM Kevin Hao <haokexin@xxxxxxxxx> wrote:
> >
> > > Since the commit a7fc89f9d5fc ("gpio: thunderx: Switch to
> > > GPIOLIB_IRQCHIP"), the thunderx gpio doesn't work anymore. I noticed
> > > that you have submitted a patch [1] to fix the " irq_domain_push_irq: -22"
> > > error, but the kernel would panic after applying that fix because the hwirq
> > > passed to the msi irqdomain is still not correct. It seems that we need
> > > more codes to make the thunderx gpio work with the GPIOLIB_IRQCHIP. So I
> > > would prefer to revert the commit a7fc89f9d5fc first to make the thunderx
> > > gpio to work on the 5.4.x and 5.5 at least. We can then do more test for
> > > GPIOLIB_IRQCHIP switching (which the patch 2 ~ 4 do) before merging
> > > them.
> >
> > Thanks a LOT Kevin, and I'm sorry for open coding and breaking this
> > driver so much :/
> >
> > I have applied all four patches for fixes.
> >
> 
> I'm running into an issue with thunderx-gpio when using a gpio as an
> interrupt with an mfd driver I'm working on[1]. The breakage appeared
> with 0d04d0c146786da42c6e68c7d2f09c956c5b5bd3 'gpio: thunderx: Use the
> default parent apis for {request,release}_resources'[2] and occurs
> when irq_chip_request_resources_parent() fails with -ENOSYS. Any ideas
> what happened here... It seems perhaps parent_data got lost?

No, the parent_data doesn't get lost. The reason that -ENOSYS is returned is because
the its_msi_irq_chip (the parent irq chip of thunderx-gpio) doesn't implement the
.irq_request_resources callback. As you can see in the irq_chip_request_resources_parent() code:
    int irq_chip_request_resources_parent(struct irq_data *data)
    {
    	data = data->parent_data;
    
    	if (data->chip->irq_request_resources)
    		return data->chip->irq_request_resources(data);
    
    	return -ENOSYS;
    }

So the commit 0d04d0c14678 does change the logic of the original code and make
the thunderx_gpio_irq_request_resources() return -ENOSYS in a normal case. But
it doesn't matter now since the thunderx_gpio_irq_request_resources() has been
dropped by the patches in this patch series. So your code should work with the latest
code. Could you rebase your code and git it a try?

Thanks,
Kevin


> 
> 1. https://patchwork.kernel.org/patch/11401555/
> 2. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpio/gpio-thunderx.c?id=0d04d0c146786da42c6e68c7d2f09c956c5b5bd3
> 
> Best regards,
> 
> Tim

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux