Searched hist:f2acc47f4363f14c20f645e48aac98f48259de26 (Results 1 – 2 of 2) sorted by relevance
/haiku/src/add-ons/kernel/bus_managers/acpi/ |
H A D | ACPICAHaiku.cpp | f2acc47f4363f14c20f645e48aac98f48259de26 Wed Dec 06 17:38:28 UTC 2023 Jérôme Duval <jerome.duval@gmail.com> acpi: update AcpiOsAcquireGlobalLock and AcpiOsReleaseGlobalLock
implementations from FreeBSD. Because the argument wasn't volatile, the compiler wasn't considerung reading the lock content. * fix the acquire and release loops: The loop could be exited when any new values were read. Instead the return value should be checked against the old value.
Old x86 gcc2 asm loop in AcpiOsAcquireGlobalLock: 11660: 89 c8 mov %ecx,%eax 11662: f0 0f b1 1a lock cmpxchg %ebx,(%edx) 11666: 39 0a cmp %ecx,(%edx) 11668: 74 f6 je 11660 <AcpiOsAcquireGlobalLock+0x20>
New x86 gcc13 asm loop in AcpiOsAcquireGlobalLock:
4d58: 8b 11 mov (%ecx),%edx 4d5a: 89 d0 mov %edx,%eax 4d5c: 89 d3 mov %edx,%ebx 4d5e: 83 e0 fc and $0xfffffffc,%eax 4d61: 83 cb 03 or $0x3,%ebx 4d64: f6 c2 02 test $0x2,%dl 4d67: 75 05 jne 4d6e <AcpiOsAcquireGlobalLock+0x1e> 4d69: 83 c8 02 or $0x2,%eax 4d6c: 89 c3 mov %eax,%ebx 4d6e: 89 d0 mov %edx,%eax 4d70: f0 0f b1 19 lock cmpxchg %ebx,(%ecx) 4d74: 75 e2 jne 4d58 <AcpiOsAcquireGlobalLock+0x8>
Old x86 gcc2 asm loop in AcpiOsReleaseGlobalLock: 11690: 89 c8 mov %ecx,%eax 11692: f0 0f b1 1a lock cmpxchg %ebx,(%edx) 11696: 39 0a cmp %ecx,(%edx) 11698: 74 f6 je 11690 <AcpiOsReleaseGlobalLock+0x10>
New x86 gcc13 asm loop in AcpiOsReleaseGlobalLock: 4d88: 8b 11 mov (%ecx),%edx 4d8a: 89 d3 mov %edx,%ebx 4d8c: 89 d0 mov %edx,%eax 4d8e: 83 e3 fc and $0xfffffffc,%ebx 4d91: f0 0f b1 19 lock cmpxchg %ebx,(%ecx) 4d95: 75 f1 jne 4d88 <AcpiOsReleaseGlobalLock+0x8>
Change-Id: Ia55ba8666efe8b5c198a01db100b4747b72df4a0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7185 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
/haiku/src/add-ons/kernel/bus_managers/acpi/acpica/include/platform/ |
H A D | achaiku.h | f2acc47f4363f14c20f645e48aac98f48259de26 Wed Dec 06 17:38:28 UTC 2023 Jérôme Duval <jerome.duval@gmail.com> acpi: update AcpiOsAcquireGlobalLock and AcpiOsReleaseGlobalLock
implementations from FreeBSD. Because the argument wasn't volatile, the compiler wasn't considerung reading the lock content. * fix the acquire and release loops: The loop could be exited when any new values were read. Instead the return value should be checked against the old value.
Old x86 gcc2 asm loop in AcpiOsAcquireGlobalLock: 11660: 89 c8 mov %ecx,%eax 11662: f0 0f b1 1a lock cmpxchg %ebx,(%edx) 11666: 39 0a cmp %ecx,(%edx) 11668: 74 f6 je 11660 <AcpiOsAcquireGlobalLock+0x20>
New x86 gcc13 asm loop in AcpiOsAcquireGlobalLock:
4d58: 8b 11 mov (%ecx),%edx 4d5a: 89 d0 mov %edx,%eax 4d5c: 89 d3 mov %edx,%ebx 4d5e: 83 e0 fc and $0xfffffffc,%eax 4d61: 83 cb 03 or $0x3,%ebx 4d64: f6 c2 02 test $0x2,%dl 4d67: 75 05 jne 4d6e <AcpiOsAcquireGlobalLock+0x1e> 4d69: 83 c8 02 or $0x2,%eax 4d6c: 89 c3 mov %eax,%ebx 4d6e: 89 d0 mov %edx,%eax 4d70: f0 0f b1 19 lock cmpxchg %ebx,(%ecx) 4d74: 75 e2 jne 4d58 <AcpiOsAcquireGlobalLock+0x8>
Old x86 gcc2 asm loop in AcpiOsReleaseGlobalLock: 11690: 89 c8 mov %ecx,%eax 11692: f0 0f b1 1a lock cmpxchg %ebx,(%edx) 11696: 39 0a cmp %ecx,(%edx) 11698: 74 f6 je 11690 <AcpiOsReleaseGlobalLock+0x10>
New x86 gcc13 asm loop in AcpiOsReleaseGlobalLock: 4d88: 8b 11 mov (%ecx),%edx 4d8a: 89 d3 mov %edx,%ebx 4d8c: 89 d0 mov %edx,%eax 4d8e: 83 e3 fc and $0xfffffffc,%ebx 4d91: f0 0f b1 19 lock cmpxchg %ebx,(%ecx) 4d95: 75 f1 jne 4d88 <AcpiOsReleaseGlobalLock+0x8>
Change-Id: Ia55ba8666efe8b5c198a01db100b4747b72df4a0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7185 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|