From e1298752948bf92ef87ce38eb86e64df1d02782f Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 22 Nov 2025 10:12:56 -0700 Subject: [PATCH] Remove unnecessary double evaluation of AML --- acpid/src/acpi.rs | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/acpid/src/acpi.rs b/acpid/src/acpi.rs index 9ddfdb3ab1..90a106dc71 100644 --- a/acpid/src/acpi.rs +++ b/acpid/src/acpi.rs @@ -267,10 +267,6 @@ impl AmlSymbols { &self.symbol_cache } - pub fn parse_table(&mut self, aml: &[u8]) -> Result<(), AmlError> { - self.aml_context.load_table(aml) - } - pub fn lookup(&self, symbol: &str) -> Option { if let Some(description) = self.symbol_cache.get(symbol) { log::trace!("Found symbol in cache, {}, {}", symbol, description); @@ -425,44 +421,9 @@ impl AcpiContext { Fadt::init(&mut this); //TODO (hangs on real hardware): Dmar::init(&this); - AcpiContext::build_aml_context(&this); - this } - fn build_aml_context(acpi: &AcpiContext) { - let mut aml_symbols = acpi.aml_symbols.write(); - - if let Some(dsdt) = acpi.dsdt() { - match aml_symbols.parse_table(dsdt.aml()) { - Ok(_) => log::trace!("Parsed DSDT"), - Err(e) => { - log::error!("DSDT: {:?}", e); - } - } - } else { - log::error!("No DSDT for aml parsing"); - } - - for ssdt in acpi.ssdts() { - match aml_symbols.parse_table(ssdt.aml()) { - Ok(_) => log::trace!("Parsed SSDT"), - Err(e) => { - log::error!("SSDT: {:?}", e); - } - } - } - - if let Ok(mut page_cache) = aml_symbols.page_cache.lock() { - page_cache.clear(); - } else { - log::error!("failed to lock AmlPageCache"); - } - - // force drop of page_cache from the previous if let - {} - } - pub fn dsdt(&self) -> Option<&Dsdt> { self.dsdt.as_ref() }