public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] s390: do not use _local_bh_enable()
@ 2007-02-23  6:14 Ingo Molnar
  2007-02-23  9:36 ` Heiko Carstens
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2007-02-23  6:14 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: linux-kernel, Thomas Gleixner


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@elte.hu>

_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@elte.hu>
---
 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;
 }
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-23 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-23  6:14 [patch] s390: do not use _local_bh_enable() Ingo Molnar
2007-02-23  9:36 ` Heiko Carstens
2007-02-23 13:41   ` Martin Schwidefsky
2007-02-23 14:04     ` Ingo Molnar
2007-02-23 14:20       ` Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox