From patchwork Sat Oct 6 20:09:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1558891 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 18122DFFEE for ; Sat, 6 Oct 2012 20:10:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751284Ab2JFUKl (ORCPT ); Sat, 6 Oct 2012 16:10:41 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:44996 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923Ab2JFUKj (ORCPT ); Sat, 6 Oct 2012 16:10:39 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so1915621qch.19 for ; Sat, 06 Oct 2012 13:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:reply-to:organization; bh=7UpYXb9w3MEFSLgJCZoQgQn3778HsG3hZ5ca0ty1QuY=; b=fkn/rPlwm4wGJVaWe1dbcxJ73r1eRw7HnITb3YzjhjhagTPFbvQSRBEyzvy8cg/No2 oAbCpgXIHlPvb0hKbisPuaxgiY+AnRjTlhRPTQazoI8YTRy2NpyTYJO2O9vclp9vsL0Y SWBuORQRQLHhPbDAU8k0YMdD6Sqlu59p5+YQ+478wFOlhEZUL/0Tp0Nj+mzW2c72h/dF ziuXYXKzrIGHVLHb+uomLzaDO0GdenCaeZxpSsWO8e/4zw74Y1pfjx9zXgPqmWw5SCtD apHMvFv3nZx9c5u5y8a4sjKg2h1G4/7amecAVRhiSqfYI78JYVdM18Gd9VjR7Dmy9K+h CmjQ== Received: by 10.224.168.83 with SMTP id t19mr22601562qay.8.1349554238549; Sat, 06 Oct 2012 13:10:38 -0700 (PDT) Received: from x980.localdomain6 (pool-74-104-146-186.bstnma.fios.verizon.net. [74.104.146.186]) by mx.google.com with ESMTPS id x19sm13470740qeq.12.2012.10.06.13.10.20 (version=SSLv3 cipher=OTHER); Sat, 06 Oct 2012 13:10:37 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Bob Moore , Feng Tang , Len Brown Subject: [PATCH 02/49] ACPICA: Enable Scope change to root during module-level code execution. Date: Sat, 6 Oct 2012 16:09:23 -0400 Message-Id: <28f538b56d321dd5e027267f8240f06ce045e0aa.1349554105.git.len.brown@intel.com> X-Mailer: git-send-email 1.8.0.rc0.18.gf84667d In-Reply-To: <1349554210-29978-1-git-send-email-lenb@kernel.org> References: <1349554210-29978-1-git-send-email-lenb@kernel.org> In-Reply-To: References: Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore Allows constructs like this: If (XXXX) Scope (\) ... Signed-off-by: Bob Moore Signed-off-by: Feng Tang Signed-off-by: Len Brown --- drivers/acpi/acpica/dswload.c | 14 ++++++++++++++ drivers/acpi/acpica/dswload2.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index 552aa3a..5575100 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -230,6 +230,20 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, walk_state->scope_info->common.value = ACPI_TYPE_ANY; break; + case ACPI_TYPE_METHOD: + + /* + * Allow scope change to root during execution of module-level + * code. Root is typed METHOD during this time. + */ + if ((node == acpi_gbl_root_node) && + (walk_state-> + parse_flags & ACPI_PARSE_MODULE_LEVEL)) { + break; + } + + /*lint -fallthrough */ + default: /* All other types are an error */ diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c index ae71477..89c0114 100644 --- a/drivers/acpi/acpica/dswload2.c +++ b/drivers/acpi/acpica/dswload2.c @@ -230,6 +230,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, walk_state->scope_info->common.value = ACPI_TYPE_ANY; break; + case ACPI_TYPE_METHOD: + + /* + * Allow scope change to root during execution of module-level + * code. Root is typed METHOD during this time. + */ + if ((node == acpi_gbl_root_node) && + (walk_state-> + parse_flags & ACPI_PARSE_MODULE_LEVEL)) { + break; + } + + /*lint -fallthrough */ + default: /* All other types are an error */