[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 fe6cea1..d3850dc 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);