From patchwork Tue Aug 1 00:47:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meng Li X-Patchwork-Id: 128945 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2383971vqg; Mon, 31 Jul 2023 19:02:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+Wu0MckNr64SftmOzqP2Iai5yMGwnw+yHmRmc0AAVAzw+L76lDULWNM5uk8JdBibh4kkd X-Received: by 2002:a05:6830:da:b0:6b9:8ff8:e87c with SMTP id x26-20020a05683000da00b006b98ff8e87cmr12319821oto.24.1690855371366; Mon, 31 Jul 2023 19:02:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690855371; cv=pass; d=google.com; s=arc-20160816; b=TV5SOKenDd3MZkTSsOQjqkk5Abbhrx7zxmS7TptTpacAPyBBRiso1flbBTpwbTEXvA Ahm6v+H5R47a/rGRoLij5MWuHFw6IvqHGljG5uxvjitlZ9Imw+/FOgRjAIIBCtzwW0UF CrpgOhhEk2D/CUawEUUQuqJ4tCcsS+4/mwwMNQyx3HGZz38cRi/P48SAXdWlwnVaE16q dVrnUJj9yo5xTzCJi6Z1qlgBxl6jgtNLnH8CsuFdhi4iFV6IeeLKT10WFjspWYpYTMGO +IeYAfY925xLAg874PXpNIbMLMBoDmqcDxrdCukThPCdqoU5xjdmyN6cuesEqZvyILQo 8ZOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LE7X7fcwHH/1ZPRFv1kNy0X2k1euQPRBSK+CtCg2RkI=; fh=ht+HP1rrTtxn22OGBXCzAsCM1NevCqH2iJGbyKMIx34=; b=NJFemC3uIHOl7PmDcCDBb4tWQKjsfX7vaKcT4UinXMTgFi8lO22uZnH/dFFWJlbRXA YU/bHUI2V9Ds1YYE5kU3uRfeOt5gLu5Qsek+CYrIN/aQvowNcSk7kwgiRsQXaAzXUzxX YRcI7eR5YwS3HQp3wcrHueUjeXP6wpynC9AcZAMpHqMogbT/bh4mXBwzQS/KF4b3z1pf 1Nz5pr+cK0fahDVu5oKA6HgeuRlduw/tgu9dYsHCxRFDTZfvdFIR6oOnXenfSdOkuBTr S+yNyYpnrGw9d55Hd638sZh8H2rfkR5nMtF52AynGcG8sEifLyskqE0M8qoIW9b1VXhu YuCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=jViX5XjJ; arc=pass (i=1 spf=pass spfdomain=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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u186-20020a6385c3000000b0056383a7ddbcsi8097474pgd.103.2023.07.31.19.02.38; Mon, 31 Jul 2023 19:02:51 -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=jViX5XjJ; arc=pass (i=1 spf=pass spfdomain=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 S231280AbjHAAr7 (ORCPT + 99 others); Mon, 31 Jul 2023 20:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjHAAr4 (ORCPT ); Mon, 31 Jul 2023 20:47:56 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79871116; Mon, 31 Jul 2023 17:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UQ6z8cOyG2RuV5C/rlcmDSpSIjSAKawPu7oUylADb1vLhNDcBi3/NiHJtPXRgFclC5Ym27RCPx1RfrUjgz6o8KGWYf2ckYdz/1SzFrJ95lN7MI+JxVr03Z1m7Jnm6t0u/9mpYs+FKIyEbPhiGX0zMNRgwWAx0VctsHZZ0lT5pyWHPnoj2O07u6GQe9LBpZJTnAdNvmEmGfIIJuqdZkhVBuCw4x3p+Rr1XcQXMUA2NtFzkxf2vcJmk1VxnvrTYVwiLrL3IR3SBBcCzdbKMQ7Zwbd1Lg+4T1SSemgYK0CqIiiLcfW18BP7mvGQtDk08kbiLV5LAtqiW6PSbrBGr/tl3g== 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=LE7X7fcwHH/1ZPRFv1kNy0X2k1euQPRBSK+CtCg2RkI=; b=ihoDAEegGN0gONKzsb4rZSdbubHbKC3Qg2BbYkQB3M8uHFmHxSmWaeOjS3uaGucyipiY0NDbmMxpNdzuewuelG7TlIKULtAby+iP7wlY95lLoNLsJnjdvhAvLMkniolqUOjjsvWpC7mwt6Bvs5Lmrzn2+ErDlT2pcSjnJb5GvBBbuiCYChtgcF0Ywyr9vqjaOMEWWp2GlE8+rlo5nHsCARvVkzr9OtTLP9elD8I/NUz8Z9ZAoX3gHzcIW5d7uN5EEX5IXREH12E3WBumStw0MgLpIe4tqIcONm05BzTZHhjec0aSSo444uZ80FVzcx3s90n/xEMin9gxt+vmKezFPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=LE7X7fcwHH/1ZPRFv1kNy0X2k1euQPRBSK+CtCg2RkI=; b=jViX5XjJzoqrmrHQ/B8NeQgEBrbYYFFyu7XL0laOo6iQgLAOwvyoY77gRpZ8ZWGH/HDQdMBGOoEaJNGJJOYB8Il1p3bDw0NNdPBGbCSyqi4eYAmF3yuPvSfZQltiuVpucGnW8dMZyfObFQG6xRaxh5hzzb32ebBKQ0vEXlNM9ck= Received: from SN4PR0501CA0028.namprd05.prod.outlook.com (2603:10b6:803:40::41) by MN0PR12MB6342.namprd12.prod.outlook.com (2603:10b6:208:3c1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44; Tue, 1 Aug 2023 00:47:53 +0000 Received: from SA2PEPF000015CC.namprd03.prod.outlook.com (2603:10b6:803:40:cafe::81) by SN4PR0501CA0028.outlook.office365.com (2603:10b6:803:40::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.18 via Frontend Transport; Tue, 1 Aug 2023 00:47:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF000015CC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.22 via Frontend Transport; Tue, 1 Aug 2023 00:47:52 +0000 Received: from jasmine-meng.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 31 Jul 2023 19:47:48 -0500 From: Meng Li To: "Rafael J . Wysocki" , Huang Rui , CC: Shuah Khan , , Nathan Fontenot , Deepak Sharma , Alex Deucher , "Mario Limonciello" , Shimmer Huang , Perry Yuan , Xiaojian Du , Viresh Kumar , "Borislav Petkov" , , Meng Li Subject: [PATCH] Modify the function to et the highest_perf value Date: Tue, 1 Aug 2023 08:47:19 +0800 Message-ID: <20230801004719.1298415-1-li.meng@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CC:EE_|MN0PR12MB6342:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d2772ce-8042-4ae8-342d-08db9228f011 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Szmsx6TssNdYrdy6BzcDRnia2FL6zmHu8XPR4aUKqN0kzvGzcDmd07XIJk8qaZ7VNmCKqDLvgXj7Z+JTGDN6YCaeKu/0clsLSSI7Np0buZdvODwdDSpAE0ixC2duNpAT6VyiftpRLnwKgRmR3gsC509eWP3RciTMv6kzhbWiCtUtrvfHLs61chKnQfUj2SLc5ttVKFKM6HGm+ZcQHOprKxZ2KGrFf+J0wbdZ4mQVYsPOW6FLtm9eAJSrhCwjxCsbVdAmI5l3K2dYoShEPxzaPPIPVO6811CXKLzFVJOlNj3y1CY+aQ3t9ZFaG097kEiX6bqQ2tZx+U4BYfF9CPOMbF3Tyq44KkYbrWLccu1dIXV6JvTLELM/+DZXOifKpXms7kq+62+iGCrVxfSGnN6JJ4/zZV7aImja92RQacX8qDWMKvtnPlo0VIWyFQf+CJbnSQw28h+veb95QYIgMMxIB9VDeWawe/E8wF1qk1Yt8X7a3l3Keh69p1lNsM/k151YxEgiKZFp3Dsrh96rQBizmBBzy4Zb/1NaF2id8In8LSVjySeYs9di0NmNA4rwTx+TN/qv27hmfY4+3KxMZ1hq14s3XP662YWc7uiZSEIb3R2L6SCxpv1DFMiIKNYJ11nICU+y8wyABn7+TIA56AqpSHx8qcysRecomznCCBIht4rQo223Gdgbrl5dGac4zSV99/q/G8Eesj0Y2oBYMm5v7YEE3zX4fAe0J6c+R924vcZiuW3jtwBrZ5QfIIueIYLcjTIMwlfxyA5LteefoEUzJw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(39860400002)(136003)(396003)(451199021)(82310400008)(40470700004)(46966006)(36840700001)(7696005)(6666004)(40460700003)(86362001)(47076005)(40480700001)(36860700001)(2616005)(36756003)(336012)(426003)(186003)(16526019)(83380400001)(26005)(1076003)(81166007)(82740400003)(4326008)(2906002)(70206006)(70586007)(316002)(5660300002)(41300700001)(8936002)(8676002)(478600001)(110136005)(356005)(54906003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2023 00:47:52.6438 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d2772ce-8042-4ae8-342d-08db9228f011 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015CC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6342 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772990362257421072 X-GMAIL-MSGID: 1772990362257421072 The previous function will be deprecated. Signed-off-by: Meng Li --- drivers/cpufreq/amd-pstate-ut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c index 7f3fe2048981..9c889a4a0177 100644 --- a/drivers/cpufreq/amd-pstate-ut.c +++ b/drivers/cpufreq/amd-pstate-ut.c @@ -145,8 +145,6 @@ static void amd_pstate_ut_check_perf(u32 index) struct cpufreq_policy *policy = NULL; struct amd_cpudata *cpudata = NULL; - highest_perf = amd_get_highest_perf(); - for_each_possible_cpu(cpu) { policy = cpufreq_cpu_get(cpu); if (!policy) @@ -161,6 +159,7 @@ static void amd_pstate_ut_check_perf(u32 index) return; } + highest_perf = cppc_perf.highest_perf; nominal_perf = cppc_perf.nominal_perf; lowest_nonlinear_perf = cppc_perf.lowest_nonlinear_perf; lowest_perf = cppc_perf.lowest_perf; @@ -172,6 +171,7 @@ static void amd_pstate_ut_check_perf(u32 index) return; } + highest_perf = AMD_CPPC_HIGHEST_PERF(cap1); nominal_perf = AMD_CPPC_NOMINAL_PERF(cap1); lowest_nonlinear_perf = AMD_CPPC_LOWNONLIN_PERF(cap1); lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);