lkml.org 
[lkml]   [2009]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch/s390 29/46] cio: ensure single load of irq handler pointer
    From: Heiko Carstens <heiko.carstens@de.ibm.com>

    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 | 2 ++
    1 file changed, 2 insertions(+)

    Index: quilt-2.6/drivers/s390/cio/airq.c
    ===================================================================
    --- quilt-2.6.orig/drivers/s390/cio/airq.c
    +++ quilt-2.6/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);
    --
    blue skies,
    Martin.

    "Reality continues to ruin my life." - Calvin.



    \
     
     \ /
      Last update: 2009-02-25 16:19    [W:0.019 / U:29.452 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site