Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3210275imu; Sat, 24 Nov 2018 00:10:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/XcYSWi6KxeAbi4Ugxfh4vwKAz57uRlHfrQrCLE4hKLkSagN51sMZ1HQajBbr1yfjustSZZ X-Received: by 2002:a65:49cd:: with SMTP id t13mr14869632pgs.376.1543047022915; Sat, 24 Nov 2018 00:10:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543047022; cv=none; d=google.com; s=arc-20160816; b=GJ+H4UZtJ2SGLANAbU7b1Gj4iPe0xLYuy50m9W0fApUz6GbD2VLzQ1naZeAGkEr0SI nNP/povrEyRiYMM17IZUDAsZd4XHUfgSnJkc99VyA+3v7tGhWHbw2UGHdFYFCaCtpc5N TtnLSruKu2gxTaK1CToCF+oxFsHP7ABlUjMti4xY2jxk/teI7za8x9WlDBKgsXSoNgUj 9Vn1zkQTgxkVn/qIwe1bg0JvL/X7kRvDUVvlg6JPWnVqYoJS2KuZuEhdCTf4MwSgvBXI 1IqWdzzHXNd1XVd8gVBfQ3lS0zXq6J+Rp7wB/3Rzd9aAba8XEJYWgWeEh3xnXLVoedzm Tl2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=xqQlzhKHQ3st2ZHPMQBPUYkkCouT5EEf73Xo0odxISQ=; b=fvlSdcgJo4kbQjyiuVTgy3V+sJP0W/3+C7Fn7qjhSkgBZrV11cUg5UgjataPWDL04M nFSThzIIXBwVokrwKFC5tAZQt+57RHvR+3806matc2NyBJBOuuZeQAut8zFD2dqED1UN 8UcODfr9hmtfAtWz/xNcW62iZNVrb4hzktpIg1PtXd1U6oZHmzZ4QbJ+rM06jhxHZ+Q7 qmPC3grlEY1iMESJBtpw+jRGahFS9GMill6IwtX0DLDsIVGshhR+d3XulhQl8+1WL2BD OT+niUIGtwaGxU2mbf24uOj1D8y99wJA+mWdtblGanqyvzhRfI0xLdMi8gaeY+QHo4ur vkvQ== 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 az5si35737635plb.166.2018.11.24.00.10.08; Sat, 24 Nov 2018 00:10:22 -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 S2408397AbeKWS4b convert rfc822-to-8bit (ORCPT + 99 others); Fri, 23 Nov 2018 13:56:31 -0500 Received: from mx01.hxt-semitech.com ([223.203.96.7]:55258 "EHLO barracuda.hxt-semitech.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390293AbeKWS4b (ORCPT ); Fri, 23 Nov 2018 13:56:31 -0500 X-ASG-Debug-ID: 1542960798-093b7e021a0b480001-xx1T2L Received: from HXTBJIDCEMVIW02.hxtcorp.net ([10.128.0.15]) by barracuda.hxt-semitech.com with ESMTP id mRE5co9kPFA21fZw (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Fri, 23 Nov 2018 16:13:18 +0800 (CST) X-Barracuda-Envelope-From: dongsheng.wang@hxt-semitech.com Received: from HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) by HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 23 Nov 2018 16:12:36 +0800 Received: from HXTBJIDCEMVIW02.hxtcorp.net ([fe80::3e:f4ff:7927:a6f6]) by HXTBJIDCEMVIW02.hxtcorp.net ([fe80::3e:f4ff:7927:a6f6%12]) with mapi id 15.00.1395.000; Fri, 23 Nov 2018 16:12:36 +0800 From: "Wang, Dongsheng" To: "robert.moore@intel.com" , "rjw@rjwysocki.net" CC: "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/1] ACPI / tables: add DSDT AmlCode new declaration name support Thread-Topic: [PATCH 1/1] ACPI / tables: add DSDT AmlCode new declaration name support X-ASG-Orig-Subj: Re: [PATCH 1/1] ACPI / tables: add DSDT AmlCode new declaration name support Thread-Index: AQHUez4zTADh8jmnV0K3KPJRZ7/oPA== Date: Fri, 23 Nov 2018 08:12:35 +0000 Message-ID: References: <254f789dee7773b938db7a204ca8800db10e4588.1542105349.git.dongsheng.wang@hxt-semitech.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.64.6.159] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[10.128.0.15] X-Barracuda-Start-Time: 1542960798 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA384 X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4757 1.0000 0.0000 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.62284 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Robert, Do you have any comments about this patch? Thanks. Cheers Dongsheng On 2018/11/13 18:46, 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);