From patchwork Fri Jan 10 22:52:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 23125 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1F871216DB for ; Fri, 10 Jan 2014 22:52:41 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id wo20sf18178175obc.1 for ; Fri, 10 Jan 2014 14:52:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=PuIiNd1ijBh4PuQS4qA8PQtd8WyWqIa99ByMRiHwH6s=; b=gHgHo82c5C70f4oBdoxMXJ+fuC55N+sXcvKOptsHy62dENC8jZ7FZfFuWMLf6iOQnD K1XJTEE+0YjrMI9gD1UZzORi606UszabAikQ9ED0KmWpkt1cPCrKdpFVcxFlIEF+aMoi DAGfe2YlfWs3LgCdmJUHXCdhR+dQJoUYOqCEVnR9Nc+k21HRUkEXpXgkEzCagyPivs1S rnorre7y6gcOsut6WEsy+PwcS0MSGS5zyZYocIhFq1teJwKL8mqebBnu0NFJLQ2H22+j grFuvtSP+PR9b55uJ578YaWEdG26L/Iyu/nCO7RIMh0zlFu4/WWzY4GE9xsWRXHTDq8x 0VXw== X-Gm-Message-State: ALoCoQlE0RlWySg5fNzLBmBBqojy2QE304giaEHeLY6RWGnTpigXLboJuXp43Q4ERnJOpRsLSrnc X-Received: by 10.182.111.227 with SMTP id il3mr4579124obb.41.1389394360284; Fri, 10 Jan 2014 14:52:40 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.144 with SMTP id h16ls641605qej.29.gmail; Fri, 10 Jan 2014 14:52:40 -0800 (PST) X-Received: by 10.58.248.198 with SMTP id yo6mr3943963vec.40.1389394360178; Fri, 10 Jan 2014 14:52:40 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id c14si5765785veu.66.2014.01.10.14.52.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Jan 2014 14:52:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so3921012veb.20 for ; Fri, 10 Jan 2014 14:52:40 -0800 (PST) X-Received: by 10.53.13.44 with SMTP id ev12mr8245204vdd.17.1389394360031; Fri, 10 Jan 2014 14:52:40 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp122791ved; Fri, 10 Jan 2014 14:52:39 -0800 (PST) X-Received: by 10.50.43.233 with SMTP id z9mr6260263igl.33.1389394358930; Fri, 10 Jan 2014 14:52:38 -0800 (PST) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) by mx.google.com with ESMTPS id yx9si13995957icb.111.2014.01.10.14.52.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Jan 2014 14:52:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.171 is neither permitted nor denied by best guess record for domain of al.stone@linaro.org) client-ip=209.85.223.171; Received: by mail-ie0-f171.google.com with SMTP id to1so1768943ieb.16 for ; Fri, 10 Jan 2014 14:52:38 -0800 (PST) X-Received: by 10.50.60.4 with SMTP id d4mr6475586igr.14.1389394358657; Fri, 10 Jan 2014 14:52:38 -0800 (PST) Received: from fidelio.ahs3.com (74-93-232-46-Colorado.hfc.comcastbusiness.net. [74.93.232.46]) by mx.google.com with ESMTPSA id a1sm4967226igo.0.2014.01.10.14.52.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2014 14:52:38 -0800 (PST) From: al.stone@linaro.org To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linaro-acpi@lists.linaro.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Al Stone Subject: [PATCH v6 5/6] ACPI: do not map/unmap memory regions for FADT entries in reduced HW mode Date: Fri, 10 Jan 2014 15:52:19 -0700 Message-Id: <1389394340-2680-6-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1389394340-2680-1-git-send-email-al.stone@linaro.org> References: <1389394340-2680-1-git-send-email-al.stone@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: al.stone@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Al Stone Several of the FADT fields are normally kept in specific memory regions. Since these fields are to be ignored in hardware reduced ACPI mode, do not map those addresses when in that mode, and of course do not release the mappings that have not been made. The function acpi_os_initialize() could become a stub in the header file but is left here in case it can be of further use. Signed-off-by: Al Stone --- drivers/acpi/osl.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index c946a3a..7822821 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1778,10 +1778,12 @@ __setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); acpi_status __init acpi_os_initialize(void) { - acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block); - acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block); - acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block); - acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block); + if (!acpi_gbl_reduced_hardware) { + acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block); + acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1b_event_block); + acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe0_block); + acpi_os_map_generic_address(&acpi_gbl_FADT.xgpe1_block); + } return AE_OK; } @@ -1806,10 +1808,12 @@ acpi_status acpi_os_terminate(void) acpi_irq_handler); } - acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe1_block); - acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block); - acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1b_event_block); - acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1a_event_block); + if (!acpi_gbl_reduced_hardware) { + acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe1_block); + acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block); + acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1b_event_block); + acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1a_event_block); + } destroy_workqueue(kacpid_wq); destroy_workqueue(kacpi_notify_wq);