Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp588626iog; Fri, 24 Jun 2022 09:46:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uksjHcoZRgruHQzDjqiZFUQtqXiFv5oFSJASCeuNhMntHhOMyahyEA7tvDbCEFqwDuS+G2 X-Received: by 2002:a63:258:0:b0:40d:3156:6d61 with SMTP id 85-20020a630258000000b0040d31566d61mr11760598pgc.190.1656089197426; Fri, 24 Jun 2022 09:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656089197; cv=none; d=google.com; s=arc-20160816; b=wZ2rzrG0pZfCv3F8CepyKVTWNxEVeviBUI4/EVgfe9hERJ3X6s/K4C18MQQtuH/0IV H7ax7yzlrdKYLzf6MZbMNKfYzlCGa70VH2kaP74YN1faq9HXR16Z8jlIP5hT46K+e+m7 ZEltM2FFPxE3xe/vdnO2ZOTE0ynq5ZSyuM6uAFBorvB9aO0TP2nKsXh8MtFYoVpsrB/X /Gvb6AK+GkPl6dhyJLG1VAEcCzCCssfYFRXEywzwT7cVHUlLq6EczPME2iAm48Ni4S39 KyY0sl/6RUXnNzFnFsIzLsQOw7EU/sD0G/UNJ1xX0FrUZG9LNTlTBKzmkA2XdA9V1ipf RIVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=T8SvbPl2HkMoNoh8fjmvh+1figA9UteGT0qWY1AbfLY=; b=zfAJdxMk4Whr9rlUt7psbsrtwBe8mMsqxNAvLflocQE5r+RIDE2gji3a2otC2RYfYE KzyELc02TdhvFJTVOYEjkp+gUPR7ETThCXCK+rWGfxGlDZMi7uBz6iNJINC/6esY75a/ yHCTv19VbzK4N0in/CXTGZtQeEAEw40ZBNKThXvy9VnIlLYnHBKYUqCQbqUsaYZHrc5+ GSX3YrA0tLY/DLU0d4LuUJ283wFOGkA2IyKVYWuWuN/Dkbf/UF7vrdmzX8ETLab5yKX7 BMb5FuX/v0mlGrxflPhANfJvunUDugUpgecz0EPhjUws++US6lGEcopmNOdD8mCIkXE+ SyuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a635352000000b0040cb57ccac9si3015220pgl.228.2022.06.24.09.46.15; Fri, 24 Jun 2022 09:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231371AbiFXQLu (ORCPT + 99 others); Fri, 24 Jun 2022 12:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbiFXQLr (ORCPT ); Fri, 24 Jun 2022 12:11:47 -0400 Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58D1A5002A; Fri, 24 Jun 2022 09:11:47 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id 23so5265242ybe.8; Fri, 24 Jun 2022 09:11:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T8SvbPl2HkMoNoh8fjmvh+1figA9UteGT0qWY1AbfLY=; b=RMjNk5JByIm6Siaoj3ZI3+oC0mwISSOzrRqYsoRydTn67E2i9sjqeVNzaEsXaBh+Nr zA4YqDxR5sT2+R0H/hcSpNZyldLGJG6kEfxOC9T0j0Rqoo6Oflx54ZIinJ2xb6CXCwIT TtgxCzvClBogRzENp9BCUK9DDLZN6P7+ARa6keda37FbVWYFWLvdJ/OiUP5jAuXmdKqy N2fwHwW9t4FMo7FagCHfBh5T3Z0ZMmQc+2u0+EOWkthT60e8eHux0Wr69p7xdIugArjX aetybKFxaHBw9Lfa6eoaeLTe8/zTIr4jpSG1XkLgfX9010ddQvySVycjvh+LZX4Od1Ju JStg== X-Gm-Message-State: AJIora+VCGQO3sx9XSXBnqBpFrFWO6FONvvgPdKQwY8MHE3i3+gzRSqd BeOgP7oVGUaBBJ797YMxKsGDpThh7p0CitJy8oSvT6Fptio= X-Received: by 2002:a05:6902:1141:b0:669:3f2a:c6bb with SMTP id p1-20020a056902114100b006693f2ac6bbmr15571250ybu.365.1656087106298; Fri, 24 Jun 2022 09:11:46 -0700 (PDT) MIME-Version: 1.0 References: <20220624115940.272422-1-Perry.Yuan@amd.com> In-Reply-To: <20220624115940.272422-1-Perry.Yuan@amd.com> From: "Rafael J. Wysocki" Date: Fri, 24 Jun 2022 18:11:35 +0200 Message-ID: Subject: Re: [PATCH] ACPI: bus: Fix osc_sb_cppc_not_supported check To: Perry Yuan Cc: Huang Rui , Mario Limonciello , "Rafael J. Wysocki" , Len Brown , Mika Westerberg , ACPI Devel Maling List , Linux Kernel Mailing List , Nathan Fontenot , "Su, Jinzhou (Joe)" , Xinmei.Huang@amd.com, "Du, Xiaojian" , "Meng, Li (Jassmine)" , Linux PM Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2022 at 2:00 PM Perry Yuan wrote: > > The patch fixs the osc_sb_cppc_not_supported variable checking > Otherwise the cppc acpi driver will be failed to register causing AMD > pstate driver failed to load when calling acpi_cpc_valid() > > Fixes: c42fa24b447("ACPI: bus: Avoid using CPPC if not supported by firmware") > Signed-off-by: Perry Yuan > --- > drivers/acpi/bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c > index 4d7c51a33b01..9731e4a1e338 100644 > --- a/drivers/acpi/bus.c > +++ b/drivers/acpi/bus.c > @@ -359,7 +359,7 @@ static void acpi_bus_osc_negotiate_platform_control(void) > } > > #ifdef CONFIG_ACPI_CPPC_LIB > - osc_sb_cppc_not_supported = !(capbuf_ret[OSC_SUPPORT_DWORD] & > + osc_sb_cppc_not_supported = !(capbuf_ret[OSC_SUPPORT_DWORD] && > (OSC_SB_CPC_SUPPORT | OSC_SB_CPCV2_SUPPORT)); This certainly is not a correct fix, because it causes osc_sb_cppc_not_supported to always be true if capbuf_ret[OSC_SUPPORT_DWORD] is not zero. > #endif > > -- > 2.25.1 >