The default page size of ITS table has been changed to 64KB, but for some platforms the real size of allocate memory which calculated by DEVBITS of register GITS_TYPER may smaller than default size. In this case, psz must be decreased, otherwise, the wrong page number will cause kernel hang. Signed-off-by: Minghuan Lian <Minghuan.Lian@xxxxxxxxxxxxx> --- drivers/irqchip/irq-gic-v3-its.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 596b0a9..d0374a6 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -844,6 +844,9 @@ static int its_alloc_tables(struct its_node *its) its->tables[i] = base; + while (alloc_size < psz) + psz = psz >> 1; + retry_baser: val = (virt_to_phys(base) | (type << GITS_BASER_TYPE_SHIFT) | -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html