From patchwork Fri Oct 22 08:27:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lin Ming X-Patchwork-Id: 273441 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9M8UMCf002205 for ; Fri, 22 Oct 2010 08:30:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754001Ab0JVIaV (ORCPT ); Fri, 22 Oct 2010 04:30:21 -0400 Received: from mga02.intel.com ([134.134.136.20]:23315 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751838Ab0JVIaU (ORCPT ); Fri, 22 Oct 2010 04:30:20 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 22 Oct 2010 01:30:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.58,222,1286175600"; d="scan'208";a="566412929" Received: from minggr.sh.intel.com (HELO [10.239.13.26]) ([10.239.13.26]) by orsmga002.jf.intel.com with ESMTP; 22 Oct 2010 01:30:17 -0700 Subject: [PATCH] ACPICA: Fix Scope() op in module level code From: Lin Ming To: lenb Cc: "Moore, Robert" , linux-acpi , tony@awtrey.com, john.floyd@environment.nsw.gov.au Date: Fri, 22 Oct 2010 16:27:02 +0800 Message-ID: <1287736022.6530.3216.camel@minggr.sh.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 22 Oct 2010 08:30:24 +0000 (UTC) diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c index d555b37..6b0b5d0 100644 --- a/drivers/acpi/acpica/dswexec.c +++ b/drivers/acpi/acpica/dswexec.c @@ -300,10 +300,25 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state, * we must enter this object into the namespace. The created * object is temporary and will be deleted upon completion of * the execution of this method. + * + * Note 10/2010: Except for the Scope() op. This opcode does + * not actually create a new object, it refers to an existing + * object. However, for Scope(), we want to indeed open a + * new scope. */ - status = acpi_ds_load2_begin_op(walk_state, NULL); + if (op->common.aml_opcode != AML_SCOPE_OP) { + status = + acpi_ds_load2_begin_op(walk_state, NULL); + } else { + status = + acpi_ds_scope_stack_push(op->named.node, + op->named.node-> + type, walk_state); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + } } - break; case AML_CLASS_EXECUTE: