From patchwork Wed Jan 8 00:46:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: al.stone@linaro.org X-Patchwork-Id: 3450961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EAEC59F374 for ; Wed, 8 Jan 2014 00:50:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1665820122 for ; Wed, 8 Jan 2014 00:50:04 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F1D020121 for ; Wed, 8 Jan 2014 00:50:03 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W0hJp-00022L-5b; Wed, 08 Jan 2014 00:48:25 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W0hJX-00008P-EF; Wed, 08 Jan 2014 00:48:07 +0000 Received: from mail-ig0-f173.google.com ([209.85.213.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W0hIz-0008UC-0t for linux-arm-kernel@lists.infradead.org; Wed, 08 Jan 2014 00:47:35 +0000 Received: by mail-ig0-f173.google.com with SMTP id ut6so11767474igb.0 for ; Tue, 07 Jan 2014 16:47:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PuIiNd1ijBh4PuQS4qA8PQtd8WyWqIa99ByMRiHwH6s=; b=UuF0eMaQGIdNr3vfJjM7tQlPWS/g/dHkue0wVM+psSKQRYavSENiYiNXFap0JyivBf XOHlQ/2xpXXiZHHL4OK3beV/n3FMA9JQKdXcRUcKGtuOrrSN8xPFs5BmupM80uu1a5j3 kKIOG0kcqdOf5SokdhVSlY1IXu67quxIZ6S712Oxs8NpAYECr73EtaE++cfqVfs6EQiN IpzfLefSkXXiablMWw9jZUhtIn2o1LtOqrcweQHldUJnBihpfH7Qb9yO0OEJbHsBGznH pH1AdbrcngMkYxZ+ncZdRl/QSyJsERKEoZo6pUXipGg+ku4I7lrBPLUIwZrUwwzhDjBi Lvag== X-Gm-Message-State: ALoCoQkA0Vqe+ZK65L7V61FhUQCfkH9TeM2ORVT+nbbrsx6xB8IiqItH2Msy12M6scKjNvtCyFn5 X-Received: by 10.51.17.11 with SMTP id ga11mr29208835igd.36.1389142028681; Tue, 07 Jan 2014 16:47:08 -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 kt2sm6361770igb.1.2014.01.07.16.47.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 16:47:08 -0800 (PST) From: al.stone@linaro.org To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 5/5] ACPI: do not map/unmap memory regions for FADT entries in reduced HW mode Date: Tue, 7 Jan 2014 17:46:51 -0700 Message-Id: <1389142011-27356-6-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1389142011-27356-1-git-send-email-al.stone@linaro.org> References: <1389142011-27356-1-git-send-email-al.stone@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140107_194733_131286_306465B8 X-CRM114-Status: GOOD ( 11.02 ) X-Spam-Score: -0.1 (/) Cc: patches@linaro.org, Al Stone , linaro-kernel@lists.linaro.org, linaro-acpi@lists.linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);