Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2532487imu; Mon, 17 Dec 2018 03:41:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/VypYGDvJoblMOD5O3CMMUBoToLt8J4rYBY/TEKN6PsRjowfI6g3+YCMlmSAGFlJqeLSuWO X-Received: by 2002:a17:902:a60f:: with SMTP id u15mr11723944plq.275.1545046880052; Mon, 17 Dec 2018 03:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545046880; cv=none; d=google.com; s=arc-20160816; b=hJLrTOu8/b95CAyi8v7uyuXk7ngJyc6QMXT03071B7UeQc3WlV8eusbBfot2Zga/p4 tGMhklOazJP39OzEzmvM9/N6feW74hBF17GUyxbdR8lNgMawqeONKWHa6djrQOKj2WVs Qu/lLxYulii3CNQ/FtPQ8nioCR3LAovYN4TQad2Du9TYUzAYzFvvslXquU5+YRMJ6Ipz wRcdfNtcDXg7QaoodDIiBUQCb+iyQuvb7TnamDP+Mb1D6N6g2e47szaQphdEMPo+vSuK PgfZjJbEwuszJYZWRTPT9c7VSeYxzTM+uj4ZJyAP2aWTd7EbjddGwoC8T67RQvekYMVY U+gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LooX3aEngCzLbG2c5D/wzmD3COaUG3eaxBDzrKo1sPE=; b=faNlNGnaOrTT+36puR1OGZmywNQIvc1AdxqePW1Q3+gunK9/ln90MdKsFJbcxfVosn Slt7nBU5K6/rwoK9wGRAMgQl2imIGkplK3s6+g7JBNObEbjB/HqK66MaxKyOlFjQK+hX dgvPI1Wcmogsymt/DNp3eoPZT89huhhivGhvh7HTdMpHPZxpy83fk0sANP4tjZbB4JBC vdvrC5MK/C/4VYL+d6XNjTuWCN5TjxE4xMqHa6mTHZ2wxdEd17SpeW/wUGDRlPyiennV 9FoRbnb2HuTo3r1mUzCD95+Ouy91QziohyJfTpzUkNjhvYFCLOKN05fvl8X3cdGjEm0q C1lQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay7si10390317plb.410.2018.12.17.03.41.04; Mon, 17 Dec 2018 03:41:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732298AbeLQLjA (ORCPT + 99 others); Mon, 17 Dec 2018 06:39:00 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:59318 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731901AbeLQLjA (ORCPT ); Mon, 17 Dec 2018 06:39:00 -0500 Received: from 79.184.255.25.ipv4.supernova.orange.pl (79.184.255.25) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id 3de697eb0eb99179; Mon, 17 Dec 2018 12:38:57 +0100 From: "Rafael J. Wysocki" To: Wang Dongsheng Cc: robert.moore@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] ACPI / tables: add DSDT AmlCode new declaration name support Date: Mon, 17 Dec 2018 12:38:34 +0100 Message-ID: <7887454.AELDQZ8aft@aspire.rjw.lan> In-Reply-To: <254f789dee7773b938db7a204ca8800db10e4588.1542105349.git.dongsheng.wang@hxt-semitech.com> References: <254f789dee7773b938db7a204ca8800db10e4588.1542105349.git.dongsheng.wang@hxt-semitech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, November 13, 2018 11:46:23 AM CET Wang Dongsheng wrote: > The new naming rule is added in acpica version 20180427. > So the dsdt aml code name changes from "AmlCode" to "dsdt_aml_code". > > The patch that introduces naming rules is: > https://github.com/acpica/acpica/commit/f9a88a4c1cd020b6a5475d63b29626852a0b5f37 > > Tested: > ACPICA release version 20180427+. > ARM64: QCOM QDF2400 > GCC: 4.8.5 20150623 > > Signed-off-by: Wang Dongsheng > --- > drivers/acpi/Kconfig | 2 +- > drivers/acpi/tables.c | 10 ++++++++-- > 2 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index 9705fc986da9..15ab53a52fdc 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -336,7 +336,7 @@ config ACPI_CUSTOM_DSDT_FILE > See Documentation/acpi/dsdt-override.txt > > Enter the full path name to the file which includes the AmlCode > - declaration. > + or dsdt_aml_code declaration. > > If unsure, don't enter a file name. > > diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c > index a3d012b08fc5..297020bbaade 100644 > --- a/drivers/acpi/tables.c > +++ b/drivers/acpi/tables.c > @@ -713,6 +713,9 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table, > table_length); > } > > +static void *amlcode __attribute__ ((weakref("AmlCode"))); > +static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code"))); > + > acpi_status > acpi_os_table_override(struct acpi_table_header *existing_table, > struct acpi_table_header **new_table) > @@ -723,8 +726,11 @@ acpi_os_table_override(struct acpi_table_header *existing_table, > *new_table = NULL; > > #ifdef CONFIG_ACPI_CUSTOM_DSDT > - if (strncmp(existing_table->signature, "DSDT", 4) == 0) > - *new_table = (struct acpi_table_header *)AmlCode; > + if (!strncmp(existing_table->signature, "DSDT", 4)) { > + *new_table = (struct acpi_table_header *)&amlcode; > + if (!(*new_table)) > + *new_table = (struct acpi_table_header *)&dsdt_amlcode; > + } > #endif > if (*new_table != NULL) > acpi_table_taint(existing_table); > Applied with some changelog modifications, thanks!