Skip to content

Commit

Permalink
[S390] cio: ensure single load of irq handler pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Mar 26, 2009
1 parent 98c1c68 commit 87fa5af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/s390/cio/airq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 87fa5af

Please sign in to comment.