提交 fe41db7b 编写于 作者: W Will Deacon 提交者: Russell King

ARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation

Commit 4294f8ba ("ARM: gic: add irq_domain support") defines irq_start
as irq_start = (irq_start & ~31) + 16; On a platform with a GIC and a
CPU without PPIs, this results in irq_start being off by 16.

This patch fixes gic_init so that we only carve out a PPI space when
PPIs exist for the GIC being initialised.

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: NWill Deacon <will.deacon@arm.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 abdd7b91
...@@ -582,13 +582,16 @@ void __init gic_init(unsigned int gic_nr, int irq_start, ...@@ -582,13 +582,16 @@ void __init gic_init(unsigned int gic_nr, int irq_start,
* For primary GICs, skip over SGIs. * For primary GICs, skip over SGIs.
* For secondary GICs, skip over PPIs, too. * For secondary GICs, skip over PPIs, too.
*/ */
domain->hwirq_base = 32;
if (gic_nr == 0) { if (gic_nr == 0) {
gic_cpu_base_addr = cpu_base; gic_cpu_base_addr = cpu_base;
domain->hwirq_base = 16;
if (irq_start > 0) if ((irq_start & 31) > 0) {
irq_start = (irq_start & ~31) + 16; domain->hwirq_base = 16;
} else if (irq_start != -1)
domain->hwirq_base = 32; irq_start = (irq_start & ~31) + 16;
}
}
/* /*
* Find out how many interrupts are supported. * Find out how many interrupts are supported.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册