Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp803653pxb; Tue, 3 Nov 2020 13:00:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6F7Du40sIUyJIWdlwIFNzPLOBOnFexI3rqKIq6AIPiEu7ET/eHus79gZLYoT0EtziCQXS X-Received: by 2002:aa7:d5d8:: with SMTP id d24mr24812023eds.8.1604437229430; Tue, 03 Nov 2020 13:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604437229; cv=none; d=google.com; s=arc-20160816; b=WPoV/jEYASJoESbgHSVOZBpWUugkxqwHyaLeYNHAFyWOGy+RbbAE3jTyGUEtvS2KdN qqcMxE/A02Q8Tqxkuy1/P6awtTSK+fvkKF3IMqPrGkYxHOqvXE9BlmuRMeC7ltSnI5pD hWJH5kI92y+cvqs5Db7UjD90eMXruR9C0BrnXVO0V75U/7COWQBxcdjW4xkb/KuXG6Iq 3FjfNcEgsTPyKcbKY9q6tObU+OHx/mAli9JmbxfDuik2F8vN5I1vkCg8LCe+ujN4Ohm/ SMfc9MWQHm8mAtTpLoVAlQG0sXyObsnBK731qkyzoedAg9ylDaRwPayHDJSz1MOXFww8 PXxg== 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=mXDt1R63LCDSNOtyB57pC8WCLfrZ3/Xn3Qu3DvSxMvU=; b=BNSZF2k0Rs1UkP6jgz2PxVmMvW77jQRH/YGXSuxjSYUEf3rGdLwwxIQ5sjx3HWC/5/ v8nqdrCr7ld9qgAc/G+k8nO6Km4K6FRpnBWqqHayeBWDv6HGEaOxwEdej4SZ/wadootX mjzDdboJB/uS+whjw36ZyDK87JTPcYRlAXNPo3MNAWmkR6ohsBVGLX3209862xpBFGjF E/K7MUhTHR/4HYHs+meWhqh0IZ8Haoug9DIQN+UO9mRL9m+3KMFZl33npHBPxSCmer71 +dk/c1dK/pQYUS6Mlfn5orNkgVrISYjtprYDXp7yHpkcKlVNOB0XgKFvOBtsOTVXdGRt wTmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HBPaxF+P; 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 a2si7694303edn.504.2020.11.03.13.00.06; Tue, 03 Nov 2020 13:00:29 -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=HBPaxF+P; 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 S1732355AbgKCU6t (ORCPT + 99 others); Tue, 3 Nov 2020 15:58:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:33338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733002AbgKCU6p (ORCPT ); Tue, 3 Nov 2020 15:58:45 -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 2651A223C6; Tue, 3 Nov 2020 20:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437123; bh=BNGxJlU3JN8csNigCSCLdPHYC1HlCwrdWfew4bNAczk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HBPaxF+P0vm4WTVyQlOJ1+8+8sX2FmcsONRUgNP7nnSj8FPnNeWqeLJ/7iHo+o80R qGvOH59Ys4+oplYuQo5pMFNgUOsfexufq1UAWjH5bwlFr8flITq30+UknXMl04qiXC kgIoZ1oM+4WC8NIPwmhZN7NUBrXgZRJAUZRZu0+k= 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.4 117/214] acpi-cpufreq: Honor _PSD table setting on new AMD CPUs Date: Tue, 3 Nov 2020 21:36:05 +0100 Message-Id: <20201103203301.847395803@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@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 @@ -688,7 +688,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,