[S390] cio: ensure single load of irq handler pointer
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 26 Mar 2009 14:24:10 +0000 (15:24 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 26 Mar 2009 14:24:14 +0000 (15:24 +0100)
Add barrier to prevent compiler from reloading pointer to irq handler.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/airq.c

index fe6cea15bbaff371fd9daa9926438bf01480f881..d3850dc30e42e2f24746ea35b2fe967d4968be94 100644 (file)
@@ -133,6 +133,8 @@ void do_adapter_IO(u8 isc)
                while (word) {
                        if (word & INDICATOR_MASK) {
                                airq = airqs[isc][i];
+                               /* Make sure gcc reads from airqs only once. */
+                               barrier();
                                if (likely(airq))
                                        airq->handler(&indicators[isc].byte[i],
                                                      airq->drv_data);