linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* i8259.c spinlocks unnecessary
@ 2002-06-28 21:29 Cort Dougan
  2002-06-29 13:55 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Cort Dougan @ 2002-06-28 21:29 UTC (permalink / raw)
  To: linuxppc-dev


I looked through the 8259 code and I believe the spinlocks there are
unnecessary.  The code is covered by a spinlock when called from irq.c.

I instrumented the code and after running quite some time my code review
matches what I've seen.

Anyone comment?  Does someone want to remove them?

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: i8259.c spinlocks unnecessary
  2002-06-28 21:29 i8259.c spinlocks unnecessary Cort Dougan
@ 2002-06-29 13:55 ` Benjamin Herrenschmidt
  2002-06-29 14:28   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2002-06-29 13:55 UTC (permalink / raw)
  To: Cort Dougan, linuxppc-dev


>
>I looked through the 8259 code and I believe the spinlocks there are
>unnecessary.  The code is covered by a spinlock when called from irq.c.
>
>I instrumented the code and after running quite some time my code review
>matches what I've seen.
>
>Anyone comment?  Does someone want to remove them?

irc.c don't have a global spinlock, only per-desc locks, so you can well
have one CPU dealing with an incoming interrupt and another CPU doing
a disable/enable_irq() on a different interrupt at the same time for
example. My understanding is that i8259 should be protected against
such races.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: i8259.c spinlocks unnecessary
  2002-06-29 13:55 ` Benjamin Herrenschmidt
@ 2002-06-29 14:28   ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2002-06-29 14:28 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Cort Dougan, linuxppc-dev


>irc.c don't have a global spinlock, only per-desc locks, so you can well
 irq.c

I should sleep more ;)

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2002-06-29 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-28 21:29 i8259.c spinlocks unnecessary Cort Dougan
2002-06-29 13:55 ` Benjamin Herrenschmidt
2002-06-29 14:28   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).