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 X-Patchwork-Id: 43560 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 73B90218DB for ; Fri, 23 Jan 2015 00:45:20 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id bs8sf3286828wib.1 for ; Thu, 22 Jan 2015 16:45:19 -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=mQ3rSE52XnBTb4OZB3h4l5EkZErxTCILynVcJt5Qnlw=; b=HRfb1wHPAeflRai0ui5yUV88gkeeXZs2zTN3S5GbdZ/eCNLoQxLsDoKOKIS4GVjnej FDSjIciOTr+4jnNTJYZjIQXfNYQwsZKAquJTkr97vTGVsbpPlabS4fJiIVBVQHIhcvxY BNznjTIs3vN62RQvusWIPNsJKsIsP+XyPX1R7vwpE8kFJBIO0tmEf7LE3fvigyTneWWd hw6jiXUbeuvSVKd5Ygz+vxeQpjbDsZkt37rdZUjqQ63PfxFX+VWLAIrTTJTkOoNPaINb hh7rOXAlXB8oAHazH/As7JapI61S0XB0X6XoHLJZjm9ZJZWZSXISLNhCXrYpfNcxygRi Kt2w== X-Gm-Message-State: ALoCoQnPD66K8Vw2U9ojFHeLswUtssPvHnYQWPCORV4Gji0Wl3Mn/L0qPo4xaSAghRAWIUFIj6lo X-Received: by 10.152.43.50 with SMTP id t18mr595151lal.3.1421973919771; Thu, 22 Jan 2015 16:45:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.97 with SMTP id j1ls189273laj.28.gmail; Thu, 22 Jan 2015 16:45:19 -0800 (PST) X-Received: by 10.152.29.6 with SMTP id f6mr4688764lah.32.1421973919634; Thu, 22 Jan 2015 16:45:19 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id tt6si4706lbb.45.2015.01.22.16.45.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 16:45:19 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id u10so4536577lbd.9 for ; Thu, 22 Jan 2015 16:45:19 -0800 (PST) X-Received: by 10.152.18.135 with SMTP id w7mr4449757lad.47.1421973919554; Thu, 22 Jan 2015 16:45:19 -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.9.200 with SMTP id c8csp71053lbb; Thu, 22 Jan 2015 16:45:18 -0800 (PST) X-Received: by 10.50.253.12 with SMTP id zw12mr16222774igc.24.1421973907250; Thu, 22 Jan 2015 16:45:07 -0800 (PST) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com. [209.85.223.171]) by mx.google.com with ESMTPS id t2si523102igr.41.2015.01.22.16.45.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 16:45:07 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.223.171 as permitted sender) client-ip=209.85.223.171; Received: by mail-ie0-f171.google.com with SMTP id tr6so4623644ieb.2 for ; Thu, 22 Jan 2015 16:45:06 -0800 (PST) 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 Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devel@acpica.org, linaro-acpi@lists.linaro.org, linaro-kernel@lists.linaro.org, patches@linaro.org 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-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.217.178 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 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; +} +