summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorYun Wu <wuyun.wu@huawei.com>2015-03-06 16:37:48 +0000
committerJason Cooper <jason@lakedaemon.net>2015-03-08 05:34:21 +0000
commit1d27704a26313b9ed7463d4bfc6eda29e2bb3180 (patch)
tree0bee2accab7a2a6f13322c685ae639e45ec71e0f /drivers/irqchip
parent790b57aed156d22d6c7101a37adc78a621be1167 (diff)
downloadlinux-stable-1d27704a26313b9ed7463d4bfc6eda29e2bb3180.tar.gz
linux-stable-1d27704a26313b9ed7463d4bfc6eda29e2bb3180.tar.bz2
linux-stable-1d27704a26313b9ed7463d4bfc6eda29e2bb3180.zip
irqchip: gicv3-its: Add limitation to page order
When required size of Device Table is out of the page allocator's capability, the whole ITS will fail in probing. This actually is not the hardware's problem and is mainly a limitation of the kernel page allocator. This patch will keep ITS going on to the next initializaion stage with an explicit warning. Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Yun Wu <wuyun.wu@huawei.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Link: https://lkml.kernel.org/r/1425659870-11832-10-git-send-email-marc.zyngier@arm.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-gic-v3-its.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 0fe25a97a5a9..ec20d4a942e0 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -828,6 +828,11 @@ static int its_alloc_tables(struct its_node *its)
u32 ids = GITS_TYPER_DEVBITS(typer);
order = get_order((1UL << ids) * entry_size);
+ if (order >= MAX_ORDER) {
+ order = MAX_ORDER - 1;
+ pr_warn("%s: Device Table too large, reduce its page order to %u\n",
+ its->msi_chip.of_node->full_name, order);
+ }
}
alloc_size = (1 << order) * PAGE_SIZE;