lkml.org 
[lkml]   [2004]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [ACPI] Re: Linux 2.4.26-rc1 (cmpxchg vs 80386 build)
From
Date
On Thu, 2004-04-01 at 07:29, Maciej W. Rozycki wrote:
> On Wed, 31 Mar 2004, Jamie Lokier wrote:
>
> > > Well, "cmpxchg", "xadd", etc. can be easily emulated with an aid of a
> > > spinlock. With SMP operation included.
> >
> > Nope. Len Brown wrote:
> >
> > > Linux uses this locking mechanism to coordinate shared access
> > > to hardware registers with embedded controllers,
> > > which is true also on uniprocessors too.
> >
> > You can't do that with a spinlock. The embedded controllers would
> > need to know about the spinlock.
>
> Hmm, does it mean we support x86 systems where an iomem resource has to
> be atomically accessible by a CPU and a peripheral controller?

ACPI specifies a location in regular memory that is used to contain the
lock. The lock is used both by the CPU and by the embedded controller
to cover access to shared registers. We don't spin on this lock because
we don't know how long the embedded controller might hold it. Instead
when we fail to acquire it we schedule an event to trigger when the lock
is free.

cheers,
-Len



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

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.700 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site