From patchwork Tue Dec 27 19:52:36 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: 36993 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1556423wrt; Tue, 27 Dec 2022 11:59:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvM9WrmSQ1juMzTxqZe4lqXLmLDkyaGSm97wmp5e29DgdRra6XuA8uI4pycICcBh4hSeAB X-Received: by 2002:a17:906:e98:b0:7c1:39e:db7e with SMTP id p24-20020a1709060e9800b007c1039edb7emr26207840ejf.59.1672171181615; Tue, 27 Dec 2022 11:59:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672171181; cv=none; d=google.com; s=arc-20160816; b=u3DlNgYjmu2qv6FBr1D+srgW6Ypxb99qEKO21QicAOv3i4xi0d+PVM8fW0MMy9XZB7 dYCNlHgrRyqZIN1TC4Sm82jTqTWmQPfDcFVQnU208AqHmoYYx6e1H3C7CcEA5ThabE0W Vi02v4uITrW8Iltxs9S9YSywvATUtWwGQEXFoWth0i8hv5ODd9T6CmdqrY3qgAUgeaWk 24+eRqjRA8Skzt4UMOxEWbDSETfcs2MObBzB/XiM6MrfjOwbAd6Y5k8bz5ya4iOQaKKY EHrCaypH0eH6/l6Wz/qtQCEikfwGe0zovlBPLU4JJGefePRDnKVmfDMxDpF9o7isdKmO Qweg== 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=FjwBQcmJLYYUvsZQZbuOre0DLNw9RXAPLprI+tZmh4g=; b=Uc6N2EP+5L13vLTF3V5V3D1JPHJ/tLOT5nKKjDsAlQNT+ppaRfhx8IfEruDMc9NX9w lv9dM6ISleLoouxaPZkZal4VZSXDjFYZt2+wLeRvbrPahqa4m/9XoVLyboC4JmPssKaX xk/LNxd0Ns6vM9X9KEllLGg0Cb6Jw3uPGQSleXA1pDPteO7RkUU4SjvEWxxKi+TIAdTE LSmK2G2wElAv1WFkad4Yd34IjoK00zFUS+qJT2CJgKW3zJiiokglv5zUYP5m/k2u4kz6 WYOXnBPAWUqGb7Ja3xkIm9nxajwL0tsAXgpdsdDTQBByu/U/TJBFycg2jmiNDM37afsd 1jnw== 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 g19-20020a1709065d1300b007c0eb33879asi12209100ejt.667.2022.12.27.11.59.17; Tue, 27 Dec 2022 11:59:41 -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 S231842AbiL0TyD (ORCPT + 99 others); Tue, 27 Dec 2022 14:54:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbiL0Tx5 (ORCPT ); Tue, 27 Dec 2022 14:53:57 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17ABF110E; Tue, 27 Dec 2022 11:53:54 -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 ac6a96e2c458935b; Tue, 27 Dec 2022 20:53:52 +0100 Received: from kreacher.localnet (unknown [213.134.183.5]) (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 DA62D28A34C8; Tue, 27 Dec 2022 20:53:51 +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 v1 2/2] cpufreq: intel_pstate: Drop ACPI _PSS states table patching Date: Tue, 27 Dec 2022 20:52:36 +0100 Message-ID: <5908813.lOV4Wx5bFT@kreacher> In-Reply-To: <12138067.O9o76ZdvQC@kreacher> References: <12138067.O9o76ZdvQC@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.183.5 X-CLIENT-HOSTNAME: 213.134.183.5 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedriedtgddufedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppedvudefrddufeegrddukeefrdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekfedrhedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehpthihrggurghvsegrmhgriihonhdruggvpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshhrihhn ihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh 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?1753398568908112365?= 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 --- 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");