irqchip: mips-gic: SYNC after enabling GIC region
authorJames Hogan <james.hogan@imgtec.com>
Sun, 13 Aug 2017 04:36:09 +0000 (21:36 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 30 Aug 2017 12:00:32 +0000 (14:00 +0200)
commita0ffec3d4aff071534d61d8e743562223a0cf8a4
tree64f779488ddb52be1556862b1065603b31f5a8a7
parent1dd71588c2c622d0c8c09a623c6baa39e691cb5e
irqchip: mips-gic: SYNC after enabling GIC region

A SYNC is required between enabling the GIC region and actually trying
to use it, even if the first access is a read, otherwise its possible
depending on the timing (and in my case depending on the precise
alignment of certain kernel code) to hit CM bus errors on that first
access.

Add the SYNC straight after setting the GIC base.

[paul.burton@imgtec.com:
  Changes later in this series increase our likelihood of hitting this
  by reducing the amount of code that runs between enabling the GIC &
  accessing it.]

Fixes: a7057270c280 ("irqchip: mips-gic: Add device-tree support")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17019/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/irqchip/irq-mips-gic.c