From patchwork Fri Jan 23 00:44:44 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: 5690311 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 8E2609F333 for ; Fri, 23 Jan 2015 00:50:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C08FE2024F for ; Fri, 23 Jan 2015 00:50:07 +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 E5EF9201BB for ; Fri, 23 Jan 2015 00:50:06 +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 1YESPC-0003yQ-Rf; Fri, 23 Jan 2015 00:47:22 +0000 Received: from mail-ie0-f178.google.com ([209.85.223.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YESNO-0002RA-H0 for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2015 00:45:32 +0000 Received: by mail-ie0-f178.google.com with SMTP id rp18so4604287iec.9 for ; Thu, 22 Jan 2015 16:45:10 -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=ZtZJNuiM76WjxZLF6vm3s+5yLEZ8tAUZOFb6YNc7LDo=; b=TKVveUrcPL0ev6Vo8HaixMQtmkd0KpnYn3x6ByT+lEpXfyQd+8QKp+CfxDh5LB5ze6 AkAwKF1nNIJna6iD8dxMoACfYGYMLDF6QJdTC771VNYaH5zwio8WzvJ59hbwDEluwfBh AX0NuVMN6D3Lzir7BSKpResMA9kYvOaMxer52tvFFpQkjwIM8LCTFbhcu3C+ujGAfbUm 3FyNQWkPdgpROIogzxkSG+ofjvAmmNUtrW8IYcCK/uim9hZon0l8vZTI/pVS5QWORaHJ yrIbVBwWO+DUzkRqvKbyxwuIjVnI0rBD4C3wUvRy80XbR0HjQZ3l1ovEwvE8Xo7MLdGC iCdQ== X-Gm-Message-State: ALoCoQk7GHq+EVqoqYGAZGfML1CzsxjmDlb1Vt9VKbG0i59wa6UKbrAYRKYHlrTRFRv7WJF9lWxe X-Received: by 10.107.11.104 with SMTP id v101mr1089434ioi.70.1421973910853; Thu, 22 Jan 2015 16:45:10 -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.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 16:45:09 -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 7/7] ACPI: use Linux as ACPI_OS_NAME for _OS on ARM64 Date: Thu, 22 Jan 2015 17:44:44 -0700 Message-Id: <1421973884-13029-8-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_164530_661148_C886208A X-CRM114-Status: GOOD ( 12.36 ) 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: Hanjun Guo ACPI_OS_NAME is globally defined as "Microsoft Windows NT" for now. That doesn't make much sense in the ARM context, so set it to "Linux" when CONFIG_ARM64. If it is necessary to change the return value from \_OS_ (that is, return some value other than the default in ACPI_OS_NAME), use the kernel parameter "acpi_os_name=". Signed-off-by: Hanjun Guo --- arch/arm64/Kconfig | 1 + drivers/acpi/Kconfig | 8 ++++++++ include/acpi/acconfig.h | 2 ++ include/acpi/platform/aclinux.h | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 915aa16..20677d1 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1,5 +1,6 @@ config ARM64 def_bool y + select ACPI_OS_NAME_LINUX if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI select ARCH_BINFMT_ELF_RANDOMIZE_PIE select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 3e3bd35..024c5f0 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -369,6 +369,14 @@ config ACPI_REDUCED_HARDWARE_ONLY If you are unsure what to do, do not enable this option. +config ACPI_OS_NAME_LINUX + bool "Using Linux for _OS method" if EXPERT + def_bool n + When used, this option makes sure the _OS method returns + the value "Linux". + + If you are unsure what to do, do not enable this option. + source "drivers/acpi/apei/Kconfig" config ACPI_EXTLOG diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 5a0a3e5..1980bf4 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -69,7 +69,9 @@ * code that will not execute the _OSI method unless _OS matches the string * below. Therefore, change this string at your own risk. */ +#ifndef ACPI_OS_NAME #define ACPI_OS_NAME "Microsoft Windows NT" +#endif /* Maximum objects in the various object caches */ diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 1ba7c19..a8a7ee3 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -69,6 +69,10 @@ #define ACPI_REDUCED_HARDWARE 1 #endif +#ifdef CONFIG_ACPI_OS_NAME_LINUX +#define ACPI_OS_NAME "Linux" +#endif + #include #include #include