Commit graph

1073014 commits

Author SHA1 Message Date
Marc Zyngier
c425060a40 Merge branch irq/aic-pmu into irq/irqchip-next
* irq/aic-pmu:
  : .
  : Prefix branch for the M1 PMU support, adding the required
  : irqchip changes. Shared with the arm64 tree.
  : .
  irqchip/apple-aic: Fix cpumask allocation for FIQs
  irqchip/apple-aic: Move PMU-specific registers to their own include file
  arm64: dts: apple: Add t8303 PMU nodes
  arm64: dts: apple: Add t8103 PMU interrupt affinities
  irqchip/apple-aic: Wire PMU interrupts
  irqchip/apple-aic: Parse FIQ affinities from device-tree
  dt-bindings: apple,aic: Add affinity description for per-cpu pseudo-interrupts
  dt-bindings: apple,aic: Add CPU PMU per-cpu pseudo-interrupts
  dt-bindings: arm-pmu: Document Apple PMU compatible strings

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-03-10 08:59:03 +00:00
Marc Zyngier
dc29812dbc irqchip/apple-aic: Fix cpumask allocation for FIQs
An emparassing typo: allocating a pointer instead of the object
pointed to. No harm done, as the pointer is large enough for
what we are using the object for, but still...

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220310050238.4478-1-guozhengkui@vivo.com
2022-03-10 08:58:34 +00:00
Marc Zyngier
92af5d4790 Merge branch irq/meson-gpio into irq/irqchip-next
* irq/meson-gpio:
  : .
  : Expand meson-gpio support to deal with the new Meson-S4 SoC
  : .
  irqchip/meson-gpio: Add support for meson s4 SoCs
  irqchip/meson-gpio: add select trigger type callback
  irqchip/meson-gpio: support more than 8 channels gpio irq
  dt-bindings: interrupt-controller: New binding for Meson-S4 SoCs

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-03-09 11:21:01 +00:00
Qianggui Song
d6c47d21a0 irqchip/meson-gpio: Add support for meson s4 SoCs
The meson s4 SoCs support 12 gpio irq lines compared with previous
serial chips and have something different, details are as below.

IRQ Number:
- 80:68 13 pins on bank Z
- 67:48 20 pins on bank X
- 47:36 12 pins on bank H
- 35:24 12 pins on bank D
- 23:22 2  pins on bank E
- 21:14 8  pins on bank C
- 13:0  13 pins on bank B

Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
[maz: fixed some W=1 build warnings]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220225055207.1048-5-qianggui.song@amlogic.com
2022-03-09 11:19:56 +00:00
Qianggui Song
be6692b923 irqchip/meson-gpio: add select trigger type callback
Due to some chips may use different registers and offset, provide
a set trigger type call back and add one for old controller.

Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220225055207.1048-4-qianggui.song@amlogic.com
2022-03-04 17:01:04 +00:00
Qianggui Song
cc311074f6 irqchip/meson-gpio: support more than 8 channels gpio irq
Current meson gpio irqchip driver only support 8 channels for gpio irq
line, later chips may have more then 8 channels, so need to modify code
to support more.

Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220225055207.1048-3-qianggui.song@amlogic.com
2022-03-04 17:01:03 +00:00
Qianggui Song
d6a3be863d dt-bindings: interrupt-controller: New binding for Meson-S4 SoCs
Update dt-binding document for GPIO interrupt controller of Meson-S4 SoCs

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220225055207.1048-2-qianggui.song@amlogic.com
2022-03-04 17:01:03 +00:00
Marc Zyngier
8e6958c80e Merge branch irq/misc-5.18 into irq/irqchip-next
* irq/misc-5.18:
  : .
  : Misc irq chip changes for 5.18
  :
  : - GICv3: Relax ordering of previous stores to only include the ISH domain
  :
  : - nvic: Unmap MMIo region on probe failure
  :
  : - xilinx: Switch to GENERIC_IRQ_MULTI_HANDLER when used on microblaze
  : .
  irqchip/xilinx: Switch to GENERIC_IRQ_MULTI_HANDLER
  irqchip/nvic: Release nvic_base upon failure
  irqchip/gic-v3: Use dsb(ishst) to order writes with ICC_SGI1R_EL1 accesses

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-03-04 14:37:32 +00:00
Marc Zyngier
92877b9e74 Merge branch irq/plic-cleanups into irq/irqchip-next
* irq/plic-cleanups:
  : .
  : SiFive PLIC cleanups from Niklas Cassel:
  :
  : - Clarify some of the namings in the driver
  :
  : - Make sure S-mode interrupts are disabled when running in M-mode
  : .
  irqchip/sifive-plic: Disable S-mode IRQs if running in M-mode
  irqchip/sifive-plic: Improve naming scheme for per context offsets

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-03-04 14:37:22 +00:00
Michal Simek
1e364921b0 irqchip/xilinx: Switch to GENERIC_IRQ_MULTI_HANDLER
Register the Xilinx driver as the root interrupt controller using
the GENERIC_IRQ_MULTI_HANDLER API, instead of the arch-specific hack.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
[maz: repainted commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/e6c6595a81f662bf839cee3109d0fa58a596ea47.1646380284.git.michal.simek@xilinx.com
2022-03-04 14:32:57 +00:00
Niklas Cassel
098fdbc353 irqchip/sifive-plic: Disable S-mode IRQs if running in M-mode
When detecting a context for a privilege mode different from the current
running privilege mode, we simply skip to the next context register.

This means that we never clear the S-mode enable bits when running in
M-mode.

On canaan k210, a bunch of S-mode interrupts are enabled by the bootrom.
These S-mode specific interrupts should never trigger, since we never set
the mie.SEIE bit in the parent interrupt controller (riscv-intc).

However, we will be able to see the mip.SEIE bit set as pending.

This isn't a good default when CONFIG_RISCV_M_MODE is set, since in that
case we will never enter a lower privilege mode (e.g. S-mode).

Let's clear the S-mode enable bits when running the kernel in M-mode, such
that we won't have a interrupt pending bit set, which we will never clear.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220302131544.3166154-3-Niklas.Cassel@wdc.com
2022-03-02 13:30:50 +00:00
Niklas Cassel
0d3616bbd0 irqchip/sifive-plic: Improve naming scheme for per context offsets
The PLIC supports a fixed number of contexts (15872).
Each context has fixed register offsets in PLIC.

The number of contexts that we need to initialize depends on the privilege
modes supported by each hart. Therefore, this mapping between PLIC context
registers to hart privilege modes is platform specific, and is currently
supplied via device tree.

For example, canaan,k210 has the following mapping:
Context0: hart0 M-mode
Context1: hart0 S-mode
Context2: hart1 M-mode
Context3: hart1 S-mode

While sifive,fu540 has the following mapping:
Context0: hart0 M-mode
Context1: hart1 M-mode
Context2: hart1 S-mode

Because the number of contexts per hart is not fixed, the names
ENABLE_PER_HART and CONTEXT_PER_HART for the register offsets are quite
confusing and might mislead the reader to think that these are fixed
register offsets per hart.

Rename the offsets to more clearly highlight that these are per PLIC
context and not per hart.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220302131544.3166154-2-Niklas.Cassel@wdc.com
2022-03-02 13:30:50 +00:00
Marc Zyngier
0c8b522d3e Merge branch irq/qcom-pdc-cleanup into irq/irqchip-next
* irq/qcom-pdc-cleanup:
  : .
  : Spring cleanup for the Qualcomm PDC driver, simplifying its
  : use of irq domains, replacing open-coded functionnalities with
  : the core code equivalent, and fixing the dodgy locking.
  : .
  irqchip/qcom-pdc: Drop open coded version of __assign_bit()
  irqchip/qcom-pdc: Fix broken locking
  irqchip/qcom-pdc: Kill qcom_pdc_translate helper
  irqchip/qcom-pdc: Kill non-wakeup irqdomain
  irqchip/qcom-pdc: Kill PDC_NO_PARENT_IRQ

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-03-01 18:21:38 +00:00
Souptick Joarder (HPE)
e414c25e33 irqchip/nvic: Release nvic_base upon failure
smatch warning was reported as below ->

smatch warnings:
drivers/irqchip/irq-nvic.c:131 nvic_of_init()
warn: 'nvic_base' not released on lines: 97.

Release nvic_base upon failure.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Souptick Joarder (HPE) <jrdr.linux@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220218163303.33344-1-jrdr.linux@gmail.com
2022-03-01 10:19:51 +00:00
Marc Zyngier
d2febf6bbe irqchip/qcom-pdc: Drop open coded version of __assign_bit()
The driver uses what looks like an open-coded version of __assign_bit().
Replace it with the real thing.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20220224101226.88373-6-maz@kernel.org
2022-03-01 10:06:25 +00:00
Marc Zyngier
a6aca2f460 irqchip/qcom-pdc: Fix broken locking
pdc_enable_intr() serves as a primitive to qcom_pdc_gic_{en,dis}able,
and has a raw spinlock for mutual exclusion, which is uses with
interruptible primitives.

This means that this critical section can itself be interrupted.
Should the interrupt also be a PDC interrupt, and the endpoint driver
perform an irq_disable() on that interrupt, we end-up in a deadlock.

Fix this by using the irqsave/irqrestore variants of the locking
primitives.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20220224101226.88373-5-maz@kernel.org
2022-03-01 10:06:25 +00:00
Marc Zyngier
d494d088ac irqchip/qcom-pdc: Kill qcom_pdc_translate helper
qcom_pdc_translate() really is nothing but an open coded version
of irq_domain_translate_twocell(). Get rid of it and use the common
version instead.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20220224101226.88373-4-maz@kernel.org
2022-03-01 10:06:24 +00:00
Marc Zyngier
4dc70713dc irqchip/qcom-pdc: Kill non-wakeup irqdomain
A careful look at the way the PDC driver works shows that:

- all interrupts are in the same space
- all interrupts are treated the same

And yet the driver creates two domains based on whether
the interrupt gets mapped directly or from the pinctrl code,
which is obviously a waste of resources.

Kill the non-wakeup domain and unify all the interrupt handling.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220224101226.88373-3-maz@kernel.org
2022-03-01 10:06:24 +00:00
Marc Zyngier
8d4c998919 irqchip/qcom-pdc: Kill PDC_NO_PARENT_IRQ
PDC_NO_PARENT_IRQ is pretty pointless, as all it indicates is
that the PDC terminates the interrupt hierarchy. Which is
exactly the same as not having a mapping in the GIC space.
This is also bad practice to treat the absence of a hwirq
as a hwirq itself.

Just explicitly use the region mapping pointer, and drop
the definition.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20220224101226.88373-2-maz@kernel.org
2022-03-01 10:06:24 +00:00
Barry Song
80e4e1f472 irqchip/gic-v3: Use dsb(ishst) to order writes with ICC_SGI1R_EL1 accesses
A dsb(ishst) barrier should be enough to order previous writes with
the system register generating the SGI, as we only need to guarantee
the visibility of data to other CPUs in the inner shareable domain
before we send the SGI.

A micro-benchmark is written to verify the performance impact on
kunpeng920 machine with 2 sockets, each socket has 2 dies, and
each die has 24 CPUs, so totally the system has 2 * 2 * 24 = 96
CPUs. ~2% performance improvement can be seen by this benchmark.

The code of benchmark module:

 #include <linux/module.h>
 #include <linux/timekeeping.h>

 volatile int data0 ____cacheline_aligned;
 volatile int data1 ____cacheline_aligned;
 volatile int data2 ____cacheline_aligned;
 volatile int data3 ____cacheline_aligned;
 volatile int data4 ____cacheline_aligned;
 volatile int data5 ____cacheline_aligned;
 volatile int data6 ____cacheline_aligned;

 static void ipi_latency_func(void *val)
 {
 }

 static int __init ipi_latency_init(void)
 {
 	ktime_t stime, etime, delta;
 	int cpu, i;
 	int start = smp_processor_id();

 	stime = ktime_get();
 	for ( i = 0; i < 1000; i++)
 		for (cpu = 0; cpu < 96; cpu++) {
 			data0 = data1 = data2 = data3 = data4 = data5 = data6 = cpu;
 			smp_call_function_single(cpu, ipi_latency_func, NULL, 1);
 		}
 	etime = ktime_get();

 	delta = ktime_sub(etime, stime);

 	printk("%s ipi from cpu%d to cpu0-95 delta of 1000times:%lld\n",
 			__func__, start, delta);

 	return 0;
 }
 module_init(ipi_latency_init);

 static void ipi_latency_exit(void)
 {
 }
 module_exit(ipi_latency_exit);

 MODULE_DESCRIPTION("IPI benchmark");
 MODULE_LICENSE("GPL");

run the below commands 10 times on both Vanilla and the kernel with this
patch:
 # taskset -c 0 insmod test.ko
 # rmmod test

The result on vanilla:
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:126757449
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:126784249
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:126177703
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:127022281
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:126184883
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:127374585
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:125778089
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:126974441
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:127357625
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:126228184

The result on the kernel with this patch:
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:124467401
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:123474209
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:123558497
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:122993951
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:122984223
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:123323609
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:124507583
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:123386963
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:123340664
 ipi_latency_init ipi from cpu0 to cpu0-95 delta of 1000times:123285324

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
[maz: tidied up commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220220061910.6155-1-21cnbao@gmail.com
2022-02-21 16:17:02 +00:00
Marc Zyngier
86c12c7386 Merge branch irq/print_chip into irq/irqchip-next
* irq/print_chip:
  : .
  : Convert irqchip drivers that use the .name field as a topology
  : description to the .irq_print_chip callback, which allows the
  : name to be made dymanic. The irq_chip structures are then made
  : 'const' in order to prevent further abuse.
  : .
  irqchip/versatile-fpga: Switch to dynamic chip name output
  irqchip/ts4800: Switch to dynamic chip name output
  irqchip/mvebu-pic: Switch to dynamic chip name output
  irqchip/lpc32xx: Switch to dynamic chip name output
  irqchip/gic: Switch to dynamic chip name output
  genirq/debugfs: Use irq_print_chip() when provided by irqchip
  genirq: Allow irq_chip registration functions to take a const irq_chip
  irqdomain: Let irq_domain_set_{info,hwirq_and_chip} take a const irq_chip

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-15 12:17:50 +00:00
Marc Zyngier
3fb212a042 irqchip/versatile-fpga: Switch to dynamic chip name output
Move the name output to the relevant callback, which allows us
some nice cleanups (mostly owing to the fact that the driver is
now DT only.

We also drop a random include directive from the ftintc010 driver.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220209162607.1118325-8-maz@kernel.org
2022-02-15 11:25:46 +00:00
Marc Zyngier
3344265a26 irqchip/ts4800: Switch to dynamic chip name output
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220209162607.1118325-7-maz@kernel.org
2022-02-15 11:25:46 +00:00
Marc Zyngier
421f16238a irqchip/mvebu-pic: Switch to dynamic chip name output
Instead of overriding the name field, track the corresponding device
and use the relevant callback to output its name.

This allows us to make the irq_chip structure const.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220209162607.1118325-6-maz@kernel.org
2022-02-15 11:25:46 +00:00
Marc Zyngier
365550239f irqchip/lpc32xx: Switch to dynamic chip name output
Instead of overriding the name field with the device name, use
the relevant callback. This allows us to make the irq_chip structure
const.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220209162607.1118325-5-maz@kernel.org
2022-02-15 11:25:46 +00:00
Marc Zyngier
745f1fb91f irqchip/gic: Switch to dynamic chip name output
The last dynamic aspect of the GIC's irq_chip structure is the
name that is associated to it.

Move the output of that name to the relevant callback, which
allows us to do a bit of cleanup and mark the structures const.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220209162607.1118325-4-maz@kernel.org
2022-02-15 11:25:46 +00:00
Marc Zyngier
0a25cb5544 genirq/debugfs: Use irq_print_chip() when provided by irqchip
Since irqchips have the option to implement irq_print_chip, use this
when available to output the irqchip name in debugfs.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220215112154.1360040-1-maz@kernel.org
2022-02-15 11:22:34 +00:00
Marc Zyngier
393e1280f7 genirq: Allow irq_chip registration functions to take a const irq_chip
In order to let a const irqchip be fed to the irqchip layer, adjust
the various prototypes. An extra cast in irq_set_chip()() is required
to avoid a warning.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220209162607.1118325-3-maz@kernel.org
2022-02-15 11:10:21 +00:00
Marc Zyngier
45ec846c1c irqdomain: Let irq_domain_set_{info,hwirq_and_chip} take a const irq_chip
In order to let a const irqchip be fed to the irqchip layer, adjust
the various prototypes. An extra cast in irq_domain_set_hwirq_and_chip()
is required to avoid a warning.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220209162607.1118325-2-maz@kernel.org
2022-02-15 11:10:21 +00:00
Marc Zyngier
add679d2cb Merge branch irq/parent_device into irq/irqchip-next
* irq/parent_device:
  : .
  : Move irq_chip::parent_device to irq_domain::dev to track the
  : PM state of the device implementing the irqchip.
  : .
  genirq: Kill irq_chip::parent_device
  pinctrl: starfive: Move PM device over to irq domain
  pinctrl: npcm: Fix broken references to chip->parent_device
  gpio: tpmx86: Move PM device over to irq domain
  gpio: rcar: Move PM device over to irq domain
  gpio: omap: Move PM device over to irq domain
  gpio: mt7621: Kill parent_device usage
  irqchip/imx-intmux: Move PM device over to irq domain
  irqchip/renesas-irqc: Move PM device over to irq domain
  irqchip/renesas-intc-irqpin: Move PM device over to irq domain
  irqchip/gic: Move PM device over to irq domain
  genirq: Allow the PM device to originate from irq domain

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-10 11:08:24 +00:00
Marc Zyngier
689daef640 Merge branch irq/stm32mp13 into irq/irqchip-next
* irq/stm32mp13:
  : .
  : stm32-exit driver update from Alexandre Torgue:
  :
  : Enhance stm32-exti driver to support STM32MP13 SoC. This SoC uses the same
  : hardware version than STM32MP15. Only EXTI line mapping is changed and
  : following EXTI lines are supported: GPIO, RTC, I2C[1-5], UxART[1-8],
  : USBH_EHCI, USBH_OHCI, USB_OTG, LPTIM[1-5], ETH[1-2].
  : .
  irqchip/stm32-exti: Add STM32MP13 support
  dt-bindings: interrupt-controller: stm32-exti: document st,stm32mp13-exti

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-10 11:08:09 +00:00
Marc Zyngier
beb0622138 genirq: Kill irq_chip::parent_device
Now that noone is using irq_chip::parent_device in the tree, get
rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-13-maz@kernel.org
2022-02-10 11:07:04 +00:00
Marc Zyngier
0d872ed9e2 pinctrl: starfive: Move PM device over to irq domain
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-12-maz@kernel.org
2022-02-10 11:07:04 +00:00
Marc Zyngier
f7e53e2255 pinctrl: npcm: Fix broken references to chip->parent_device
The npcm driver has a bunch of references to the irq_chip parent_device
field, but never sets it.

Fix it by fishing that reference from somewhere else, but it is
obvious that these debug statements were never used. Also remove
an unused field in a local data structure.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-11-maz@kernel.org
2022-02-10 11:07:04 +00:00
Alexandre Torgue
04133bb1e7 irqchip/stm32-exti: Add STM32MP13 support
Enhance stm32-exti driver to support STM32MP13 SoC. This SoC uses the same
hardware version than STM32MP15. Only EXTI line mapping is changed and
following EXTI lines are supported: GPIO, RTC, I2C[1-5], UxART[1-8],
USBH_EHCI, USBH_OHCI, USB_OTG, LPTIM[1-5], ETH[1-2].

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220202140005.860-3-alexandre.torgue@foss.st.com
2022-02-09 13:43:07 +00:00
Alexandre Torgue
d335092933 dt-bindings: interrupt-controller: stm32-exti: document st,stm32mp13-exti
Support of STM32MP13 SoC implies to create a new compatible in order to
manage EXTI/GIC mapping changes.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220202140005.860-2-alexandre.torgue@foss.st.com
2022-02-09 13:42:51 +00:00
Marc Zyngier
924610607f gpio: tpmx86: Move PM device over to irq domain
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-10-maz@kernel.org
2022-02-09 13:36:54 +00:00
Marc Zyngier
373d664b7d gpio: rcar: Move PM device over to irq domain
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-9-maz@kernel.org
2022-02-09 13:36:53 +00:00
Marc Zyngier
989c78f25a gpio: omap: Move PM device over to irq domain
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-8-maz@kernel.org
2022-02-09 13:36:53 +00:00
Marc Zyngier
4b9558f920 gpio: mt7621: Kill parent_device usage
This gpio controller sets the parent_device field, but doesn't have
any runtime PM functionality. Get rid of it.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-7-maz@kernel.org
2022-02-09 13:36:53 +00:00
Marc Zyngier
fb140b9c0f irqchip/imx-intmux: Move PM device over to irq domain
Move the reference to the device over to the irq domain.
This allows the irq_chip structure to be directly used instead
of taking a copy for each instance.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-6-maz@kernel.org
2022-02-09 13:36:53 +00:00
Marc Zyngier
c3ec838e3a irqchip/renesas-irqc: Move PM device over to irq domain
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-5-maz@kernel.org
2022-02-09 13:36:53 +00:00
Marc Zyngier
c2ea6b9b03 irqchip/renesas-intc-irqpin: Move PM device over to irq domain
Move the reference to the device over to the irq domain.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-4-maz@kernel.org
2022-02-09 13:36:44 +00:00
Marc Zyngier
e95f3efdeb irqchip/gic: Move PM device over to irq domain
Move the reference to the GIC device over to the irq domain.
This allows for some localised cleanup.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-3-maz@kernel.org
2022-02-09 13:35:56 +00:00
Marc Zyngier
1f8863bfb5 genirq: Allow the PM device to originate from irq domain
As a preparation to moving the reference to the device used for
runtime power management, add a new 'dev' field to the irqdomain
structure for that exact purpose.

The irq_chip_pm_{get,put}() helpers are made aware of the dual
location via a new private helper.

No functional change intended.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220201120310.878267-2-maz@kernel.org
2022-02-09 13:35:56 +00:00
Marc Zyngier
11db7410cf irqchip/apple-aic: Move PMU-specific registers to their own include file
As we are about to have a PMU driver, move the PMU bits from the AIC
driver into a common include file.

Reviewed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-07 16:00:42 +00:00
Marc Zyngier
0f522efcd7 arm64: dts: apple: Add t8303 PMU nodes
Advertise the two PMU nodes for the t8103 SoC.

Reviewed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-07 16:00:42 +00:00
Marc Zyngier
1852e22b31 arm64: dts: apple: Add t8103 PMU interrupt affinities
The two PMU pseudo interrupts have specific affinities. One set
is affine to the small cores, and the other set affine to the
big ones.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-07 16:00:42 +00:00
Marc Zyngier
c7708816c9 irqchip/apple-aic: Wire PMU interrupts
Add the necessary code to configure and P and E-core PMU interrupts
with their respective affinities. When such an interrupt fires, map
it onto the right pseudo-interrupt.

Reviewed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-07 16:00:42 +00:00
Marc Zyngier
a5e8801202 irqchip/apple-aic: Parse FIQ affinities from device-tree
In order to be able to tell the core IRQ code about the affinity
of the PMU interrupt in later patches, parse the affinities kindly
provided in the device-tree.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2022-02-07 16:00:42 +00:00