Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3187214pxb; Mon, 9 Nov 2020 05:09:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwx4ZLhfTXOx7jrVNbZ73VV7rEY8jgJEmSFINDvvx0ynAUcEncAh6A6TOT3dygig5Dbb8O8 X-Received: by 2002:a17:906:1a14:: with SMTP id i20mr15592558ejf.422.1604927344642; Mon, 09 Nov 2020 05:09:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604927344; cv=none; d=google.com; s=arc-20160816; b=ar//STGVVxhVR8fYDzDChlBpluvwDlyWW98+LyTeNrCxwfXjz9b74vVdrbyhOwypsa QHvFXHlVS/CQpVFU98V5x5yuSt/cjysjoRhdAsT6D4q3V9qjesrS5v+GY+HejJKi/8Il KT1pk4YxCSixrutJj17N3vIYH92pdb0VnLfK0eDut3ziZNcBokJ7t7X0fu0Qbiq+SgJC 9q96JLnjnkVBmxxxc7EPHdEyuoIxCv370IqIE5r/IwTB+D9LLPYZeLm1yKWqJcA4couh 4jgPBwVq0/lzLOmdwqmWdoFXwxdWYND/j3zI/UdCMbKZyVVqc7JpJfAOmPmk8GQDRjnP 0Ybg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=deQvoJQwLH6JkPxQknZmG3yhFRZw5f4jcOw9HHpgyqA=; b=MkIi9NxQ1sBnOojXYpLlCEG9PgIwQaalVOgrTnLOrFh7NvG6YGyLdisCtA8AX0GDo9 xZ4IMWlZFi6d0aECSJq+hYsuvUdiByRcPXCtGgAfvAw5a6JInq5eW7EZPQdq4FrNSwXC lURD1BfGiuCughY2RXuhg7apM27/Ruv3N1dWsJzMkKmdA7MNu07jKTtOyHKUT3OSF9B4 WOlewQeu6jj1Nh4e3HMfZQYrmxZXKBYCtOIXscB5BLZPT0cXOjr11KGFPmUaroMEAKzU pDfYgIVsL7UoUgbiITtmtlgx5nnSqyYG45mxa6GZEpUnLOXWGM9Xp4E770bcm+laiV1q IzvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ctSCmk/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt25si7438020ejb.507.2020.11.09.05.08.39; Mon, 09 Nov 2020 05:09:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ctSCmk/b"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730821AbgKINFE (ORCPT + 99 others); Mon, 9 Nov 2020 08:05:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:56898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730729AbgKINDn (ORCPT ); Mon, 9 Nov 2020 08:03:43 -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 F08E820679; Mon, 9 Nov 2020 13:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927023; bh=r4QytLjGM3rkp6LcG8DZrrcDTr6TfRcaoUbl/jivR3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ctSCmk/b79x4i/7avT3xFM9PO1KG0QyENaqEa+BDY0/k6OwnMP3AgecIFGSJ2qMt4 j9/W1k15+Or23OkR+hNKkj6A4ZoQnMVgvn8Cc1bmgCqQcxFaG40RryUw4a/sTkCAqE gVR4Y2xBi2w2U6dstB9vWLkEDyFZ3uuO5Po6cg7E= 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 4.9 054/117] acpi-cpufreq: Honor _PSD table setting on new AMD CPUs Date: Mon, 9 Nov 2020 13:54:40 +0100 Message-Id: <20201109125028.235497753@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125025.630721781@linuxfoundation.org> References: <20201109125025.630721781@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: linux-kernel@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 @@ -720,7 +720,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,