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 X-Patchwork-Id: 45005 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 395282029F for ; Wed, 25 Feb 2015 00:37:07 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf358120lbv.1 for ; Tue, 24 Feb 2015 16:37: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: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=rdt/6aX9lVFmUWlqMmmgoNR+4g0hIWUIoEMDMrZgVGY=; b=WQEL54Mrpsf7BVPWgnfADNJ/WmPLalsEOScxZelqsb2XDvPqgiHSno8sHhlO4zuHHA UqH151E4EK7VtcJwjM3Z+uMhuNm2ZnGdQVzzmEXT6vlnPji0K+I5oC7cbKmPNhr1BD8v HYZ2qmjYGeTAHU+fxra0yGDeePiNuApPGzrip7o2w5JdagEvlXeuh0NMzIioezpddGql 10juMUYpUZaHf7w5zYVTOhYpfFkTXRNoE2q54O4L//mD72DvOGs05/oikiDi0/OkLkAE cVhJcMF3YHTBYMqFRHCBWGTFK3kYIz09YW4XMA2i9xOu9/vHS2mttDg/VORBDsshfm8g 9bmg== X-Gm-Message-State: ALoCoQmdIiic7wPkJBar7K3fpjPwYOegPNUI6V0TueUwmgpuATYvgsJDcDkK6jKntfmuS2gG0feJ X-Received: by 10.181.13.236 with SMTP id fb12mr108858wid.1.1424824626174; Tue, 24 Feb 2015 16:37:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.12 with SMTP id ku12ls607994lac.105.gmail; Tue, 24 Feb 2015 16:37:05 -0800 (PST) X-Received: by 10.152.88.49 with SMTP id bd17mr412424lab.43.1424824625947; Tue, 24 Feb 2015 16:37:05 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id yl7si28170442lab.116.2015.02.24.16.37.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 16:37:05 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lams18 with SMTP id s18so487019lam.11 for ; Tue, 24 Feb 2015 16:37:05 -0800 (PST) X-Received: by 10.112.56.139 with SMTP id a11mr517852lbq.36.1424824625866; Tue, 24 Feb 2015 16:37:05 -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 h5csp2269200lbj; Tue, 24 Feb 2015 16:37:05 -0800 (PST) X-Received: by 10.50.13.97 with SMTP id g1mr23604479igc.42.1424824615778; Tue, 24 Feb 2015 16:36:55 -0800 (PST) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com. [209.85.223.176]) by mx.google.com with ESMTPS id aa9si11293507icc.61.2015.02.24.16.36.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 16:36:55 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 209.85.223.176 as permitted sender) client-ip=209.85.223.176; Received: by iecrl12 with SMTP id rl12so787736iec.4 for ; Tue, 24 Feb 2015 16:36:55 -0800 (PST) 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 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 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-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.49 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 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