Re: gpiolib: check if irqchip already has the irq hook replacements

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

 



On Fri, Sep 14, 2018 at 10:36:39AM +0200, Hans Verkuil wrote:
> Some drivers use a single irqchip for multiple gpiochips. As a result the
> irqchip hooks are overridden for the first gpiochip that was added, but
> for the other gpiochip instances this should not happen again, otherwise
> we would go into an infinite recursion.
> 
> Check for this, but also log a message that the driver should be fixed
> since this is bad practice.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> Tested-by: Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>
> ---
> Ludovic, can you test this with your unmodified driver? In particular I'd
> like to see how many of these messages you get and how they look like in
> the kernel log. I think you should get 4 of these messages.
> 

Hee is the output from a qemu test run (realview-pb-a8, realview_defconfig).

pl061_gpio 10013000.gpio: PL061 GPIO chip @0x10013000 registered
gpio gpiochip1: (10014000.gpio): detected irqchip that is shared with multiple gpiochips: please fix the driver.
pl061_gpio 10014000.gpio: PL061 GPIO chip @0x10014000 registered
gpio gpiochip2: (10015000.gpio): detected irqchip that is shared with multiple gpiochips: please fix the driver.
pl061_gpio 10015000.gpio: PL061 GPIO chip @0x10015000 registered

Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Guenter



[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