From patchwork Wed May 26 02:39:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lin Ming X-Patchwork-Id: 102323 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4Q2eJDX005966 for ; Wed, 26 May 2010 02:40:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933384Ab0EZCkS (ORCPT ); Tue, 25 May 2010 22:40:18 -0400 Received: from mga02.intel.com ([134.134.136.20]:55939 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933070Ab0EZCkR (ORCPT ); Tue, 25 May 2010 22:40:17 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 25 May 2010 19:37:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.53,301,1272870000"; d="scan'208";a="624849447" Received: from minggr.sh.intel.com (HELO [10.239.13.33]) ([10.239.13.33]) by orsmga001.jf.intel.com with ESMTP; 25 May 2010 19:39:54 -0700 Subject: Re: [PATCH] ACPICA: Handle large field apertures. From: Lin Ming To: Alexey Starikovskiy Cc: "Moore, Robert" , Len Brown , "Linux-acpi@vger.kernel.org" In-Reply-To: <20100525105910.2629.76253.stgit@thinkpad> References: <4911F71203A09E4D9981D27F9D830858709F2D04@orsmsx503.amr.corp.intel.com> <20100525105910.2629.76253.stgit@thinkpad> Date: Wed, 26 May 2010 10:39:27 +0800 Message-Id: <1274841567.28455.16.camel@minggr.sh.intel.com> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1 (2.24.1-2.fc10) 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 (demeter.kernel.org [140.211.167.41]); Wed, 26 May 2010 02:40:20 +0000 (UTC) diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c index 95fa502..65cbe39 100644 --- a/source/components/executer/exprep.c +++ b/source/components/executer/exprep.c @@ -511,6 +511,7 @@ AcpiExPrepFieldValue ( ACPI_OPERAND_OBJECT *ObjDesc; ACPI_OPERAND_OBJECT *SecondDesc = NULL; UINT32 Type; + UINT32 AccessByteWidth; ACPI_STATUS Status; @@ -568,8 +569,12 @@ AcpiExPrepFieldValue ( /* allow full data read from EC address space */ if (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) { if (ObjDesc->CommonField.BitLength > 8) { - ObjDesc->CommonField.AccessByteWidth = - ACPI_ROUND_BITS_UP_TO_BYTES(ObjDesc->CommonField.BitLength); + AccessByteWidth = ACPI_ROUND_BITS_UP_TO_BYTES(ObjDesc->CommonField.BitLength); + + /* The max of ObjDesc->CommonField.AccessByteWidth is 0xFF */ + if (!(AccessByteWidth >> 8)) { + ObjDesc->CommonField.AccessByteWidth = AccessByteWidth; + } } }