Browse Source

[S390] cio: ensure single load of irq handler pointer

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>
Heiko Carstens 16 years ago
parent
commit
87fa5af80c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/s390/cio/airq.c

+ 2 - 0
drivers/s390/cio/airq.c

@@ -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);