aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorYun Wu <wuyun.wu@huawei.com>2015-03-06 16:37:47 +0000
committerJason Cooper <jason@lakedaemon.net>2015-03-08 05:34:12 +0000
commit790b57aed156d22d6c7101a37adc78a621be1167 (patch)
treeaff7a38a50813e24433f7058c6f206891b3e8948 /drivers/irqchip
parentirqchip: gicv3-its: Zero itt before handling to hardware (diff)
downloadlinux-dev-790b57aed156d22d6c7101a37adc78a621be1167.tar.xz
linux-dev-790b57aed156d22d6c7101a37adc78a621be1167.zip
irqchip: gicv3-its: Use 64KB page as default granule
The field of page size in register GITS_BASERn might be read-only if an implementation only supports a single, fixed page size. But currently the ITS driver will throw out an error when PAGE_SIZE is less than the minimum size supported by an ITS. So addressing this problem by using 64KB pages as default granule for all the ITS base tables. Acked-by: Marc Zyngier <marc.zyngier@arm.com> [maz: fixed bug breaking non Device Table allocations] 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-9-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 69eeea3e7fac..0fe25a97a5a9 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -800,14 +800,14 @@ static int its_alloc_tables(struct its_node *its)
{
int err;
int i;
- int psz = PAGE_SIZE;
+ int psz = SZ_64K;
u64 shr = GITS_BASER_InnerShareable;
for (i = 0; i < GITS_BASER_NR_REGS; i++) {
u64 val = readq_relaxed(its->base + GITS_BASER + i * 8);
u64 type = GITS_BASER_TYPE(val);
u64 entry_size = GITS_BASER_ENTRY_SIZE(val);
- int order = 0;
+ int order = get_order(psz);
int alloc_size;
u64 tmp;
void *base;