+3
-1
drivers/irqchip/irq-gic-v3-its.c
+3
-1
drivers/irqchip/irq-gic-v3-its.c
···
1439
1439
* The consequence of the above is that allocation is cost is low, but
1440
1440
* freeing is expensive. We assumes that freeing rarely occurs.
1441
1441
*/
1442
+
#define ITS_MAX_LPI_NRBITS 16 /* 64K LPIs */
1442
1443
1443
1444
static DEFINE_MUTEX(lpi_range_lock);
1444
1445
static LIST_HEAD(lpi_range_list);
···
1626
1625
{
1627
1626
phys_addr_t paddr;
1628
1627
1629
-
lpi_id_bits = GICD_TYPER_ID_BITS(gic_rdists->gicd_typer);
1628
+
lpi_id_bits = min_t(u32, GICD_TYPER_ID_BITS(gic_rdists->gicd_typer),
1629
+
ITS_MAX_LPI_NRBITS);
1630
1630
gic_rdists->prop_page = its_allocate_prop_table(GFP_NOWAIT);
1631
1631
if (!gic_rdists->prop_page) {
1632
1632
pr_err("Failed to allocate PROPBASE\n");