From patchwork Wed Dec 28 21:26:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 37272 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2094317wrt; Wed, 28 Dec 2022 13:28:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXuEFeYgwkb0SGB19Tokv5zCK6Zn3IRHWj2mLCJ0J5RbSvkhYyoDm16uvco6rpHIDbuU/o3N X-Received: by 2002:a17:907:c202:b0:7c1:19e3:9f21 with SMTP id ti2-20020a170907c20200b007c119e39f21mr20799619ejc.7.1672262928964; Wed, 28 Dec 2022 13:28:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672262928; cv=none; d=google.com; s=arc-20160816; b=ZBPPnJ2agay62W3df8cTwriz9eisvZPNcxBioKen2aLyX8tXvWZ0gprKuA0O67LPAA gljGC/fscnVpgcIhw+ulUIGtg7kEJFayq3usk/aXwWilMh3v4q/RRvEWx4GjrmK+4Q5E j0PDKj89H9TWfCoqBEm9J6Z6s9NS4FDZAVJG7UqfGbMojBFcfNjwnJGZ2zWbM2mxVDYy 7qwE66K7jSrjMwb+qJZ/UORw0fSrqaA/4q6SxRdfZGEWqlc9/XuBsk1zYwalT2HSjb3b 2je2VVwCMu3WHIEaP7/krbAIQ7J7kBgKu2DKfuofwYUNN3hqUPp3eLkRCw8MZ3xPbIa0 Fmug== ARC-Message-Signature: i=1; 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; bh=10UIk6D9X7SUYNOoN2MNT4q9OeCF4P0etVkIvtxGvhg=; b=ZINaL2FQfX8CC6z4g9eVVDwmc4zqGnC4gsVv7HP/aiA7ZRaRmlKDfMDFbhdZB6MWAt S7o8m8qRZz73GiyXnfxXQyOb8vroJRI3qjznqe8gp/5oXTcHDaKaBDT34DIIr6asWMGX /sT/S6PpEW27uYPCMJHeRtnERKf2EuhBJrz7kq+R6ax7t2OrQlVn/ZZ2yXzShpVIBo4o Rs7VRBzB0AzbkgNkdJfk6aD05sbqddoHShl/0BIJKFWj/g3tSPsTDhdSpgeCW8Wvn3nX ZnJr5lKXUMg17wnmXidEjOYmg5/bqd76SZjnyryB7wbsG5rIcrVccXyNb6l0bAcAEvuY V5ig== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd18-20020a1709069b9200b00711da52c6e4si15086581ejc.309.2022.12.28.13.28.25; Wed, 28 Dec 2022 13:28:48 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbiL1V1W (ORCPT + 99 others); Wed, 28 Dec 2022 16:27:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbiL1V1U (ORCPT ); Wed, 28 Dec 2022 16:27:20 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 273A8140B5; Wed, 28 Dec 2022 13:27:18 -0800 (PST) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 5f72451d9ceeb59f; Wed, 28 Dec 2022 22:27:16 +0100 Received: from kreacher.localnet (89-77-51-84.dynamic.chello.pl [89.77.51.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 0C8E9780AF8; Wed, 28 Dec 2022 22:27:16 +0100 (CET) Authentication-Results: v370.home.net.pl; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: v370.home.net.pl; spf=fail smtp.mailfrom=rjwysocki.net From: "Rafael J. Wysocki" To: Linux PM Cc: Pratyush Yadav , LKML , Linux ACPI , Srinivas Pandruvada Subject: [PATCH v2 3/3] cpufreq: intel_pstate: Drop ACPI _PSS states table patching Date: Wed, 28 Dec 2022 22:26:04 +0100 Message-ID: <2269998.ElGaqSPkdT@kreacher> In-Reply-To: <12138067.O9o76ZdvQC@kreacher> References: <12138067.O9o76ZdvQC@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 89.77.51.84 X-CLIENT-HOSTNAME: 89-77-51-84.dynamic.chello.pl X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedriedvgdduhedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeekledrjeejrdehuddrkeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepkeelrdejjedrhedurdekgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehpthihrggurghvsegrmhgriihonhdruggvpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhrihhnihhvrghs rdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753398568908112365?= X-GMAIL-MSGID: =?utf-8?q?1753494773094342441?= From: Rafael J. Wysocki After making acpi_processor_get_platform_limit() use the "no limit" value for its frequency QoS request when _PPC returns 0, it is not necessary to replace the frequency corresponding to the first _PSS return package entry with the maximum turbo frequency of the given CPU in intel_pstate_init_acpi_perf_limits() any more, so drop the code doing that along with the comment explaining it. Signed-off-by: Rafael J. Wysocki --- v1 -> v2: * Same as the previous [2/2], no changes. --- drivers/cpufreq/intel_pstate.c | 14 -------------- 1 file changed, 14 deletions(-) Index: linux-pm/drivers/cpufreq/intel_pstate.c =================================================================== --- linux-pm.orig/drivers/cpufreq/intel_pstate.c +++ linux-pm/drivers/cpufreq/intel_pstate.c @@ -452,20 +452,6 @@ static void intel_pstate_init_acpi_perf_ (u32) cpu->acpi_perf_data.states[i].control); } - /* - * The _PSS table doesn't contain whole turbo frequency range. - * This just contains +1 MHZ above the max non turbo frequency, - * with control value corresponding to max turbo ratio. But - * when cpufreq set policy is called, it will call with this - * max frequency, which will cause a reduced performance as - * this driver uses real max turbo frequency as the max - * frequency. So correct this frequency in _PSS table to - * correct max turbo frequency based on the turbo state. - * Also need to convert to MHz as _PSS freq is in MHz. - */ - if (!global.turbo_disabled) - cpu->acpi_perf_data.states[0].core_frequency = - policy->cpuinfo.max_freq / 1000; cpu->valid_pss_table = true; pr_debug("_PPC limits will be enforced\n");