Re: [ACPI] ACPI global lock macros

From: David Mosberger
Date: Tue Dec 09 2003 - 14:04:20 EST


>>>>> On Tue, 09 Dec 2003 11:04:05 -0800, Paul Menage <menage@xxxxxxxxxx> said:

Paul> Grover, Andrew wrote:

>> BTW, i386, x86_64 and ia64 all have this macro, so these all might need
>> to be looked at.


Paul> Yes, it was the differences between the i386 and x86_64
Paul> versions that made me notice this problem. The ia64 version is
Paul> in C, so looks safer. Ideally there would be a common C
Paul> definition - the only arch-specific part should be the locked
Paul> cmpxchg, unless this lock is likely to be taken/released so
Paul> often that it's performance critical.

As far as ia64 is concerned, you could replace ia64_cmpxchg4_acq()
with cmpxchg(). That should just work. Of course, as you point out,
that wouldn't work on x86 UP because of the missing "lock" prefix.
Sounds like you'd need to add something along the lines of
device_atomic_cmpxchg() or something like that...

--david
-
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/