From patchwork Fri Jan 17 18:51:30 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: 3506841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 46771C02DC for ; Fri, 17 Jan 2014 18:52:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BA892017D for ; Fri, 17 Jan 2014 18:52:50 +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 12EE620165 for ; Fri, 17 Jan 2014 18:52:49 +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 1W4EWl-00052i-P2; Fri, 17 Jan 2014 18:52:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W4EWe-0002TW-8b; Fri, 17 Jan 2014 18:52:16 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W4EWa-0002Qv-Kr for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 18:52:13 +0000 Received: by mail-pb0-f46.google.com with SMTP id ma3so4399416pbc.5 for ; Fri, 17 Jan 2014 10:51:41 -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; bh=NUTNGWP5HL5D0wGAYgSBrqEey+H+dA2zZs9KWCUWCRQ=; b=aTL+6rBPEcvs7LbARvtqJJ366RY0Z2LT4A1Q2l/I+43bxnKCBBxGtFlBAfn5rausJr NjpIL+3MSl5n1duBhIk56LRbGZhWWE8cLCrEZ01O5q6LZFbahIxPku5Hz5SFNuXmjnMF 4sMjqCHWmccTYdnxopDJIba9mhveecLJ68EsyjhEaUWNZCLzzrKZiEZchQQF/XDHNg4B IWx3sQpYWpnd+MiOjP3/dpiuocxl6sOAgFmcTqGyQwezZdlKY+vjMASATN2mv5OVSzPp YBca2vnpl79XrUotraMTgK5H94ujhwUgxz0nKksKD1vJ2oxQeUVsuvIM0kDWF4SrxZmk XKTQ== X-Gm-Message-State: ALoCoQnb/Ot9U7EpnlNy4hlbgbCt3Do94WS2XG2AhaQ3AIpkgklwABG7+DQa1bVT7GTWzRpebFRD X-Received: by 10.68.192.131 with SMTP id hg3mr3849025pbc.136.1389984701236; Fri, 17 Jan 2014 10:51:41 -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 xn12sm33291896pac.12.2014.01.17.10.51.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jan 2014 10:51:40 -0800 (PST) From: al.stone@linaro.org To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3] ACPI: introduce CONFIG_ACPI_REDUCED_HARDWARE_ONLY to enable this ACPI mode Date: Fri, 17 Jan 2014 11:51:30 -0700 Message-Id: <1389984690-24251-1-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 1.8.4.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140117_135212_751918_BF1CF7A2 X-CRM114-Status: GOOD ( 13.61 ) X-Spam-Score: -0.1 (/) Cc: Hanjun Guo , 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=-2.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, SUSPICIOUS_RECIPS, UNPARSEABLE_RELAY autolearn=unavailable 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 ACPI hardware reduced mode exists to allow newer platforms to use a simpler form of ACPI that does not require supporting legacy versions of the specification and their associated hardware. This mode was introduced in the ACPI 5.0 specification. To enable the hardware reduced mode of ACPI, we need to set the flag ACPI_REDUCED_HARDWARE to TRUE in the ACPICA source. In order to do that, we introduce a kernel configuration item to enable or disable ACPI_REDUCED_HARDWARE. We can then change the kernel configuration instead of having to modify the kernel source. Introducing this configuration item is based on suggestions from Lv Zheng saying that this does not belong in ACPICA, but rather to the Linux kernel itself. Hence, we introduce this configuration item so that we can make ACPI_REDUCED_HARDWARE configurable. For the details of the discussion, please refer to: http://www.spinics.net/lists/linux-acpi/msg46369.html Changes for v3: -- Minimize the changelog. Changes for v2: -- Changed test for EXPERT to avoid reported Kconfig warning Signed-off-by: Hanjun Guo Signed-off-by: Al Stone --- drivers/acpi/Kconfig | 13 +++++++++++++ include/acpi/platform/aclinux.h | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 4770de5..9fd6a7a 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -343,6 +343,19 @@ config ACPI_BGRT data from the firmware boot splash. It will appear under /sys/firmware/acpi/bgrt/ . +config ACPI_REDUCED_HARDWARE_ONLY + bool "Hardware-reduced ACPI support only" if EXPERT + def_bool n + depends on ACPI + help + This config item changes the way the ACPI code is built. When this + option is selected, the kernel will use a specialized version of + ACPICA that ONLY supports the ACPI "reduced hardware" mode. The + resulting kernel will be smaller but it will also be restricted to + running in ACPI reduced hardware mode ONLY. + + If you are unsure what to do, do not enable this option. + source "drivers/acpi/apei/Kconfig" config ACPI_EXTLOG diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 28f4f4d..7d71f08 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -52,6 +52,12 @@ #ifdef __KERNEL__ +/* Compile for reduced hardware mode only with this kernel config */ + +#ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY +#define ACPI_REDUCED_HARDWARE 1 +#endif + #include #include #include