From patchwork Wed Sep 18 09:28:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 20383 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 AC49E246E9 for ; Wed, 18 Sep 2013 09:31:43 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id r5sf6948249qcx.8 for ; Wed, 18 Sep 2013 02:31:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=l+uchq7/a2RxgBmsz9Lrnb6WGDbn/9u5Vu6N17DU6dY=; b=Y97BSrL83Hz3Pp+rACKOtVqibWW9UqQGLr+kEGOFF8DGxNdP/lPiy9VziqgfEVC+1k vjh7Zv0wjEyfcBRfxUDmsGS7QMPF9z8m66OC1YwYp2usvKORSzMiFBJyiqOHPsPRZE5F +rPZQoKF+e7frm4HuaB4bzIJ/IMUU7yBGNL/dtyAfY27BcJihmmcDNmMfouZziLc05y2 9KVXQGZUit222kOey0HozXxJEnGwr1uyTJzxCZ/yf4wP+j7v9YjI8G/zEfJRFjLvSGVP ziiPV9gUkfF9GpO5p3t6RyzXKhBPpd/WWjxLxjuyYnLp7Y/N87emlJrTyciEbxTPZCO1 0JSg== X-Gm-Message-State: ALoCoQnp1Ej10ftKV0FzeLMFMj65nHT2LXM+IexJbx5PNjK83c9x2wiJLcBNHakD9rWt/vrpV54g X-Received: by 10.236.45.102 with SMTP id o66mr6040547yhb.47.1379496702953; Wed, 18 Sep 2013 02:31:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.130 with SMTP id g2ls3184992qek.99.gmail; Wed, 18 Sep 2013 02:31:42 -0700 (PDT) X-Received: by 10.58.74.38 with SMTP id q6mr21094200vev.9.1379496702692; Wed, 18 Sep 2013 02:31:42 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id sc5si235881vdc.74.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 02:31:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id hz10so5183454vcb.12 for ; Wed, 18 Sep 2013 02:31:42 -0700 (PDT) X-Received: by 10.220.249.67 with SMTP id mj3mr1114987vcb.23.1379496702541; Wed, 18 Sep 2013 02:31:42 -0700 (PDT) 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 u4csp207913vcz; Wed, 18 Sep 2013 02:31:41 -0700 (PDT) X-Received: by 10.66.221.8 with SMTP id qa8mr992481pac.188.1379496700916; Wed, 18 Sep 2013 02:31:40 -0700 (PDT) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id lp9si2392027pab.250.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 02:31:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.220.54; Received: by mail-pa0-f54.google.com with SMTP id kx10so8036713pab.13 for ; Wed, 18 Sep 2013 02:31:40 -0700 (PDT) X-Received: by 10.68.135.35 with SMTP id pp3mr1853914pbb.190.1379496700404; Wed, 18 Sep 2013 02:31:40 -0700 (PDT) Received: from [192.168.204.184] ([218.17.215.175]) by mx.google.com with ESMTPSA id 7sm3590037paf.22.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 02:31:39 -0700 (PDT) Message-ID: <52397239.9080606@linaro.org> Date: Wed, 18 Sep 2013 17:28:25 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: "Moore, Robert" CC: "'Rafael J. Wysocki'" , 'Len Brown' , "Box, David E" , "Zheng, Lv" , "'linux-acpi@vger.kernel.org'" , "'patches@linaro.org'" , "'linaro-kernel@lists.linaro.org'" , "'linaro-acpi@lists.linaro.org'" Subject: Re: [PATCH] ACPICA / hwreg: Use acpi_gbl_reduced_hardware to prevent accessing PM registers References: <1379066741-23689-1-git-send-email-hanjun.guo@linaro.org> <94F2FBAB4432B54E8AACC7DFDE6C92E36FEEBC6A@ORSMSX103.amr.corp.intel.com> <94F2FBAB4432B54E8AACC7DFDE6C92E36FEEC15B@ORSMSX103.amr.corp.intel.com> <52366F91.30204@linaro.org> <94F2FBAB4432B54E8AACC7DFDE6C92E36FEEC56A@ORSMSX103.amr.corp.intel.com> In-Reply-To: <94F2FBAB4432B54E8AACC7DFDE6C92E36FEEC56A@ORSMSX103.amr.corp.intel.com> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 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: , On 2013-9-17 1:26, Moore, Robert wrote: > + #define ACPI_REDUCED_HARDWARE TRUE > > The intent of this feature is of course, to remove all code that is not needed -- specifically for hardware-reduced machines where the size of the kernel is important. Ok, how about this patch below, is it reasonable to you? >From b10bc1d2f9a3ff09abfb6990412aa1cf62d56937 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Wed, 18 Sep 2013 17:19:23 +0800 Subject: [PATCH] ACPI: Introduce CONFIG_ACPI_REDUCED_HARDWARE to enable reduced hardware If we want to enable reduced hardware ACPI on some platform (such as ARM), we need to modify the kernel code and set ACPI_REDUCED_HARDWARE to TRUE. This is not reasonable, so introduce a kernel config to enable it, and no need for kernel modification when we use hardware-reduced ACPI. Signed-off-by: Hanjun Guo --- drivers/acpi/Kconfig | 8 ++++++++ include/acpi/acconfig.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 0d7f6eb..1232a7b 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -413,6 +413,14 @@ config ACPI_BGRT data from the firmware boot splash. It will appear under /sys/firmware/acpi/bgrt/ . +config ACPI_REDUCED_HARDWARE + bool "Hardware-reduced ACPI support" + depends on ARM || ARM64 + help + This config adds support for Hardware-reduced ACPI. When this option + is selected, will generate a specialized version of ACPICA that ONLY + supports the ACPI 5.0 "reduced hardware". + source "drivers/acpi/apei/Kconfig" endif # ACPI diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 1c16f82..15254f5 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -100,7 +100,11 @@ * ACPI PM timer * FACS table (Waking vectors and Global Lock) */ +#ifdef CONFIG_ACPI_REDUCED_HARDWARE +#define ACPI_REDUCED_HARDWARE TRUE +#else #define ACPI_REDUCED_HARDWARE FALSE +#endif /* CONFIG_ACPI_REDUCED_HARDWARE */ /****************************************************************************** *