aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/irqchip/irq-gic-v3-its.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 316a57530f6d..c2df341ff6fa 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1439,6 +1439,7 @@ static struct irq_chip its_irq_chip = {
1439 * The consequence of the above is that allocation is cost is low, but 1439 * The consequence of the above is that allocation is cost is low, but
1440 * freeing is expensive. We assumes that freeing rarely occurs. 1440 * freeing is expensive. We assumes that freeing rarely occurs.
1441 */ 1441 */
1442#define ITS_MAX_LPI_NRBITS 16 /* 64K LPIs */
1442 1443
1443static DEFINE_MUTEX(lpi_range_lock); 1444static DEFINE_MUTEX(lpi_range_lock);
1444static LIST_HEAD(lpi_range_list); 1445static LIST_HEAD(lpi_range_list);
@@ -1625,7 +1626,8 @@ static int __init its_alloc_lpi_tables(void)
1625{ 1626{
1626 phys_addr_t paddr; 1627 phys_addr_t paddr;
1627 1628
1628 lpi_id_bits = GICD_TYPER_ID_BITS(gic_rdists->gicd_typer); 1629 lpi_id_bits = min_t(u32, GICD_TYPER_ID_BITS(gic_rdists->gicd_typer),
1630 ITS_MAX_LPI_NRBITS);
1629 gic_rdists->prop_page = its_allocate_prop_table(GFP_NOWAIT); 1631 gic_rdists->prop_page = its_allocate_prop_table(GFP_NOWAIT);
1630 if (!gic_rdists->prop_page) { 1632 if (!gic_rdists->prop_page) {
1631 pr_err("Failed to allocate PROPBASE\n"); 1633 pr_err("Failed to allocate PROPBASE\n");