summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-gic-v2m.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-09-13 12:14:31 +0100
committerThomas Gleixner <tglx@linutronix.de>2015-09-15 17:06:29 +0200
commit12e14066f4835f5ee1ca795f0309415b54c067a9 (patch)
tree59c892804e516258e31b57dbad4d21007f033e00 /drivers/irqchip/irq-gic-v2m.c
parente4084a16bbe07957811c75dfb7c9bf25c5862ba0 (diff)
downloadop-kernel-dev-12e14066f4835f5ee1ca795f0309415b54c067a9.zip
op-kernel-dev-12e14066f4835f5ee1ca795f0309415b54c067a9.tar.gz
irqchip/GIC: Add workaround for aliased GIC400
The GICv2 architecture mandates that the two 4kB GIC regions are contiguous, and on two separate physical pages (so that access to the second page can be trapped by a hypervisor). This doesn't work very well when PAGE_SIZE is 64kB. A relatively common hack^Wway to work around this is to alias each 4kB region over its own 64kB page. Of course in this case, the base address you want to use is not really the begining of the region, but base + 60kB (so that you get a contiguous 8kB region over two distinct pages). Normally, this would be described in DT with a new property, but some HW is already out there, and the firmware makes sure that it will override whatever you put in the GIC node. Duh. And of course, said firmware source code is not available, despite being based on u-boot. The workaround is to detect the case where the CPU interface size is set to 128kB, and verify the aliasing by checking that the ID register for GIC400 (which is the only GIC wired this way so far) is the same at base and base + 0xF000. In this case, we update the GIC base address and let it roll. And if you feel slightly sick by looking at this, rest assured that I do too... Reported-by: Julien Grall <julien.grall@citrix.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: Stuart Yoder <stuart.yoder@freescale.com> Cc: Pavel Fedin <p.fedin@samsung.com> Cc: Jason Cooper <jason@lakedaemon.net> Link: http://lkml.kernel.org/r/1442142873-20213-2-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/irqchip/irq-gic-v2m.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud