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@linaro.org X-Patchwork-Id: 5876561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DD8569F37F for ; Wed, 25 Feb 2015 00:42:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0187520253 for ; Wed, 25 Feb 2015 00:42:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 1AE4F20220 for ; Wed, 25 Feb 2015 00:42:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQQ17-0000EY-3L; Wed, 25 Feb 2015 00:39:57 +0000 Received: from mail-ie0-f171.google.com ([209.85.223.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQPyY-00073g-CQ for linux-arm-kernel@lists.infradead.org; Wed, 25 Feb 2015 00:37:19 +0000 Received: by iecrp18 with SMTP id rp18so828767iec.1 for ; Tue, 24 Feb 2015 16:36: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:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G6DlDPs89pAU8gb0YbiFL1/3mAZ9x8/2lbKOQGER7dQ=; b=OrDIURFeHa4pEum+KWhUof3iD33uN0gtWui2/H9QU9gVAkQICDso5E4F18gttMah0V w35RY1i6SXXqfgsAZPe1vNnEXaC2vsj+/p59c1CnBUx+fCgHcmRjWGAUQqNHWawUlGwU EJSQqyarEgjw1FhUGpzZjNfhb76RTRnXHwLMK5Iy5U0NxyKgorRwzMmNAxGuFcl8y4id fqN1PXkCA+K1GCOWQ6VZOeS1st1vQVyEJVesfca+ycGsVKPwGcl66Q5RJ+St9SKQwY4d mLFaDE1Iw16aicL7knxNLWvVMxFw60/Xc/ajzImXpx+dzNgVY7jEFTGa6bD5kZkrIL4/ HkKg== X-Gm-Message-State: ALoCoQnE8VY04XmRc5zjope5LYDvMLfHJUbYyGPNTN9lwGIic20ZVno/Omnljd8eZ4S5DYVvhciJ 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150224_163718_516325_9B703CD9 X-CRM114-Status: GOOD ( 16.00 ) X-Spam-Score: -0.7 (/) Cc: linaro-kernel@lists.linaro.org, linux-ia64@vger.kernel.org, linaro-acpi@lists.linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devel@acpica.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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 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; +}