[patch] s390: do not use _local_bh_enable()

From: Ingo Molnar
Date: Fri Feb 23 2007 - 01:20:39 EST



Heiko, what do you think about the patch below - is there perhaps some
deeper reason to s390's _local_bh_enable() use that i missed?

Ingo

-------------------------->
Subject: [patch] s390: do not use _local_bh_enable()
From: Ingo Molnar <mingo@xxxxxxx>

_local_bh_enable() enables bhs without invoke_softirqs(), and can thus
cause missed softirq processing. The s390 code seems to have two such
uses of _local_bh_enable().

in cio.c the bh disable/enable pair is superfluous, because
irq_enter()/exit() disables softirqs anyway.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
drivers/s390/char/sclp.c | 2 +-
drivers/s390/cio/cio.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)

Index: linux/drivers/s390/char/sclp.c
===================================================================
--- linux.orig/drivers/s390/char/sclp.c
+++ linux/drivers/s390/char/sclp.c
@@ -407,8 +407,8 @@ sclp_sync_wait(void)
}
local_irq_disable();
__ctl_load(cr0, 0, 0);
- _local_bh_enable();
local_irq_restore(flags);
+ local_bh_enable();
}

EXPORT_SYMBOL(sclp_sync_wait);
Index: linux/drivers/s390/cio/cio.c
===================================================================
--- linux.orig/drivers/s390/cio/cio.c
+++ linux/drivers/s390/cio/cio.c
@@ -140,7 +140,6 @@ cio_tpi(void)
sch = (struct subchannel *)(unsigned long)tpi_info->intparm;
if (!sch)
return 1;
- local_bh_disable();
irq_enter ();
spin_lock(sch->lock);
memcpy (&sch->schib.scsw, &irb->scsw, sizeof (struct scsw));
@@ -148,7 +147,7 @@ cio_tpi(void)
sch->driver->irq(&sch->dev);
spin_unlock(sch->lock);
irq_exit ();
- _local_bh_enable();
+
return 1;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/