Messages in this thread | ![/](/images/icornerl.gif) | | From | David Mosberger <> | Date | Tue, 9 Dec 2003 11:03:15 -0800 | Subject | Re: [ACPI] ACPI global lock macros |
| |
>>>>> On Tue, 09 Dec 2003 11:04:05 -0800, Paul Menage <menage@google.com> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |