The tiler irq handler uses engine->async value, but the code that sets
engine->async and enables the interrupt does not have a barrier. This
may cause the irq handler to see the old value of engine->async, causing
memory corruption.
Reported-by: Harinarayan Bhatta <harinarayan@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
/* mark whether it is async to denote list management in IRQ handler */
engine->async = wait ? false : true;
+ /* verify that the irq handler sees the 'async' value */
+ smp_mb();
/* kick reload */
writel(engine->refill_pa,