aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqchip
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-05-31 09:01:59 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2018-07-16 14:22:19 +0100
commit12b2905af183c931bedcab4292c81d3a415e080f (patch)
tree6c3e17b3d69030ff654f77a5d5dbf7df74889ead /include/linux/irqchip
parentirqchip/gic-v3: Expose GICD_TYPER in the rdist structure (diff)
downloadlinux-dev-12b2905af183c931bedcab4292c81d3a415e080f.tar.xz
linux-dev-12b2905af183c931bedcab4292c81d3a415e080f.zip
irqchip/gic-v3-its: Honor hypervisor enforced LPI range
A recent extension to the GIC architecture allows a hypervisor to arbitrarily reduce the number of LPIs available to a guest, no matter what the GIC says about the valid range of IntIDs. Let's factor in this information when computing the number of available LPIs Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/linux/irqchip')
-rw-r--r--include/linux/irqchip/arm-gic-v3.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 396cd99af02f..9d2ea3e907d0 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -73,6 +73,7 @@
#define GICD_TYPER_MBIS (1U << 16)
#define GICD_TYPER_ID_BITS(typer) ((((typer) >> 19) & 0x1f) + 1)
+#define GICD_TYPER_NUM_LPIS(typer) ((((typer) >> 11) & 0x1f) + 1)
#define GICD_TYPER_IRQS(typer) ((((typer) & 0x1f) + 1) * 32)
#define GICD_IROUTER_SPI_MODE_ONE (0U << 31)