From efaed9be998b5ae0afb7458e057e5f4402b43fa0 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Tue, 29 Dec 2015 14:03:08 +0800 Subject: ACPICA: Events: Enhance acpi_ev_execute_reg_method() to ensure no _REG evaluations can happen during OS early boot stages ACPICA commit 31178590dde82368fdb0f6b0e466b6c0add96c57 We can ensure no early _REG evaluations by ensuring the following rules in acpi_ev_execute_reg_method(): 1. If an address space handler is installed during early stage, _REG(CONNECT) evaluations are blocked. This is achieved using acpi_gbl_reg_methods_enabled which is renamed from acpi_gbl_reg_methods_executed. 2. If _REG(CONNECT) has never been evalauted for the region object, _REG(DISCONNECT) evaluations are blocked. This is achieved by a new region object flag: AOPOBJ_REG_CONNECTED. Note that, after applying this patch, we can ensure _REG(DISCONNECT) is always paired to _REG(CONNECT). Lv Zheng Link: https://github.com/acpica/acpica/commit/31178590 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/excreate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/acpi/acpica/excreate.c') diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c index 6a1396e313b1..46be5a276863 100644 --- a/drivers/acpi/acpica/excreate.c +++ b/drivers/acpi/acpica/excreate.c @@ -345,7 +345,8 @@ acpi_ex_create_region(u8 * aml_start, obj_desc->region.node = node; obj_desc->region.handler = NULL; obj_desc->common.flags &= - ~(AOPOBJ_SETUP_COMPLETE | AOPOBJ_OBJECT_INITIALIZED); + ~(AOPOBJ_SETUP_COMPLETE | AOPOBJ_REG_CONNECTED | + AOPOBJ_OBJECT_INITIALIZED); /* Install the new region object in the parent Node */ -- cgit v1.2.3