public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* remove irq_enter()/irq_exit() from hardirq.h
@ 2004-02-27 22:39 David Mosberger
  2004-02-29  0:29 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: David Mosberger @ 2004-02-27 22:39 UTC (permalink / raw)
  To: linux-arch

Recently, Ken Chen discovered a bug in the ia64 kernel which was
caused by irq_exit() calling do_softirq().  It's easy to fix this bug
(move irq_exit() to the correct place), but I'm wondering whether
leaving irq_enter()/irq_exit() in hardirq.h might invite someone to
use it outside of architecture-specific code (which is not the case at
the moment, as far as I can see).  This would be bad because great
care needs to be taken to ensure that do_softirq() gets called from
the right place.  In the case of ia64, there is one and only one place
where it should be called.  Thus, my inclination is to remove the two
functions from hardirq.h and to stick them in the ia64-specific
irq-handling code (irq_ia64.c).

What do others think?

	--david

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

* Re: remove irq_enter()/irq_exit() from hardirq.h
  2004-02-27 22:39 remove irq_enter()/irq_exit() from hardirq.h David Mosberger
@ 2004-02-29  0:29 ` David S. Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2004-02-29  0:29 UTC (permalink / raw)
  To: davidm; +Cc: davidm, linux-arch

On Fri, 27 Feb 2004 14:39:30 -0800
David Mosberger <davidm@napali.hpl.hp.com> wrote:

> but I'm wondering whether
> leaving irq_enter()/irq_exit() in hardirq.h might invite someone to
> use it outside of architecture-specific code (which is not the case at
> the moment, as far as I can see).

I agree with you, it shouldn't be publicly visible.  The s390 guys will
need to do some work as their drivers reference these two routines (ie.
grep under drivers/s390/)

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

* Re: remove irq_enter()/irq_exit() from hardirq.h
@ 2004-03-01 12:14 Martin Schwidefsky
  2004-03-01 19:59 ` David Mosberger
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schwidefsky @ 2004-03-01 12:14 UTC (permalink / raw)
  To: David S. Miller; +Cc: davidm, davidm, linux-arch





> > but I'm wondering whether
> > leaving irq_enter()/irq_exit() in hardirq.h might invite someone to
> > use it outside of architecture-specific code (which is not the case at
> > the moment, as far as I can see).
>
> I agree with you, it shouldn't be publicly visible.  The s390 guys will
> need to do some work as their drivers reference these two routines (ie.
> grep under drivers/s390/)

Well, drivers/s390/cio is not really a driver. The main interrupt function
for i/o interrupts do_IRQ lives in driver/s390/cio/cio.c and not in
arch/s390/kernel/irq.c where you might expect to find it. The irq_enter/
irq_exit pair we just added in the sclp driver can be replaced with
a local_bh_enable/local_bh_disable pair. So we are pretty clean.

blue skies,
   Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com

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

* Re: remove irq_enter()/irq_exit() from hardirq.h
  2004-03-01 12:14 Martin Schwidefsky
@ 2004-03-01 19:59 ` David Mosberger
  0 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2004-03-01 19:59 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: David S. Miller, davidm, davidm, linux-arch

>>>>> On Mon, 1 Mar 2004 13:14:36 +0100, Martin Schwidefsky <schwidefsky@de.ibm.com> said:

  >> > but I'm wondering whether
  >> > leaving irq_enter()/irq_exit() in hardirq.h might invite someone to
  >> > use it outside of architecture-specific code (which is not the case at
  >> > the moment, as far as I can see).
  >> 
  >> I agree with you, it shouldn't be publicly visible.  The s390 guys will
  >> need to do some work as their drivers reference these two routines (ie.
  >> grep under drivers/s390/)

  Martin> Well, drivers/s390/cio is not really a driver. The main
  Martin> interrupt function for i/o interrupts do_IRQ lives in
  Martin> driver/s390/cio/cio.c and not in arch/s390/kernel/irq.c
  Martin> where you might expect to find it. The irq_enter/ irq_exit
  Martin> pair we just added in the sclp driver can be replaced with a
  Martin> local_bh_enable/local_bh_disable pair. So we are pretty
  Martin> clean.

OK, it sounds like there is no good reason to keep them in hardirq.h.
For ia64, I'll move them to irq_ia64.c.  I won't touch other arches,
but for consistency's sake, it probably would be good to do a similar
thing on the other arches.

	--david

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

end of thread, other threads:[~2004-03-01 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-27 22:39 remove irq_enter()/irq_exit() from hardirq.h David Mosberger
2004-02-29  0:29 ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2004-03-01 12:14 Martin Schwidefsky
2004-03-01 19:59 ` David Mosberger

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