From patchwork Tue Dec 17 00:16:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 22549 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 962A623FC6 for ; Tue, 17 Dec 2013 00:16:57 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 5sf10548227qeb.11 for ; Mon, 16 Dec 2013 16:16:57 -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=UXIE/QMQPFN9G8asGq2kcw40HrJZKOrpuEUqxZ92YbM=; b=Ys8IK2EyYX0dZYRPLDeraB+PzdSOeLqlszz1Zdq2TubineAQbGJP/MD6bQvYDuKq19 JY2qBMHP8ljp8fOb6KK01CDVjbp2Qu6MiJY0Lf42+EfgIsIzbQcm/DeDM5EwFSlrgae6 G3/yCCxoSHcrI196RVjMUNrbpuDKNH+72DVkSFpQmZc6xLgQDGPH9u7895VlNetzcypq E9m47hEgDCp+TfAcP8sPP5jY8vYN+dVJ3o8yT9JMBKeVcG8xLqUJfNKqNMAb1XPAZMxu SuFcbLXRLws64Kky2lmu3wabofxumwbb7VW0waC1t+Z9eem9LH9BkJPq9E0W4qdhXuzk Vfaw== X-Gm-Message-State: ALoCoQk16bZcOzDXTOSzocy5zo/128mN+4r171Siz4KduRl5avHdPRo/uQmkNQp6iaqzc39dWoOA X-Received: by 10.236.125.79 with SMTP id y55mr1311221yhh.53.1387239417489; Mon, 16 Dec 2013 16:16:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.70 with SMTP id s6ls2292546qen.34.gmail; Mon, 16 Dec 2013 16:16:57 -0800 (PST) X-Received: by 10.53.13.199 with SMTP id fa7mr4250427vdd.31.1387239417392; Mon, 16 Dec 2013 16:16:57 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id a6si4364339vdp.117.2013.12.16.16.16.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 16:16:57 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 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.51; Received: by mail-vb0-f51.google.com with SMTP id 11so3590324vbe.24 for ; Mon, 16 Dec 2013 16:16:57 -0800 (PST) X-Received: by 10.52.97.35 with SMTP id dx3mr8103804vdb.18.1387239417288; Mon, 16 Dec 2013 16:16: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 u4csp29246vcz; Mon, 16 Dec 2013 16:16:56 -0800 (PST) X-Received: by 10.43.52.129 with SMTP id vm1mr14528546icb.10.1387239416760; Mon, 16 Dec 2013 16:16:56 -0800 (PST) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by mx.google.com with ESMTPS id gz10si12247482igb.14.2013.12.16.16.16.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 16:16:56 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.180 is neither permitted nor denied by best guess record for domain of al.stone@linaro.org) client-ip=209.85.223.180; Received: by mail-ie0-f180.google.com with SMTP id tp5so7566042ieb.11 for ; Mon, 16 Dec 2013 16:16:56 -0800 (PST) X-Received: by 10.43.49.132 with SMTP id va4mr123054icb.79.1387239416511; Mon, 16 Dec 2013 16:16:56 -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 j3sm12877632igj.9.2013.12.16.16.16.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Dec 2013 16:16:56 -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 v4 5/5] ACPI: do not map/unmap memory regions for FADT entries in reduced HW mode Date: Mon, 16 Dec 2013 17:16:41 -0700 Message-Id: <1387239401-13918-6-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1387239401-13918-1-git-send-email-al.stone@linaro.org> References: <1387239401-13918-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.51 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);