From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 276D7C388F7 for ; Tue, 3 Nov 2020 21:54:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D44F9207BB for ; Tue, 3 Nov 2020 21:53:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604440439; bh=NW0U1W3wX5zGcOkRlyJqFaknJN7F0OGeXHgri0MKvhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HN0rgFSBlTRsVxhUkM19S/1EUOEvrgxeZQwf5rgMvDofWdXyy5ciXEeB/aZycB4gC 2fq9AFfmutwldzg26eZEikYHv53dK8VGq9lUUHivA5zgUbDXmK7KaXyg94sFXcJMRY SoLYGNoCRMC2ZKQyKOa7+RbhR89cQ5cetDbsdOk4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729616AbgKCVxz (ORCPT ); Tue, 3 Nov 2020 16:53:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:34624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731100AbgKCUpx (ORCPT ); Tue, 3 Nov 2020 15:45:53 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77B712242A; Tue, 3 Nov 2020 20:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436352; bh=NW0U1W3wX5zGcOkRlyJqFaknJN7F0OGeXHgri0MKvhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tympPCwbwrQi/QAvE+hgrdGqcHquVCQBqVPUxhhBZXb8dD3TkhrH6K59Klhat8nB+ EyPFK/qbEg1t116j1SbRlWTr33RHPRpI4TUyvGGjwTaCyKrlhyEHsiVkVoIKL8Oo/y tGyt9K8sLdXUh9rX9+xYtZgR+T+rO5x2NZ0Q3JOU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Huang , "Rafael J. Wysocki" Subject: [PATCH 5.9 212/391] acpi-cpufreq: Honor _PSD table setting on new AMD CPUs Date: Tue, 3 Nov 2020 21:34:23 +0100 Message-Id: <20201103203401.237117146@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203348.153465465@linuxfoundation.org> References: <20201103203348.153465465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Wei Huang commit 5368512abe08a28525d9b24abbfc2a72493e8dba upstream. acpi-cpufreq has a old quirk that overrides the _PSD table supplied by BIOS on AMD CPUs. However the _PSD table of new AMD CPUs (Family 19h+) now accurately reports the P-state dependency of CPU cores. Hence this quirk needs to be fixed in order to support new CPUs' frequency control. Fixes: acd316248205 ("acpi-cpufreq: Add quirk to disable _PSD usage on all AMD CPUs") Signed-off-by: Wei Huang [ rjw: Subject edit ] Cc: 3.10+ # 3.10+ Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/acpi-cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -691,7 +691,8 @@ static int acpi_cpufreq_cpu_init(struct cpumask_copy(policy->cpus, topology_core_cpumask(cpu)); } - if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) { + if (check_amd_hwpstate_cpu(cpu) && boot_cpu_data.x86 < 0x19 && + !acpi_pstate_strict) { cpumask_clear(policy->cpus); cpumask_set_cpu(cpu, policy->cpus); cpumask_copy(data->freqdomain_cpus,