Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2369185rdg; Sun, 13 Aug 2023 23:20:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEWQNhcTWwZ833UslakAUa8Fpc+eA2lerkUWQwpHIHEA7Sk3IR6D0Ayzl1gUNqVlgxzQHhC X-Received: by 2002:a17:906:105c:b0:99c:1dac:5af0 with SMTP id j28-20020a170906105c00b0099c1dac5af0mr8085955ejj.70.1691994053849; Sun, 13 Aug 2023 23:20:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691994053; cv=pass; d=google.com; s=arc-20160816; b=FYqR2OKypWJsRt03pybS+rVwD2FUf2GTUwIBhW0Xi3BEVTzNoJ4xR8n339+Hms6cl6 WShWjxU8RhU4+1M3dNubGshlKDHPUa+QUDRXrVD9Wq3wOUPz9nZVlUDRZiiTp/oQ2zBv DxT70eYOrZ7jvjDnhofKhtrjjsrKE8Up6upNCNFxy7YGXsm/8kQp0hMqreUBXzvzNeeV BICiuSft7osxD1/5SOGDgawCfpnYQVCnMbO3b597Xj7a+WcBFqp1NTS64s12boiuQqmv zS7+opXDpHK0Ss15QHfjZcYeHwTmoQ3yiIBrphzxmKz78TI0Wb0OR3E1LJy4Il58wMLa n7EQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nPbhsL8PH7DAQnSNn/CqLVbyEdCNM4a7x8YCLh7zlCQ=; fh=yOZDRgd+L04OQ3APiaMiMylAo2o/WThSLCT5P/Gd0G4=; b=sUqsRpkE/kE2gQ5VzT45yfZL159eL3Rsr2xojnWV8865hzn5ZEBb/ffA4Q+q8xLQx0 Tw5Zt9CCu7Ate+DsgNWvxOrRE7Ih6SVGTTinbdcRF4RCcHXeFPXN/sZqqCPN2kjP0ADp Z50FcUKZQ8VF+kvhwjUscctcv+KSG8otqr4fRJFCnHyqGdVlaT4XA8TBNhduxnMegQ6/ kRYAemKF6u2XkjR3sYVHKSFs4ouHH3tE2myH7HRqDphDrB9jRI3jMDEoBYVWvsNljjF8 zE3Shc3CDf41+lYzKrMjBxaNHqXB43+aiPDW/adMvQKpgLK+SbV2C4cXpT9d/ATlO0eH obww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=tyQc2QsL; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a170906374f00b009787b15aa51si6913705ejc.713.2023.08.13.23.20.29; Sun, 13 Aug 2023 23:20:53 -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; dkim=pass header.i=@amd.com header.s=selector1 header.b=tyQc2QsL; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232515AbjHNEPl (ORCPT + 99 others); Mon, 14 Aug 2023 00:15:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232724AbjHNEP2 (ORCPT ); Mon, 14 Aug 2023 00:15:28 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2052.outbound.protection.outlook.com [40.107.220.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95148E5E; Sun, 13 Aug 2023 21:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+1bMYDq1doyllk6PkespwgouPGR1iwkwSIASdeGgw0zNepWr6DiL5Mm5PE0ehmq9IHRHWFOkdudqL4FWCP61MPPeY7fuAS69k2X+S3V1gsKxuLp5zVv4Kltvcs/plHThVMaxH2hj6+mknqcOGTwU3QEF7FCwshQ/FAGEEw9V4EBbtoB5SbtNs5n8ooQy7PlsOdNDzuEZOE6w9sl7e2lH0XMK/NI013n+WHGrr4dQh3vTa8MkkUyt2HLq92DPKFWktAN6KRCortqDuJ9clsDyEDidRB+eFe9DZsTR/h8cDpxhMwiIZeCvo1ge6XIeclyVoAUIGMYVpDIb9bqkeiBlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nPbhsL8PH7DAQnSNn/CqLVbyEdCNM4a7x8YCLh7zlCQ=; b=Kui7oVyQPWZSNzAsrD831wOom2Dcf0wJhcr/TP81e+rZ6o4pg+7J5BEh8Ljlg3YGtEW24d26GwOJjBZs8KqLcN9hIAZjFKLik1edcnB8i8ixlVRIhNmoHoCETHjn472xjwDJFSVENP9Tw7vzyiXzLCG2oFTjv5fLPrIRya6jws4YXTnqSK92fHAwocO5aexqQ33bEuCNBoA7p8uS11HfPTwEv2byuoab9lehas4QbT3n8XoZ/50iWj/hWX10XVIdWaguU2ojz1wD2IJDekw26w3XM29K4/YRVMkcIcTkBJpXZTLJrdqJskP8mEb19ClNjUWHYjtkoJYjQBIirSEFLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nPbhsL8PH7DAQnSNn/CqLVbyEdCNM4a7x8YCLh7zlCQ=; b=tyQc2QsL7/aE16IHdAa4bUXrwQcljeMYIvtUgxil/kII3/R8dWobv1Z4ot2YhgI4CXP+dW7m7J5x3131ZoGbq5PJOeAENkfelsJEDvemcCpiTdG46pwr+XsyBiYBNcRYPLNALkfEfp68TE+oswIM8f9pmo7Is8QG7RU5KSQmRT4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ2PR12MB8690.namprd12.prod.outlook.com (2603:10b6:a03:540::10) by SJ2PR12MB8737.namprd12.prod.outlook.com (2603:10b6:a03:545::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.24; Mon, 14 Aug 2023 04:15:20 +0000 Received: from SJ2PR12MB8690.namprd12.prod.outlook.com ([fe80::da13:5f6:45:fa40]) by SJ2PR12MB8690.namprd12.prod.outlook.com ([fe80::da13:5f6:45:fa40%4]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 04:15:20 +0000 Date: Mon, 14 Aug 2023 12:14:58 +0800 From: Huang Rui To: "Limonciello, Mario" Cc: "Yuan, Perry" , "Karny, Wyes" , "trenn@suse.com" , "shuah@kernel.org" , "rafael.j.wysocki@intel.com" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "chenhq2005@gmail.com" Subject: Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode Message-ID: References: <20230811213501.17293-1-mario.limonciello@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230811213501.17293-1-mario.limonciello@amd.com> X-ClientProxiedBy: SI2PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:196::7) To SJ2PR12MB8690.namprd12.prod.outlook.com (2603:10b6:a03:540::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8690:EE_|SJ2PR12MB8737:EE_ X-MS-Office365-Filtering-Correlation-Id: 15b2d072-3998-4717-6320-08db9c7d1277 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: arByasH16BqhfWAo6sKhiYi/Y6iaa85hWZ1yjASDFBT5jjOSbAaA0oTVSCRo+YofjdP6yM/zTC+NLB8i8nuQS5W/NO90K9iani+Dj9WHXzYtDcqwCY1FeuO2flc96GW/LMaG1C9mk/rQ7ZLyXCYmcyZbR8V0SqcNhxMXqFnlsSaHPtbJc1V0IT5+SvAv3pbE6lUS7bv1Os9KiJ0Elwhca6/D7fGBR0WZiHRIcpG7BBZw90XcBY1mIsHCUTU7Ue2GISTFra6s5rUo8UuJSizkJ1YqfbMdNhqgVPHrMJF0kzeJkTUqr4uqwFLWwd2AnLvQzZtRUSQW14ruz3kCVjbOt5HNGGDnIeczw+Y9DEE78pcxqRdOLDrLtioPc2o4vhGzT3Wnyg3fcz5B37+C67P3NCmms1o8/NaNLPCUEzhwqfKedh/n6uqeKWgTeWB9vtBsT1Rc3zslTuJX6Dc6XHxPrdJVyvGPDmgiaHESVlEMPH3Pha5uJqmBwxTEGfV+EJEoP8gjfcSUSy6GjI8+ix02AS4V7ckv+yAEEgQ6On8kbK0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR12MB8690.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(376002)(346002)(39860400002)(366004)(136003)(1800799006)(186006)(451199021)(316002)(41300700001)(8676002)(8936002)(86362001)(6506007)(26005)(83380400001)(2616005)(38100700002)(6486002)(478600001)(6666004)(966005)(6512007)(66556008)(66476007)(66946007)(6636002)(4326008)(37006003)(54906003)(36756003)(5660300002)(2906002)(6862004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?vWVtZLCVHVUXxMIhWOu+ePyxXDqxzDcItx7RB5XuF2JDG5jjFGJrAgBGxJh6?= =?us-ascii?Q?XBg05ZSkaB6DR3x03dXailnIszgT0aCQVTOPwqr2YnCrgEgSnBKaDfQvee2t?= =?us-ascii?Q?Pa3DBLqWypqYzN+UYIaxavXQvKL+2GeFFegIZhlqwEpqIGVX8kKT1/HIuByy?= =?us-ascii?Q?oWLJvortCd5LnVi5kIPSoRxIKhUqXc1Md12R7PRA+olNN+8AIcPmyU5qNeS9?= =?us-ascii?Q?7FdmmpMd/ixjWuj/YTznBe91/8Ge/nAipJ3bHInD6yEYZLKegQRJVJo0nQL1?= =?us-ascii?Q?lgoVig8AO2Slp1jMTZuD45kTINxpUSvnj/V7opq1Hn6y01Zvm/1lVUrf0xeH?= =?us-ascii?Q?y/Jax8toUgi23gJf0DdjgZ5ELoV+F2f4NP6/sq4K7+GcgZz4vvcoTudmkLIp?= =?us-ascii?Q?fHpxtPvvKYZ3Bfl2C5M4UCbEIj4u8SJrU9mBouZtASjxZA8v3hYV10Tb49iy?= =?us-ascii?Q?+tNtJuXBNJ0NqL0zhY+QoAzUOBsfUDjpQ4GUE8/R704pAeA770l/S97wpO6t?= =?us-ascii?Q?fLWG+5cGzD8EG6lAP+ps2ASxHKEq5y0UE7fLLkAsVPpNpHxpGHAkIJb1+gXr?= =?us-ascii?Q?y/+AaEYL/K7wkoLPw9mqmbURu3BgIDsMl69IuYHlvpRv3rMDvFvy7Yav0nkc?= =?us-ascii?Q?hnIVPUga4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ENFN?= =?us-ascii?Q?66vOx+hBAczzgbO9pJpyDkCQe2wKqTY3TISLwNai?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15b2d072-3998-4717-6320-08db9c7d1277 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8690.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 04:15:19.9275 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QinoRe75Z5UMblUPxbDBOrWZufJ/OqjYhHXO+J3Su3mZiyUDjKox3jV5EohtWMhndYaghnbMK2f8l/MOBcV//g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8737 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE 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 Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote: > When running in active mode the driver for amd-pstate has -epp appended. > This throws off amd-pstate detection. > > To detect amd-pstate look for the prefix instead. > > Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors") > Reported-by: chenhq2005@gmail.com > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755 > Signed-off-by: Mario Limonciello Acked-by: Huang Rui > --- > tools/power/cpupower/utils/helpers/misc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/power/cpupower/utils/helpers/misc.c b/tools/power/cpupower/utils/helpers/misc.c > index 9547b29254a7f..01c0440efe850 100644 > --- a/tools/power/cpupower/utils/helpers/misc.c > +++ b/tools/power/cpupower/utils/helpers/misc.c > @@ -95,7 +95,7 @@ bool cpupower_amd_pstate_enabled(void) > if (!driver) > return ret; > > - if (!strcmp(driver, "amd-pstate")) > + if (!strncmp(driver, "amd-pstate", 10)) > ret = true; > > cpufreq_put_driver(driver); > -- > 2.34.1 >