From patchwork Wed Dec 4 21:22:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 22044 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BA21F23FCB for ; Wed, 4 Dec 2013 21:22:23 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id uo5sf46317077pbc.6 for ; Wed, 04 Dec 2013 13:22:22 -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=95en/K5A7+fd2KwEPUuwM/XS9+HBCKjEhyHBsreAqYg=; b=Q7+0eQOOJpDEOXpJad8ee4Dm/Rk8Zu76IvSI+8gK1so2sZ5PAG1K+MD+E0QG7A/7w/ ig/hjeaHWNsdJ77eYrQHRr9nIYwHJz3z2StT41K78T7kGEbr9W1fyIA/boLYhxihge0p NLL4MFh22Qt7F/WWcRFwRhOvdw0nZVXBu0vtAlqv31MsgF4tfPUIPE8WUnyTxpbgLEHY C2/2AGLKKoTNPIgaU8eZ9/lxn9Tkjf4+GRCkH8AN1XwgfnY1XWtj9KjY2qZGS5oq/9Nb Q+PemyuQxCN7pbgf46JjUMLeFquZOEOazR63B5GGeyi1pedTtkzCMq5sq7INTZSwxdbj aWgA== X-Gm-Message-State: ALoCoQlwSBT9FX8ZxL5oyhZiIbn37YbAI7Mj8gf3CCumm2aNBHIajzsEKYbMHd0ReyhJBKytkHdf X-Received: by 10.66.160.36 with SMTP id xh4mr28395125pab.11.1386192142861; Wed, 04 Dec 2013 13:22:22 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.128.41 with SMTP id nl9ls538561qeb.56.gmail; Wed, 04 Dec 2013 13:22:22 -0800 (PST) X-Received: by 10.52.28.78 with SMTP id z14mr11671vdg.54.1386192142662; Wed, 04 Dec 2013 13:22:22 -0800 (PST) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ph5si33302936veb.128.2013.12.04.13.22.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 13:22:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.171 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.171; Received: by mail-vc0-f171.google.com with SMTP id ik5so12060764vcb.16 for ; Wed, 04 Dec 2013 13:22:22 -0800 (PST) X-Received: by 10.220.47.10 with SMTP id l10mr2151604vcf.32.1386192142479; Wed, 04 Dec 2013 13:22:22 -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 u4csp325059vcz; Wed, 4 Dec 2013 13:22:22 -0800 (PST) X-Received: by 10.50.87.36 with SMTP id u4mr2958053igz.40.1386192141474; Wed, 04 Dec 2013 13:22:21 -0800 (PST) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx.google.com with ESMTPS id i2si4856267igj.58.2013.12.04.13.22.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 13:22:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.178 is neither permitted nor denied by best guess record for domain of al.stone@linaro.org) client-ip=209.85.223.178; Received: by mail-ie0-f178.google.com with SMTP id lx4so28403418iec.9 for ; Wed, 04 Dec 2013 13:22:21 -0800 (PST) X-Received: by 10.42.44.9 with SMTP id z9mr1534873ice.88.1386192138788; Wed, 04 Dec 2013 13:22:18 -0800 (PST) Received: from fidelio.ahs3 (74-93-232-46-Colorado.hfc.comcastbusiness.net. [74.93.232.46]) by mx.google.com with ESMTPSA id f5sm6351925igc.4.2013.12.04.13.22.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Dec 2013 13:22:18 -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 , Hanjun Guo Subject: [PATCH v3 1/5] ACPI: introduce CONFIG_ACPI_REDUCED_HARDWARE to enable this ACPI mode Date: Wed, 4 Dec 2013 14:22:03 -0700 Message-Id: <1386192127-28564-2-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1386192127-28564-1-git-send-email-al.stone@linaro.org> References: <1386192127-28564-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.220.171 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 To enable the hardware reduced mode of ACPI on some platforms (such as ARM), we need to modify the kernel code and set ACPI_REDUCED_HARDWARE to TRUE in the ACPICA source. This can be done more resonably by introducing a kernel config item to enable/disable ACPI_REDUCED_HARDWARE. We can then change the kernel config instead of having to modify the kernel source directly to enable the reduced hardware mode of ACPI. Lv Zheng suggested that this configuration item does not belong in ACPICA, the upstream source for much of the ACPI internals, but rather to the Linux kernel itself. Hence, we introduce this flag 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 Support for X86 in hardware reduced mode is also provided to make it simpler to debug this mode, and to provide for probable use in such products. Hardware reduced mode, despite the name, exists primarily to allow newer platforms to use a much simpler form of ACPI that does not require supporting the legacy of previous versions of the specification, and is likely to be used more often in the near future as a result. Signed-off-by: Hanjun Guo Signed-off-by: Al Stone --- drivers/acpi/Kconfig | 8 ++++++++ include/acpi/platform/aclinux.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 5d92485..66e6bb2 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -343,6 +343,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 X86 || 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 "reduced hardware". + source "drivers/acpi/apei/Kconfig" config ACPI_EXTLOG diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 28f4f4d..a33f502 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -52,6 +52,12 @@ #ifdef __KERNEL__ +/* Compile for reduced hardware mode if requested for this kernel config */ + +#ifdef CONFIG_ACPI_REDUCED_HARDWARE +#define ACPI_REDUCED_HARDWARE 1 +#endif + #include #include #include