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 X-Patchwork-Id: 22928 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DA5CF202E0 for ; Wed, 8 Jan 2014 00:47:10 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id m1sf3875872oag.4 for ; Tue, 07 Jan 2014 16:47:10 -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=So+882MHrKoWvZqPCpB6mTKwAq21fH/5onY3TN+8k+9sMhqFi2KR7XI05Avy+UqMW+ r/W8oIQaMZYKleR6OdiYkaQaZf2fhCRu4EKbEnStJPR3rq8I2KqyPTxOBZ7Khtuy1OKH rGN8TkOL2ZUb62Y2S5cnFObgAtGcLc8+hbHlS3Ma77r9G012uxwFd9gWMLUsfHYCs9M0 kBnaIReXXfi71Jsz77G+kGgaOAvMUcxM3K4nJrWQl+Vm0wsBr3yL1zFXRNV+9548xCbl 1/qr5Ii+X6AI6Blg93grm9kGWD6fpnf6AmcGb2aeyCmQ7cERfPeAK5XnjTDiF2rBLvY/ O/Mw== X-Gm-Message-State: ALoCoQk0AzuM0NNkM8cF1RrJu3Jq0uQ0AMIjosxFMMmpKoLeKwinYxE8F5BHKwTx7NIzbxbD07Qs X-Received: by 10.50.49.3 with SMTP id q3mr14574659ign.7.1389142030038; Tue, 07 Jan 2014 16:47:10 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.82 with SMTP id j18ls347915qen.49.gmail; Tue, 07 Jan 2014 16:47:09 -0800 (PST) X-Received: by 10.52.57.194 with SMTP id k2mr29915vdq.41.1389142029898; Tue, 07 Jan 2014 16:47:09 -0800 (PST) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by mx.google.com with ESMTPS id ce7si34919326veb.32.2014.01.07.16.47.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 16:47:09 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.46; Received: by mail-vb0-f46.google.com with SMTP id w20so673048vbb.33 for ; Tue, 07 Jan 2014 16:47:09 -0800 (PST) X-Received: by 10.52.54.66 with SMTP id h2mr6408vdp.62.1389142029685; Tue, 07 Jan 2014 16:47:09 -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 ey3csp192902ved; Tue, 7 Jan 2014 16:47:09 -0800 (PST) X-Received: by 10.50.41.106 with SMTP id e10mr28631747igl.37.1389142028954; Tue, 07 Jan 2014 16:47:08 -0800 (PST) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by mx.google.com with ESMTPS id r6si23725096icy.52.2014.01.07.16.47.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Jan 2014 16:47:08 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.172 is neither permitted nor denied by best guess record for domain of al.stone@linaro.org) client-ip=209.85.223.172; Received: by mail-ie0-f172.google.com with SMTP id u16so580056iet.17 for ; Tue, 07 Jan 2014 16:47:08 -0800 (PST) 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 Cc: linaro-acpi@lists.linaro.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Al Stone 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-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.212.46 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);