From patchwork Wed Feb 25 00:36:23 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: 5876531 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 C84BC9F37F for ; Wed, 25 Feb 2015 00:41:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E60DC20148 for ; Wed, 25 Feb 2015 00:41:45 +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 0C4A12012E for ; Wed, 25 Feb 2015 00:41:45 +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 1YQQ0D-0007zA-Q2; Wed, 25 Feb 2015 00:39:01 +0000 Received: from mail-ig0-f179.google.com ([209.85.213.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQPyU-000739-Fc for linux-arm-kernel@lists.infradead.org; Wed, 25 Feb 2015 00:37:15 +0000 Received: by mail-ig0-f179.google.com with SMTP id l13so1845573iga.0 for ; Tue, 24 Feb 2015 16:36:55 -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=rdt/6aX9lVFmUWlqMmmgoNR+4g0hIWUIoEMDMrZgVGY=; b=Myrr07ju/FnKlBQdGvzfGngBycx3Lsc5qbu6o7ChyBUr7wOWuhBnlNzceDzMyna1gn nvYcf76f9E/+CoxR/D0aOlt8Y2JBaYaMtxhjbZeIhVdh76/09ZxxHoQ/L+8a+RvQqEK4 bZVmHHov9zMaphuNEuzJ3kfRVRc8MBmzt413aF7vylgWAupVgiiybkHpk/mTr5a6Etld pVba+oaLXJlsH79it5OmMt+5NQ2cHfVGEoLHwvD+w4hO1oyz3wuCE4XsyrhEUdwVM1/N iOQQvt1U9LW/WfdigVKhxiHkDIEkhpnwexyeDGpgwWLcRT7bwobNjByibXneEmJwwt1j eE8Q== X-Gm-Message-State: ALoCoQnw5Qiyuy1pgi1OF7o2msxypCB3VM+Whn/hpTiPcnf9xzOHEU4gF+PBrfvzlyWi7/GCBb9z X-Received: by 10.50.136.228 with SMTP id qd4mr24253500igb.13.1424824615074; Tue, 24 Feb 2015 16:36:55 -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.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 16:36:54 -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 7/9] ACPI: enable arch-specific compilation for _OSI and the blacklist Date: Tue, 24 Feb 2015 17:36:23 -0700 Message-Id: <1424824585-6405-8-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_163714_592320_1D2DF6E5 X-CRM114-Status: GOOD ( 11.43 ) 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 Whether arch-specific functions are used or not now depends on the config option CONFIG_ARCH_SPECIFIC_ACPI_OSI. By default, this is set false which causes the x86/ia64 versions to be used, just as is done today. Setting this option true causes architecture-specific implementations to be built instead; this patch also provides arm64 implementations. For x86/ia64, there is no functional change. Other architectures will have to add files to provide their specific functionality. Signed-off-by: Al Stone --- drivers/acpi/Kconfig | 3 +++ drivers/acpi/Makefile | 7 ++++++- include/linux/acpi.h | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index b340509..4d91f22 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -53,6 +53,9 @@ config ACPI_SLEEP depends on SUSPEND || HIBERNATION default y +config ARCH_SPECIFIC_ACPI_OSI + def_bool n + config ACPI_PROCFS_POWER bool "Deprecated power /proc/acpi directories" depends on PROC_FS diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 97191eb..1428464 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -18,9 +18,14 @@ obj-y += acpi.o \ acpica/ # All the builtin files are in the "acpi." module_param namespace. -acpi-y += osl.o utils.o reboot.o osi.o +acpi-y += osl.o utils.o reboot.o acpi-y += nvs.o +# _OSI related files +ifneq ($(CONFIG_ARCH_SPECIFIC_ACPI_OSI), y) +acpi-y += osi.o +endif + # Power management related files acpi-y += wakeup.o acpi-y += sleep.o diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 71cdeb6..97185a1 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -279,9 +279,17 @@ static inline int acpi_video_display_switch_support(void) #endif /* defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) */ extern int acpi_blacklisted(void); + +#ifdef CONFIG_ARCH_SPECIFIC_ACPI_OSI +static inline void __init acpi_dmi_osi_linux(int enable, + const struct dmi_system_id *d) { } +static inline void __init acpi_osi_setup(char *str) { } +#else extern void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); extern void __init acpi_osi_setup(char *str); +#endif + extern u32 acpi_osi_handler(acpi_string interface, u32 supported); #ifdef CONFIG_ACPI_NUMA