22 Jun, 2017

5 commits


10 Mar, 2016

1 commit

  • The of_io_request_and_map() returns a valid pointer in iomem region or
    ERR_PTR(), check for NULL always fails and may cause a NULL pointer
    dereference on error path.

    Fixes: 0e841b04c829 ("irqchip/sunxi-nmi: Switch to of_io_request_and_map() from of_iomap()")
    Signed-off-by: Vladimir Zapolskiy
    Cc: Jason Cooper
    Cc: Marc Zyngier
    Cc: Chen-Yu Tsai
    Cc: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1457486489-10189-1-git-send-email-vz@mleia.com
    Signed-off-by: Thomas Gleixner

    Vladimir Zapolskiy
     

03 Dec, 2015

1 commit


10 Oct, 2015

2 commits

  • Switch to the new of_io_request_and_map() call, so the IO resource is
    properly held, and also shows up in /proc/iomem.

    Signed-off-by: Chen-Yu Tsai
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Jason Cooper
    Cc: Marc Zyngier
    Cc: Maxime Ripard
    Link: http://lkml.kernel.org/r/1444063334-19832-3-git-send-email-wens@csie.org
    Signed-off-by: Thomas Gleixner

    Chen-Yu Tsai
     
  • The device tree node name is typically "interrupt-controller", which is
    rather useless when used in printk messages and irq chip names for
    identification purposes. Use the driver name "sunxi-nmi" instead.

    While at it move the identifier from pr_err() calls to the pr_fmt macro.

    Also remove the "__func__" identifier from the error message in the
    interrupt type setting callback, sunxi_sc_nmi_set_type(). The driver
    name in the pr_fmt macro should be enough.

    Signed-off-by: Chen-Yu Tsai
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Jason Cooper
    Cc: Marc Zyngier
    Cc: Maxime Ripard
    Link: http://lkml.kernel.org/r/1444063334-19832-2-git-send-email-wens@csie.org
    Signed-off-by: Thomas Gleixner

    Chen-Yu Tsai
     

16 Sep, 2015

1 commit

  • Most interrupt flow handlers do not use the irq argument. Those few
    which use it can retrieve the irq number from the irq descriptor.

    Remove the argument.

    Search and replace was done with coccinelle and some extra helper
    scripts around it. Thanks to Julia for her help!

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu

    Thomas Gleixner
     

12 Jul, 2015

3 commits

  • Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
    already have a pointer to corresponding irq_desc.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Bjorn Helgaas
    Cc: Benjamin Herrenschmidt
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Jason Cooper
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Cc: Maxime Ripard
    Link: http://lkml.kernel.org/r/1433391238-19471-11-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • Chained irq handlers usually set up handler data as well. We now have
    a function to set both under irq_desc->lock. Replace the two calls
    with one.

    Search and conversion was done with coccinelle:

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_handler_data(E1, E2) != 0)
    - BUG();
    |
    -irq_set_handler_data(E1, E2);
    )
    -irq_set_chained_handler(E1, E3);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_handler_data(E1, E2) != 0)
    - BUG();
    ...
    |
    -irq_set_handler_data(E1, E2);
    ...
    )
    -irq_set_chained_handler(E1, E3);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    Reported-by: Russell King
    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org

    Thomas Gleixner
     
  • The IRQCHIP_DECLARE macro moved to to 'include/linux/irqchip.h', so
    the local irqchip.h became an empty shell, which solely includes
    include/linux/irqchip.h

    Include the global header in all irqchip drivers instead of the local
    header, so we can remove it.

    Signed-off-by: Joel Porquet
    Cc: vgupta@synopsys.com
    Cc: monstr@monstr.eu
    Cc: ralf@linux-mips.org
    Cc: jason@lakedaemon.net
    Link: http://lkml.kernel.org/r/1882096.X39jVG8e0D@joel-zenbook
    Signed-off-by: Thomas Gleixner

    Joel Porquet
     

08 Jun, 2015

1 commit


09 Nov, 2014

1 commit

  • Pass in the irq_chip_generic struct so we can use different readl/writel
    settings for each irqchip driver, when appropriate. Compute
    (gc->reg_base + reg_offset) in the helper function because this is pretty
    much what all callers want to do anyway.

    Compile-tested using the following configurations:

    at91_dt_defconfig (CONFIG_ATMEL_AIC_IRQ=y)
    sama5_defconfig (CONFIG_ATMEL_AIC5_IRQ=y)
    sunxi_defconfig (CONFIG_ARCH_SUNXI=y)

    tb10x (ARC) is untested.

    Signed-off-by: Kevin Cernekee
    Acked-by: Thomas Gleixner
    Acked-by: Acked-by: Arnd Bergmann
    Link: https://lkml.kernel.org/r/1415342669-30640-3-git-send-email-cernekee@gmail.com
    Signed-off-by: Jason Cooper

    Kevin Cernekee
     

31 Mar, 2014

1 commit

  • It is advisable to disable the NMI before registering the IRQ handler as
    registering the IRQ handler unmasks the IRQ on the GIC, so if U-Boot has
    left the NMI enabled and the NMI pin is active we will immediately get
    an interrupt before any driver has claimed the downstream interrupt of
    the NMI.

    Signed-off-by: Hans de Goede
    Signed-off-by: Carlo Caione
    Cc: maxime.ripard@free-electrons.com
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-sunxi@googlegroups.com
    Link: http://lkml.kernel.org/r/1395939759-11135-3-git-send-email-carlo@caione.org
    Signed-off-by: Thomas Gleixner

    Hans de Goede
     

26 Mar, 2014

1 commit

  • Allwinner A20/A31 SoCs have special registers to control / (un)mask /
    acknowledge NMI. This NMI controller is separated and independent from GIC.
    This patch adds a new irqchip to manage NMI.

    Signed-off-by: Carlo Caione
    Acked-by: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-sunxi@googlegroups.com
    Cc: mark.rutland@arm.com
    Cc: hdegoede@redhat.com
    Link: http://lkml.kernel.org/r/1395256879-8475-2-git-send-email-carlo@caione.org
    Signed-off-by: Thomas Gleixner

    Carlo Caione