fix(acpi): end an AML semaphore wait that cannot take its units at once when no SCI is armed, whatever its timeout, where an Acquire or Wait of up to 0xFFFE ms spun that long with nothing able to signal it

This commit is contained in:
Tyler Smith committed 2026-11-15 01:33:02 -05:00
1 parent a76d660b7d
commit c03b43e0d4
1 file changed
+7 -1
+7 -1
View File
@@ -482,7 +482,13 @@ unsafe extern "C" fn wait_semaphore(
if take() {
return AE_OK;
}
if timeout == WAIT_FOREVER && provider.sci.borrow().is_none() {
if timeout == 0 {
return AE_TIME;
}
// Only ACPICA's SCI work, on this one processor, signals a semaphore
// while AML waits: without it no wait, however long, can end, and one
// of 0xFFFE ms (an Acquire or Wait short of forever) would only spin.
if provider.sci.borrow().is_none() {
provider.report(
Gap::Wait,
format_args!("semaphore wait has no interrupt progress source"),