acpi-rs/acpid: fix broken initialize_namespace + wire _REG connect
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
<device>._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.
This commit is contained in:
@@ -286,6 +286,9 @@ impl AmlSymbols {
|
|||||||
for (region, handler) in self.aml_region_handlers.drain(..) {
|
for (region, handler) in self.aml_region_handlers.drain(..) {
|
||||||
interpreter.install_region_handler(region, handler);
|
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);
|
self.aml_context = Some(interpreter);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user