Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp290810imw; Fri, 15 Jul 2022 03:23:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ujAPrGmF3iLxEKK5QOy7F7vA8kzCl/+9gk8s7OK21P7KIIQ2qZoJxH8AYroc6nPBB56FPM X-Received: by 2002:a17:902:f544:b0:16c:5119:d4c2 with SMTP id h4-20020a170902f54400b0016c5119d4c2mr12792380plf.1.1657880627513; Fri, 15 Jul 2022 03:23:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657880627; cv=pass; d=google.com; s=arc-20160816; b=IgAQ8eDrnb5mtNP9jl6WbS9YIFvX2DRQ3vYwerAgYeKretZ/0J7mE8YxBUQPP7xQfu GuzdOg4wl/5V92/lBybCHJgpIucQyZpXXLiyMN5nxRftVThzLCmUWTnGr3KWKd03Qasj ARJ8JJ9bZMw0rbtq0PVw/1w4dCK1Pxd4keCoPWYbc8BSWP2HbxA/vaNA4YJ/S5WJcfe4 L0vFKFABVBdLcHUTP3aohxD6fPRDRXN+nYB/AQXDS7vJrESolDFtJEzwgCayl1lERjkx P4Mxj6QaAh+eUR9OyYJZyUJcOi6MMuL2+STycmzDVAI1VhgsRddewvAqiVDQ93qmLKC6 uEIg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tstHPiTPGZyIIUpZRPQPnBlc8CCgMG9WDEwA/OgWIII=; b=FPCxAzGQ+UFj7MXGoLbryEiRh1LQ3BhyzgK3tGVWQCk4Ti/2VJ5tof20D39I1qb0cF FXSzp9WHfRzJYqkSpiniq9uFBz8LZwEV1ep4TsvikfklFp+S/Xx4MSlUdG/vmihaFkf4 JFsrakIIHnMam5ZFCqlqcz/F52T3oGnv79oxWoxdfSKAMrlgyExpc6pIQ5lX0lnXvdN1 pehjJcILIspfFI21dtwXmtzzvOW8XH7zT7iDHDmCStpamRGXwBD/xfOdAI2JDP+pGbVE uKLeYmnj71+HeUsNlh2AjMCT4iuGiTv5v9mw/LcTu7xhmF/Lu6KvME25LUO/Uy8a2zmA 0tjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=s+kyLWho; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h31-20020a63211f000000b0041288737bc6si3866546pgh.797.2022.07.15.03.23.32; Fri, 15 Jul 2022 03:23:47 -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=s+kyLWho; 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 S233022AbiGOKF6 (ORCPT + 99 others); Fri, 15 Jul 2022 06:05:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234074AbiGOKFQ (ORCPT ); Fri, 15 Jul 2022 06:05:16 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2048.outbound.protection.outlook.com [40.107.92.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE0C184EC4; Fri, 15 Jul 2022 03:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nLAhyVdCLLNKYbsg3wUc/Cev2S2QrFvpqKgjeI7rfC5AovzZs3zewlcmDnOWskeeJ8vDnRaItNgdoRHuwMgWUcZF40I4dk2AJQw2e5eD7QeaGkobZ0OIc9JXadZK+h2rX3W+nhY2NzKnhLSHsYYoBuYeDLNAwM6YN5OkQkKiHZQ3YQ6pHwowzfGT829U9KH/ycmqQkDQyF/tGSQiCrTgUqZij2vxCK8Y/HT3aIsQ9ImZdSb0oxiKuUwX0LNf+c5HAK3N8TpTyIKAdwdbTHlfWR5iDdAdzot1+9j7Z4WX8QljkXHLWAJeieDfDhBX8F28LsPIPYXMgbhqWVGWgun5/g== 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=tstHPiTPGZyIIUpZRPQPnBlc8CCgMG9WDEwA/OgWIII=; b=E8RPCo4hrVb5bWLVddgzsslDnBfjoyNtC0TW1KF3N9WEIMmHpMsQX1dNQwUEa+IIbN3PwQP7P6Nx7u5Ob2/Yd0Zsy2EZI+csKjEZraEWYjgFFr0afMV6j/zuWN1Fw+0g590HV+l+KqNe8HZge1lxhkrjxupBN4g7+qqiyOW/tj3bRW19X5TWkkEd/x7Uswf1GGW/fRvoD0j0JRgw3hdp5IwUUlmgO60WnUOU4fwGqXMkm4iG1gez/gAlBU2t3ElnAz4G38TlTSNtbN9hARMrFyNIP/STXq2sgHUZioMQQ6zxcBcCgPRdRdMGZwHgcHp3VZM0SWmhOmRX7XbMshOeDA== 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=tstHPiTPGZyIIUpZRPQPnBlc8CCgMG9WDEwA/OgWIII=; b=s+kyLWhoJ7e7T0eIObaT/+D70SI/W2Ztey8qcWY1PHXpNMJuZQBLZq9qU+A5Hd0jlXnbRHSNZaqPUW5V0TVzInZ9rBiMJ9I9HHtvBvCGHT4aQIofOSZbH9YzNJvvUFp6HkQT4yj3iYsgyHHrwQsMMnVowBA+K4ZDwOluHCIHMbY= Received: from BN9PR03CA0520.namprd03.prod.outlook.com (2603:10b6:408:131::15) by DM8PR12MB5413.namprd12.prod.outlook.com (2603:10b6:8:3b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.15; Fri, 15 Jul 2022 10:05:09 +0000 Received: from BN8NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:408:131:cafe::e) by BN9PR03CA0520.outlook.office365.com (2603:10b6:408:131::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17 via Frontend Transport; Fri, 15 Jul 2022 10:05:09 +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 BN8NAM11FT031.mail.protection.outlook.com (10.13.177.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5438.12 via Frontend Transport; Fri, 15 Jul 2022 10:05:09 +0000 Received: from AerithDEV2.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.2375.28; Fri, 15 Jul 2022 05:05:05 -0500 From: Perry Yuan To: , , CC: , , , , , , , , , , Perry Yuan , Su Jinzhou Subject: [PATCH v4 06/13] cpufreq: amd_pstate: fix wrong lowest perf fetch Date: Fri, 15 Jul 2022 06:04:25 -0400 Message-ID: <7091e6ddb8605bdd870bad3273b03eea67354bdc.1657876961.git.Perry.Yuan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 495bd8bd-ad69-4d31-df72-08da66498032 X-MS-TrafficTypeDiagnostic: DM8PR12MB5413:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3E3I+9OipyWXTu1E84fz3K/dxECxXp63vY12bzcCQ8T4YP1NBa78/SGXYtDP5hsZpQtMmgkxwx3Fc6erc+yEvp6zz2drXr0QftovjQvvplQl8hSgSNf3R7m9ItfMOmXFfirKybFSR+nCwMZ4rkMn7SZH7rhYhZaxWrMayFkm19c9j3YR6yHkCEZIB7aVXkwJ8GOC3AEyfYIr9yL4q+GFWvGmTIXk1rOSvRbC95Dw4TlsBN+wa45EY36jDNObJ0oo6OM79pkZqzTDegyNcZJR2FbnvbBrGUUwVo2aQtQAaL2O6NJiK/ng0TGqllFsWsEVWEPRKJoI0/CwSCrjrgaJVXO0Szk73wQhmM3CpYHsSsqro+mlLUoSHqvYm1NZaqjMYi6NbXIsxNGuq1sdMEqwad0eLKn88aWVX5P6fXLcOJdje7R4vuaweLte4luJYznx1u5DeIi8pKE6cBMLmlbOR5ibPF3V1k9y896HFWCUtcS2sRao+FWWa8jLS04EJD8DD0ofTRd9sw8m8fnnotvw6WlAXHN4AKcNTi8Z+nBM7Oh0gvMwYWnMS8qq1jLHZtxvqQY5uX0eahVWVRG3C8jDwlyZVIU0DFUxVVRv0oy/fRiillP5m8gHaqbgdylZtCKO82F/c5IA+bcVQ8vVnWysjtZdQX02yt9XjVk6fXcVJTh3qaoFlCKpXGst1EsToQHUvRNOAtwogeffnWvuUj9D8xeRfkBGlKcQD1NBrbByb7FXtIY5FWOqOD4F5Lsc/FEbj0i/TL43MhkSJ0QL24vgq/EGvczWhKxjnf1iW0da4vfxy0yM6Qfe70xKzuNwbsQkqWVSyiuRRuJkCKLoXfNgnWM3dwCLFzp55VJluKyxn+8= 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:(13230016)(4636009)(396003)(346002)(136003)(376002)(39860400002)(40470700004)(46966006)(36840700001)(4744005)(4326008)(5660300002)(8936002)(8676002)(40480700001)(82310400005)(40460700003)(36860700001)(2906002)(86362001)(36756003)(356005)(82740400003)(83380400001)(81166007)(70206006)(478600001)(316002)(6636002)(426003)(26005)(47076005)(336012)(16526019)(186003)(110136005)(70586007)(54906003)(7696005)(2616005)(41300700001)(6666004)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2022 10:05:09.5028 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 495bd8bd-ad69-4d31-df72-08da66498032 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: BN8NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5413 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 Fix the wrong lowest perf value reading which is used for new des_perf calculation by governor requested, the incorrect min_perf will get incorrect des_perf to be set , that will cause the system frequency changing unexpectedly. Acked-by: Viresh Kumar Signed-off-by: Perry Yuan Signed-off-by: Su Jinzhou --- drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 0c8256638ed7..4b764870035e 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -311,7 +311,7 @@ static int amd_pstate_target(struct cpufreq_policy *policy, return -ENODEV; cap_perf = READ_ONCE(cpudata->highest_perf); - min_perf = READ_ONCE(cpudata->lowest_nonlinear_perf); + min_perf = READ_ONCE(cpudata->lowest_perf); max_perf = cap_perf; freqs.old = policy->cur; -- 2.32.0