From: Len Brown <lenb@kernel.org>
To: linux-acpi@vger.kernel.org
Cc: Lin Ming <ming.m.lin@intel.com>,
Bob Moore <robert.moore@intel.com>,
Len Brown <len.brown@intel.com>
Subject: [PATCH 02/18] ACPICA: Fix to allow region arguments to reference other scopes
Date: Sun, 11 Dec 2011 12:45:33 -0500 [thread overview]
Message-ID: <f2b19261fb47d2512eb5b8ddfc6d2c410d3cb598.1323625426.git.len.brown@intel.com> (raw)
In-Reply-To: <1323625549-10775-1-git-send-email-lenb@kernel.org>
In-Reply-To: <d40ba5ad56e98f9ff96c110a0fd4e8382b82229d.1323625426.git.len.brown@intel.com>
From: Lin Ming <ming.m.lin@intel.com>
Allow referenced objects to be in a different scope.
http://www.acpica.org/bugzilla/show_bug.cgi?id=937
http://marc.info/?l=linux-acpi&m=131636632718222&w=2
ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110112/psargs-359)
ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110112/nsinit-349)
Scope (_SB)
{
Name (RAMB, 0xDF5A1018)
OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000)
}
For above ASL code, we need to save scope node(\_SB) to lookup
the argument node(\_SB.RAMB).
Reported-by: Jim Green <student.northwestern@gmail.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/acpica/acobject.h | 1 +
drivers/acpi/acpica/dsargs.c | 2 +-
drivers/acpi/acpica/excreate.c | 6 ++++++
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
index 1055769..6d276c2 100644
--- a/drivers/acpi/acpica/acobject.h
+++ b/drivers/acpi/acpica/acobject.h
@@ -358,6 +358,7 @@ typedef enum {
*/
struct acpi_object_extra {
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
+ struct acpi_namespace_node *scope_node;
void *region_context; /* Region-specific data */
u8 *aml_start;
u32 aml_length;
diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c
index 8c7b997..634f5b2 100644
--- a/drivers/acpi/acpica/dsargs.c
+++ b/drivers/acpi/acpica/dsargs.c
@@ -384,7 +384,7 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
/* Execute the argument AML */
- status = acpi_ds_execute_arguments(node, node->parent,
+ status = acpi_ds_execute_arguments(node, extra_desc->extra.scope_node,
extra_desc->extra.aml_length,
extra_desc->extra.aml_start);
return_ACPI_STATUS(status);
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index 110711a..8a06dc5 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -330,6 +330,12 @@ acpi_ex_create_region(u8 * aml_start,
region_obj2 = obj_desc->common.next_object;
region_obj2->extra.aml_start = aml_start;
region_obj2->extra.aml_length = aml_length;
+ if (walk_state->scope_info) {
+ region_obj2->extra.scope_node =
+ walk_state->scope_info->scope.node;
+ } else {
+ region_obj2->extra.scope_node = node;
+ }
/* Init the region from the operands */
--
1.7.7.rc0.72.g4b5ea
next prev parent reply other threads:[~2011-12-11 17:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-11 17:45 ACPICA support for ACPI 5.0 Len Brown
2011-12-11 17:45 ` [PATCH 01/18] ACPICA: Update for GCC 4 Len Brown
2011-12-11 17:45 ` Len Brown [this message]
2011-12-11 17:45 ` [PATCH 03/18] ACPICA: Add error msg for unsupported I/O requests (not 8/16/32 bit length) Len Brown
2011-12-11 17:45 ` [PATCH 04/18] ACPICA: Add error msg for Index/Bank field registers out-of-range Len Brown
2011-12-11 17:45 ` [PATCH 05/18] ACPICA: Do not abort table load on invalid space ID Len Brown
2011-12-11 17:45 ` [PATCH 06/18] ACPI 5.0: Basic support for FADT version 5 Len Brown
2011-12-11 17:45 ` [PATCH 07/18] ACPI 5.0: Implement hardware-reduced option Len Brown
2011-12-11 17:45 ` [PATCH 08/18] ACPI 5.0: Add new/changed tables to headers Len Brown
2011-12-11 17:45 ` [PATCH 09/18] ACPI 5.0: New interfaces to allow driver access to AML mutex objects Len Brown
2011-12-11 17:45 ` [PATCH 10/18] ACPI 5.0: Implement Connection() and AccessAs() changes Len Brown
2011-12-11 17:45 ` [PATCH 11/18] ACPI 5.0: Support for GeneralPurposeIo and GenericSerialBus operation region Len Brown
2011-12-11 17:45 ` [PATCH 12/18] ACPI 5.0: Support for all new resource descriptors Len Brown
2011-12-11 17:45 ` [PATCH 13/18] ACPI 5.0: New interface, acpi_get_event_resources Len Brown
2011-12-11 17:45 ` [PATCH 14/18] ACPI 5.0: New interface, acpi_buffer_to_resource Len Brown
2011-12-11 17:45 ` [PATCH 15/18] ACPI 5.0: Add new predefined names Len Brown
2011-12-11 17:45 ` [PATCH 16/18] ACPI 5.0: Allow _AEI method in walk resources Len Brown
2011-12-11 17:45 ` [PATCH 17/18] ACPICA: Clean up Makefile Len Brown
2011-12-11 17:45 ` [PATCH 18/18] ACPICA: Update to version 20111123 Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f2b19261fb47d2512eb5b8ddfc6d2c410d3cb598.1323625426.git.len.brown@intel.com \
--to=lenb@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=robert.moore@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).