From patchwork Fri Jan 23 00:44:42 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: 5690291 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 7BEE69F333 for ; Fri, 23 Jan 2015 00:48:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE547201BB for ; Fri, 23 Jan 2015 00:48:38 +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 DA9CA20149 for ; Fri, 23 Jan 2015 00:48:37 +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 1YESOS-0003Ok-BK; Fri, 23 Jan 2015 00:46:36 +0000 Received: from mail-ie0-f179.google.com ([209.85.223.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YESNK-00027y-Qn for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2015 00:45:29 +0000 Received: by mail-ie0-f179.google.com with SMTP id x19so4617458ier.10 for ; Thu, 22 Jan 2015 16:45:06 -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=mQ3rSE52XnBTb4OZB3h4l5EkZErxTCILynVcJt5Qnlw=; b=HhIhNFQa5tn+vGDtZZjdoeRfnS64wS55g7hz9DtVQK7vir27NVqegbmZ2ZbB6uf9aQ aZgZOdR2oTzJrh50Gc1sYWxm3wFsNkn2Lzqt0XDCpz4RVPPN8A/iXLiTnhf39Cau7rOg ttXadXjoWgTx9EJfsKKV6RoHy0B0yTV1EFbFDYkweyTNHx7Dg44phK97c/Ixo5g/pwfH dgkrOFOj1txCPJQ2DwtNcKFCYXmRSsx5oPCxoaMA7eXA68Fth6DEgDn/4hQ9JS2PP7xp 8zgAlCYyURHghMLy5UgihdBSAcsCtumQHhCNsORkgpaD1At+fni51s4/a9AieT/tu0zy fHpw== X-Gm-Message-State: ALoCoQkE5++fz2ZxnIbyCy5laosAnUTeCG3dFrs6RpdgNR5C29wQMrhG82i4CHviiYCKIKDo7lia X-Received: by 10.107.3.39 with SMTP id 39mr1061821iod.21.1421973906557; Thu, 22 Jan 2015 16:45:06 -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 k18sm4026037igt.5.2015.01.22.16.45.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 16:45:05 -0800 (PST) From: al.stone@linaro.org To: tony.luck@intel.com, fenghua.yu@intel.com, rjw@rjwysocki.net, catalin.marinas@arm.com, will.deacon@arm.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, lenb@kernel.org, robert.moore@intel.com Subject: [PATCH 5/7] arm64: ACPI: create arch-dependent version of acpi_osi_handler() Date: Thu, 22 Jan 2015 17:44:42 -0700 Message-Id: <1421973884-13029-6-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1421973884-13029-1-git-send-email-al.stone@linaro.org> References: <1421973884-13029-1-git-send-email-al.stone@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150122_164526_950619_639825AB X-CRM114-Status: GOOD ( 14.80 ) 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 In order to deprecate the use of _OSI for arm64 or other new architectures, we need to make the default handler something we can change for various platforms. This patch moves the definition of acpi_osi_handler() -- the function used by ACPICA as a callback for evaluating _OSI -- into arch- dependent ACPI files. The declaration of acpi_os_handler() was moved in a previous patch. Previously, _OSI behaved on arm64 as it did on x86. This patch changes _OSI so that on arm64 it will issue a warning if invoked, and tell the firmware that no features have been implemented (i.e., it will always return false). In some distant future version of ACPI where _OSI has been completely deprecated, this implementation and all other architecture implementations should be removed. Signed-off-by: Al Stone --- arch/arm64/kernel/acpi/Makefile | 2 +- arch/arm64/kernel/acpi/osi.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/kernel/acpi/osi.c diff --git a/arch/arm64/kernel/acpi/Makefile b/arch/arm64/kernel/acpi/Makefile index e049f94..15a6172 100644 --- a/arch/arm64/kernel/acpi/Makefile +++ b/arch/arm64/kernel/acpi/Makefile @@ -1 +1 @@ -obj-$(CONFIG_ACPI) += acpi.o +obj-$(CONFIG_ACPI) += acpi.o osi.o diff --git a/arch/arm64/kernel/acpi/osi.c b/arch/arm64/kernel/acpi/osi.c new file mode 100644 index 0000000..fa711dc --- /dev/null +++ b/arch/arm64/kernel/acpi/osi.c @@ -0,0 +1,26 @@ +/* + * 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; +} +