Skip to content

Commit 2c0e838

Browse files
James Hoganralfbaechle
authored andcommitted
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. [[email protected]: 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: a705727 ("irqchip: mips-gic: Add device-tree support") Signed-off-by: James Hogan <[email protected]> Signed-off-by: Paul Burton <[email protected]> Acked-by: Marc Zyngier <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Jason Cooper <[email protected]> Cc: James Hogan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: <[email protected]> # 3.19.x- Patchwork: https://patchwork.linux-mips.org/patch/17019/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent 5af2ed3 commit 2c0e838

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/irqchip/irq-mips-gic.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,11 @@ static int __init gic_of_init(struct device_node *node,
10201020
gic_len = resource_size(&res);
10211021
}
10221022

1023-
if (mips_cm_present())
1023+
if (mips_cm_present()) {
10241024
write_gcr_gic_base(gic_base | CM_GCR_GIC_BASE_GICEN_MSK);
1025+
/* Ensure GIC region is enabled before trying to access it */
1026+
__sync();
1027+
}
10251028
gic_present = true;
10261029

10271030
__gic_init(gic_base, gic_len, cpu_vec, 0, node);

0 commit comments

Comments
 (0)