From patchwork Wed Feb 25 00:36:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 45006 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B10172029F for ; Wed, 25 Feb 2015 00:37:09 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf358215lbv.1 for ; Tue, 24 Feb 2015 16:37:08 -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=G6DlDPs89pAU8gb0YbiFL1/3mAZ9x8/2lbKOQGER7dQ=; b=DSDcfty/0wwAaRhMh507yGvXudMV+v5F8IAkYx5i74KVws4JrlON/CIabOfBzb5LXW KTWOAIz4fQdHV4GhgIa+LVAWXpC48p5jdMDtg/bog5NMOd6STb/j+zdPD+G/vbByhOUd FNLoM+HXJL4zkcXmZBUQZSh98tWz/j5WnWhZzOccCpNLJq6tXioucnbp/g/bg2MORe4z JBO3bJBdAtSgv/pY4HmLDt7CWbgVi8sS6IFs7xqYHtW2/VPn5TRT3vQRFVt3goIsNPt0 Ubea+3xsYCRvgGp1HbL+oZ5JkI4cBZN+2PZiuq6JA+TISJ5opGT4tYdLg3V7ODt0OvoX SQ6A== X-Gm-Message-State: ALoCoQm1H/REHyrm4J1B/Ev6IxFeikc0+TeoDgoerBc/ZgvaQoA9xWXo+BB3LvNW5b18CrGjdqVd X-Received: by 10.112.167.98 with SMTP id zn2mr74046lbb.6.1424824628693; Tue, 24 Feb 2015 16:37:08 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.168 with SMTP id e8ls500592laf.72.gmail; Tue, 24 Feb 2015 16:37:08 -0800 (PST) X-Received: by 10.112.150.161 with SMTP id uj1mr549228lbb.14.1424824628483; Tue, 24 Feb 2015 16:37:08 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id wo5si25291424lbb.15.2015.02.24.16.37.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 16:37:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lams18 with SMTP id s18so487162lam.11 for ; Tue, 24 Feb 2015 16:37:08 -0800 (PST) X-Received: by 10.112.118.211 with SMTP id ko19mr440089lbb.19.1424824628387; Tue, 24 Feb 2015 16:37:08 -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.112.35.133 with SMTP id h5csp2269215lbj; Tue, 24 Feb 2015 16:37:07 -0800 (PST) X-Received: by 10.50.50.233 with SMTP id f9mr23640646igo.38.1424824617746; Tue, 24 Feb 2015 16:36:57 -0800 (PST) Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com. [209.85.213.174]) by mx.google.com with ESMTPS id n2si7345215igv.56.2015.02.24.16.36.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 16:36:57 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.213.174 as permitted sender) client-ip=209.85.213.174; Received: by mail-ig0-f174.google.com with SMTP id b16so31592093igk.1 for ; Tue, 24 Feb 2015 16:36:57 -0800 (PST) X-Received: by 10.50.66.170 with SMTP id g10mr23638911igt.49.1424824617012; Tue, 24 Feb 2015 16:36:57 -0800 (PST) Received: from fidelio.ahs3.com (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by mx.google.com with ESMTPSA id d6sm21312437iod.11.2015.02.24.16.36.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 16:36:56 -0800 (PST) From: al.stone@linaro.org To: rjw@rjwysocki.net, lenb@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, robert.moore@intel.com, tony.luck@intel.com, fenghua.yu@intel.com Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org, linux-arm-kernel@lists.infradead.org, linaro-acpi@lists.linaro.org, linaro-kernel@lists.linaro.org, patches@linaro.org Subject: [PATCH v3 8/9] ACPI: arm64: use an arch-specific ACPI _OSI method and ACPI blacklist Date: Tue, 24 Feb 2015 17:36:24 -0700 Message-Id: <1424824585-6405-9-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424824585-6405-1-git-send-email-al.stone@linaro.org> References: <1424824585-6405-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) 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 Now that all of the _OSI functionality has been separated out, we can provide arch-specific functionality for it. This also allows us to do the same for the acpi_blacklisted() function. We also make sure the defaults for the arm64 kernel are set so that the arch-specific _OSI method and blacklist are always used for ACPI. For arm64, any use of _OSI will issue a warning that it is deprecated. All use of _OSI will return false -- i.e., it will return no useful information to any firmware using it. The ability to temporarily turn on _OSI, or turn off _OSI, or affect it in other ways from the command line is no longer available for arm64, either. The blacklist for ACPI on arm64 is empty. This will, of course, require ACPI to be enabled for arm64. Signed-off-by: Al Stone --- arch/arm64/Kconfig | 1 + arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/acpi-blacklist.c | 20 ++++++++++++++++++++ arch/arm64/kernel/acpi-osi.c | 25 +++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/kernel/acpi-blacklist.c create mode 100644 arch/arm64/kernel/acpi-osi.c diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 3f08727..e441d28 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -7,6 +7,7 @@ config ARM64 select ARCH_HAS_SG_CHAIN select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_USE_CMPXCHG_LOCKREF + select ARCH_SPECIFIC_ACPI_OSI if ACPI select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_COMPAT_IPC_PARSE_VERSION diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 79bdd3b..b5e1268 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -35,7 +35,7 @@ arm64-obj-$(CONFIG_KGDB) += kgdb.o arm64-obj-$(CONFIG_EFI) += efi.o efi-stub.o efi-entry.o arm64-obj-$(CONFIG_PCI) += pci.o arm64-obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o -arm64-obj-$(CONFIG_ACPI) += acpi.o +arm64-obj-$(CONFIG_ACPI) += acpi.o acpi-osi.o acpi-blacklist.o obj-y += $(arm64-obj-y) vdso/ obj-m += $(arm64-obj-m) diff --git a/arch/arm64/kernel/acpi-blacklist.c b/arch/arm64/kernel/acpi-blacklist.c new file mode 100644 index 0000000..1be6a56 --- /dev/null +++ b/arch/arm64/kernel/acpi-blacklist.c @@ -0,0 +1,20 @@ +/* + * ARM64 Specific ACPI Blacklist Support + * + * Copyright (C) 2015, Linaro Ltd. + * Author: Al Stone + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#define pr_fmt(fmt) "ACPI: " fmt + +#include + +/* The arm64 ACPI blacklist is currently empty. */ +int __init acpi_blacklisted(void) +{ + return 0; +} diff --git a/arch/arm64/kernel/acpi-osi.c b/arch/arm64/kernel/acpi-osi.c new file mode 100644 index 0000000..bb351f4 --- /dev/null +++ b/arch/arm64/kernel/acpi-osi.c @@ -0,0 +1,25 @@ +/* + * ARM64 Specific ACPI _OSI Support + * + * Copyright (C) 2015, Linaro Ltd. + * Author: Al Stone + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#define pr_fmt(fmt) "ACPI: " fmt + +#include + +/* + * Consensus is to deprecate _OSI for all new ACPI-supported architectures. + * So, for arm64, reduce _OSI to a warning message, and tell the firmware + * nothing of value. + */ +u32 acpi_osi_handler(acpi_string interface, u32 supported) +{ + pr_warn("_OSI was called, but is deprecated for this architecture.\n"); + return false; +}