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=-15.3 required=3.0 tests=BAYES_00, 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 50111C11F6A for ; Fri, 2 Jul 2021 14:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3054761427 for ; Fri, 2 Jul 2021 14:02:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233025AbhGBOFM (ORCPT ); Fri, 2 Jul 2021 10:05:12 -0400 Received: from mga18.intel.com ([134.134.136.126]:23721 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232537AbhGBOFL (ORCPT ); Fri, 2 Jul 2021 10:05:11 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10033"; a="196022697" X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="196022697" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 07:02:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="482452300" Received: from aubrey-app.sh.intel.com (HELO [10.239.53.25]) ([10.239.53.25]) by FMSMGA003.fm.intel.com with ESMTP; 02 Jul 2021 07:02:11 -0700 Subject: Re: [PATCH 2/2] ACPI: let BIOS fall back to legacy handling if PRM disabled To: "Rafael J. Wysocki" , Aubrey Li Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List , Dan Williams References: <1625209430-19934-1-git-send-email-aubrey.li@intel.com> <1625209430-19934-2-git-send-email-aubrey.li@intel.com> From: Aubrey Li Message-ID: Date: Fri, 2 Jul 2021 22:02:31 +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 7/2/21 7:37 PM, Rafael J. Wysocki wrote: > On Fri, Jul 2, 2021 at 9:03 AM Aubrey Li wrote: >> >> Based on _OSC PRM bit, BIOS can choose switch from legacy handling >> to using PRM. So if CONFIG_ACPI_PRMT is disabled, this bit should >> not be set to let BIOS fall back to the legacy handling (such as SMI). >> >> Cc: Dan Williams >> Signed-off-by: Aubrey Li >> --- >> drivers/acpi/bus.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c >> index 60fb6a84..30a3d4a 100644 >> --- a/drivers/acpi/bus.c >> +++ b/drivers/acpi/bus.c >> @@ -303,7 +303,9 @@ static void acpi_bus_osc_negotiate_platform_control(void) >> >> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT; >> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT; >> +#ifdef CONFIG_ACPI_PRMT >> capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PRM_SUPPORT; >> +#endif > > What about using if (IS_ENABLED()) instead of #ifdef? aha, sorry, using if (IS_ENABLED()) is better, will come up with a new version soon. Thanks, -Aubrey