[PATCH RFC 0/2] irqchip/gic: Allow the use of SGI interrupts

From: Florian Fainelli
Date: Tue Oct 22 2019 - 20:06:37 EST


Hi all,

Sending this as RFC so as to gather comments on the approach chosen
here. The Broadcom STB mailbox driver and its firmware in EL3 use a
combination of "smc" for inbound (Linux to monitor) and SGI for outbound
(monitor to Linux) signaling. This mailbox driver can be seen here:

https://github.com/ffainelli/linux/commit/17cc97919f4cd2583d67e624273da8b54b44a4a7

(we may switch to the recently proposed standard arm-smc mailbox driver
proposed by Peng Fang, but we would need interrupt notification anyway).

In our downstream kernel, we have hacked the arch/*/kernel/smp.c code to
permit the installation of custom "IPI" handlers, this is obviously
wrong and absolutely not suitable for usptream.

Here, we allow the GIC to recognize SGI interrupt specified in Device
Tree with a new specifier in the first cell (2) and then we let the
mapping and translation occur provided that we are above the NR_IPI
range.

Immediate problems that I am aware of:

- on ARM (32-bit) NR_IPI does not include IPI_CPU_BACKTRACE, so we could
(are) be off by one in our check against NR_IPI

Florian Fainelli (3):
dt-bindings: Define interrupt type for SGI interrupts
irqchip/gic: Allow the use of SGI interrupts

.../interrupt-controller/arm,gic.yaml | 2 +-
drivers/irqchip/irq-gic.c | 41 ++-
.../interrupt-controller/arm-gic.h | 1 +
7 files changed, 313 insertions(+), 16 deletions(-)
create mode 100644 drivers/mailbox/brcmstb-mailbox.c

--
2.17.1