From patchwork Tue Jan 6 11:11:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 42766 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7E70F2055F for ; Tue, 6 Jan 2015 11:11:47 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf2328023wib.2 for ; Tue, 06 Jan 2015 03:11:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=y3rZg5X17BPZYGmpP7jHFIER5V3o4BCx+H8Q1CWxQMk=; b=TJISmT6hcZshz06qqB9f3wU/L6ht0LUGNfqf8qkGMX1lKg+J2HNciHQmIKWKJFcfix ZsWUBu3tNngu7HUSRT6mMANagsGdK+5jLYIFzjbZQq38GWjroyqdJCmLiZE6YfaXIjAG MY6DpfqQciu5fYD01G1seH5r64WJPN2SKlrq3LV3Gi5xKRjoBH5CcAC4GpRg3HsE4Jbm 4LrXbmvOxxuCX+YkSKNNSyCeFrPQ/QxLouUibrzVrBExbwbpbY7uXTo2bqTsqD7mpEd7 TKYWzkSzISTs5BHr9fXlbel+Qy/I44IeS3mGdfjMdaWqgOND94D9wIwPXY0n8VpTHBPg 2sjw== X-Gm-Message-State: ALoCoQlcBai0/TxTwcUbh9bvma9sZJGqgQay2NTlh2faaAQTvfUgvEhrjNKMoXRASWfYr3b8BR82 X-Received: by 10.112.72.228 with SMTP id g4mr9155440lbv.4.1420542706454; Tue, 06 Jan 2015 03:11:46 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.132 with SMTP id dc4ls17010lad.97.gmail; Tue, 06 Jan 2015 03:11:46 -0800 (PST) X-Received: by 10.152.19.71 with SMTP id c7mr99008757lae.79.1420542706209; Tue, 06 Jan 2015 03:11:46 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id m1si65496180lam.44.2015.01.06.03.11.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 03:11:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id ms9so19678564lab.10 for ; Tue, 06 Jan 2015 03:11:46 -0800 (PST) X-Received: by 10.112.41.234 with SMTP id i10mr100280177lbl.25.1420542706099; Tue, 06 Jan 2015 03:11:46 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1140456lbb; Tue, 6 Jan 2015 03:11:45 -0800 (PST) X-Received: by 10.66.162.105 with SMTP id xz9mr149768751pab.77.1420542703980; Tue, 06 Jan 2015 03:11:43 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si43442465pas.147.2015.01.06.03.11.43; Tue, 06 Jan 2015 03:11:43 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755255AbbAFLLl (ORCPT + 27 others); Tue, 6 Jan 2015 06:11:41 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:53447 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754751AbbAFLLi (ORCPT ); Tue, 6 Jan 2015 06:11:38 -0500 Received: by mail-pa0-f50.google.com with SMTP id bj1so30937682pad.9 for ; Tue, 06 Jan 2015 03:11:38 -0800 (PST) X-Received: by 10.70.140.229 with SMTP id rj5mr154183026pdb.60.1420542698238; Tue, 06 Jan 2015 03:11:38 -0800 (PST) Received: from [10.10.3.98] ([167.160.116.93]) by mx.google.com with ESMTPSA id ul5sm57122407pab.36.2015.01.06.03.11.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jan 2015 03:11:37 -0800 (PST) Message-ID: <54ABC2CB.6@linaro.org> Date: Tue, 06 Jan 2015 19:11:07 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Catalin Marinas CC: "Rafael J. Wysocki" , Mark Rutland , Olof Johansson , "grant.likely@linaro.org" , Will Deacon , "graeme.gregory@linaro.org" , Arnd Bergmann , Sudeep Holla , "jcm@redhat.com" , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Rob Herring , Robert Richter , Lv Zheng , Robert Moore , Lorenzo Pieralisi , Liviu Dudau , Randy Dunlap , Charles Garcia-Tobin , "Kangkang.Shen@huawei.com" , "linux-acpi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linaro-acpi@lists.linaro.org" , Al Stone Subject: Re: [PATCH v5 18/18] Documentation: ACPI for ARM64 References: <1413553034-20956-1-git-send-email-hanjun.guo@linaro.org> <1413553034-20956-19-git-send-email-hanjun.guo@linaro.org> <20141224171815.GD13399@e104818-lin.cambridge.arm.com> <54A90A4C.60908@linaro.org> <20150105110533.GA14967@e104818-lin.cambridge.arm.com> In-Reply-To: <20150105110533.GA14967@e104818-lin.cambridge.arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@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.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 2015年01月05日 19:05, Catalin Marinas wrote: > On Sun, Jan 04, 2015 at 09:39:24AM +0000, Hanjun Guo wrote: >> On 2014年12月25日 01:18, Catalin Marinas wrote: >> [...] >>> >>> In addition to the above and _DSD requirements/banning, I would also add >>> some clear statements around: >>> >>> _OSC: only global/published capabilities are allowed. For >>> device-specific _OSC we need a process or maybe we can ban them entirely >>> and rely on _DSD once we clarify the process. >>> >>> _OSI: firmware must not check for certain _OSI strings. Here I'm not >>> sure what we would have to do for ARM Linux. Reporting "Windows" does >>> not make any sense but not reporting anything can, as Matthew Garrett >>> pointed out, can be interpreted by firmware as "Linux". In addition to >>> any statements in this document, I suggest you patch >>> drivers/acpi/acpica/utosi.c accordingly, maybe report "Linux" for ARM >>> and print a kernel warning so that we notice earlier. >>> >>> ACPI_OS_NAME: this is globally defined as "Microsoft Windows NT". It >>> doesn't make much sense in the ARM context. Could we change it to >>> "Linux" when CONFIG_ARM64? I think we can introduce a Kconfig such as CONFIG_ACPI_OS_NAME_LINUX, selected by ARM64 and change ACPI_OS_NAME to "Linux" when CONFIG_ACPI_OS_NAME_LINUX defined. (we can not add CONFIG_ARM64 in ACPICA code directly since it will be used by windows too) some code like below: >> >> We will work on this both on ASWG and linux ACPI driver side, as Dong >> and Charles pointed out, _OSI things can be solved in ACPI spec, when >> that is done, we can modify the kernel driver to fix the problems above. > > Which driver? the ACPICA core driver as you suggested, sorry for the confusion. > > What about ACPI_OS_NAME? Would you suggest it is fine to report > "Microsoft Windows NT" on an ARM system? That _OS_ not _OSI. No, not at all. I prefer "Linux" In include/acpi/acconfig.h, when ACPI_OS_NAME defined, it says: "OS name, used for the _OS object. The _OS object is essentially obsolete,..." for some legacy reasons, we needed "Microsoft Windows NT", but ACPI for ARM64 on linux is totally new, I think we can change it to "Linux" when CONFIG_ARM64 as you suggested. Thanks Hanjun --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b1f9a20..de567a3 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 ARCH_BINFMT_ELF_RANDOMIZE_PIE select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_GCOV_PROFILE_ALL diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 8951cef..11a10ac 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -369,6 +369,10 @@ 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 + source "drivers/acpi/apei/Kconfig" config ACPI_EXTLOG diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 5a0a3e5..db5e13e 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -69,7 +69,11 @@ * 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_USING_LINUX #define ACPI_OS_NAME "Microsoft Windows NT" +#else +#define ACPI_OS_NAME "Linux" +#endif /* Maximum objects in the various object caches */ diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 1ba7c19..45d51d2 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_USING_LINUX 1 +#endif + #include #include #include