From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A111C4320A for ; Sun, 8 Aug 2021 14:46:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F16DF60560 for ; Sun, 8 Aug 2021 14:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231837AbhHHOqW (ORCPT ); Sun, 8 Aug 2021 10:46:22 -0400 Received: from mga14.intel.com ([192.55.52.115]:32812 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231218AbhHHOqV (ORCPT ); Sun, 8 Aug 2021 10:46:21 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10070"; a="214305466" X-IronPort-AV: E=Sophos;i="5.84,305,1620716400"; d="scan'208";a="214305466" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Aug 2021 07:46:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,305,1620716400"; d="scan'208";a="673563101" Received: from aubrey-app.sh.intel.com (HELO [10.239.53.25]) ([10.239.53.25]) by fmsmga005.fm.intel.com with ESMTP; 08 Aug 2021 07:46:01 -0700 Subject: Re: [PATCH] ACPI/PRM: Deal with table not present or no module found To: "Rafael J. Wysocki" , Aubrey Li Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List References: <1628210784-136676-1-git-send-email-aubrey.li@intel.com> From: Aubrey Li Message-ID: <2728924f-25cf-25dc-df0f-d02bbc959b9f@linux.intel.com> Date: Mon, 9 Aug 2021 07:53:12 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/6/21 9:23 PM, Rafael J. Wysocki wrote: > On Fri, Aug 6, 2021 at 2:48 AM Aubrey Li wrote: >> >> On the system PRMT table is not present, dmesg output: >> >> $ dmesg | grep PRM >> [ 1.532237] ACPI: PRMT not present >> [ 1.532237] PRM: found 4294967277 modules >> >> The result of acpi_table_parse_entries need to be checked and return >> immediately if PRMT table is not present or no PRM module found. >> >> Signed-off-by: Aubrey Li >> --- >> drivers/acpi/prmt.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c >> index 31cf9ae..1f6007a 100644 >> --- a/drivers/acpi/prmt.c >> +++ b/drivers/acpi/prmt.c >> @@ -292,6 +292,12 @@ void __init init_prmt(void) >> int mc = acpi_table_parse_entries(ACPI_SIG_PRMT, sizeof(struct acpi_table_prmt) + >> sizeof (struct acpi_table_prmt_header), >> 0, acpi_parse_prmt, 0); >> + /* >> + * Return immediately if PRMT table is not present or no PRM module found. >> + */ >> + if (mc <= 0) >> + return; >> + >> pr_info("PRM: found %u modules\n", mc); >> >> status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT, >> -- > > Applied as 5.14-rc material, thanks! > > However, since I'm on vacation next week, it will get into linux-next > after -rc6. > Thanks Rafael!