From patchwork Wed Dec 4 21:22:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 22047 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 56E3A23FCB for ; Wed, 4 Dec 2013 21:23:58 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id r5sf8102687qcx.8 for ; Wed, 04 Dec 2013 13:23:58 -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=MZ2azv5un/1QSIe/rhc7k2GtZZqCaaBlxa6+zTAjScM=; b=Xw927F0nYfFrypqYuec3K6t3OvQeQg1cqePL69ZefKJuzhjyNwYhRzUqEInIQZUCzU g7tXF6gIUIum8nEOK4ClapySZrBRj3YcFhC/TP522+dsek6hJ2DH9sTaM6nG7KgiSoVl Ca/f36+4eMkrHhL//bT7xCNaT0v81tUrosjft1c1KJSxZgbaj5Poir6PP7Sm0n3YqbZ6 u6juXwcbjexsbhFRqvLanYZTAHzePdXcco/QD8/4r97aYiKD85Ad5nkK/2Tkzcad2ZFa aMjzwG4b/LoHjMbBwlpZx8fGXhxxgwHl2uoa0jv4YlfqDpBNIvQGsjjDfRyYMuCnRiIa CfHQ== X-Gm-Message-State: ALoCoQlTjfctfGBFswE5b3akUSbDUXTdg4nWfSrg/ZZwGDYiTHfjqyxaMj2uUJ/8hCKgFG5jIvEp X-Received: by 10.236.122.234 with SMTP id t70mr32393812yhh.23.1386192237970; Wed, 04 Dec 2013 13:23:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.70 with SMTP id s6ls509726qen.34.gmail; Wed, 04 Dec 2013 13:23:57 -0800 (PST) X-Received: by 10.221.39.195 with SMTP id tn3mr60235683vcb.2.1386192237837; Wed, 04 Dec 2013 13:23:57 -0800 (PST) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id k10si33321099vca.49.2013.12.04.13.23.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 13:23:57 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.177 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.177; Received: by mail-ve0-f177.google.com with SMTP id db12so12510564veb.22 for ; Wed, 04 Dec 2013 13:23:57 -0800 (PST) X-Received: by 10.220.169.203 with SMTP id a11mr9469352vcz.26.1386192237693; Wed, 04 Dec 2013 13:23:57 -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.220.174.196 with SMTP id u4csp325159vcz; Wed, 4 Dec 2013 13:23:56 -0800 (PST) X-Received: by 10.43.51.65 with SMTP id vh1mr50614928icb.24.1386192173296; Wed, 04 Dec 2013 13:22:53 -0800 (PST) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by mx.google.com with ESMTPS id nh2si10651235icc.117.2013.12.04.13.22.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 13:22:53 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.176 is neither permitted nor denied by best guess record for domain of al.stone@linaro.org) client-ip=209.85.223.176; Received: by mail-ie0-f176.google.com with SMTP id at1so28094412iec.35 for ; Wed, 04 Dec 2013 13:22:23 -0800 (PST) X-Received: by 10.43.170.130 with SMTP id nq2mr2334965icc.69.1386192143159; Wed, 04 Dec 2013 13:22:23 -0800 (PST) Received: from fidelio.ahs3 (74-93-232-46-Colorado.hfc.comcastbusiness.net. [74.93.232.46]) by mx.google.com with ESMTPSA id f5sm6351925igc.4.2013.12.04.13.22.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Dec 2013 13:22:22 -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 v3 5/5] ACPI: do not map/unmap memory regions for FADT entries in reduced HW mode Date: Wed, 4 Dec 2013 14:22:07 -0700 Message-Id: <1386192127-28564-6-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1386192127-28564-1-git-send-email-al.stone@linaro.org> References: <1386192127-28564-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.177 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 613e4a1..3a0bb92 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1776,10 +1776,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; } @@ -1804,10 +1806,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);