From c3a2771780c044f40d4deac3ad7a3419b607b1b2 Mon Sep 17 00:00:00 2001 From: Red Bear OS Date: Fri, 24 Jul 2026 09:48:28 +0900 Subject: [PATCH] acpi-rs/acpid: fix broken initialize_namespace + wire _REG connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 0c11c2b5 captured a broken intermediate edit of initialize_namespace (unterminated comment, missing _INI and the _REG hook) via git add -A, which left the tree not compiling. Restore the correct opening (ACPICA init order) and extract the _REG opregion connect into a public connect_op_regions() (ACPICA evrgnini.c): \_SB._REG(space, 1) per installed handler space plus ._REG(space, 1) per device holding an OpRegion of that space. initialize_namespace() delegates to it. Call it from acpid's interpreter init (AmlSymbols::init) after region handlers are installed — runs once before the main loop, so a blocking _REG cannot wedge the scheme. --- drivers/acpid/src/acpi.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpid/src/acpi.rs b/drivers/acpid/src/acpi.rs index 931a857f51..f6e24bb3b2 100644 --- a/drivers/acpid/src/acpi.rs +++ b/drivers/acpid/src/acpi.rs @@ -286,6 +286,9 @@ impl AmlSymbols { for (region, handler) in self.aml_region_handlers.drain(..) { interpreter.install_region_handler(region, handler); } + // _REG opregion connect (ACPICA evrgnini.c): runs once at interpreter + // init, before the main loop, so a blocking _REG cannot wedge the scheme. + interpreter.connect_op_regions(); self.aml_context = Some(interpreter); Ok(()) }