Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1228987lqa; Mon, 29 Apr 2024 02:02:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3LFySgXqrvQPDqrPmOIZEBcDE0r8VNH0I0RFoAVeiwVBcPEUsaxKO3ZAbotksusEglTQlD29GZ9QIOTFVxhdsNQmsZnI2+WYIXuUzJQ== X-Google-Smtp-Source: AGHT+IHqAA+EEZq8/yacsfuDM9W0O5LxVFj4XpDcbWx2ArX7hx/FBODaXa1BFvIrC6VGlouC/onN X-Received: by 2002:a17:902:da8f:b0:1e4:b16e:7f10 with SMTP id j15-20020a170902da8f00b001e4b16e7f10mr12704613plx.33.1714381343390; Mon, 29 Apr 2024 02:02:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714381343; cv=pass; d=google.com; s=arc-20160816; b=z3qjAkmJKj00h5KBfpKCj7BhTbhqRq3E++eGP4ij3fjZ8ixP/KjlPinA3Q05Litfp/ AeX6FxpSwxVXhsoHK3KwnpA60Y6CDLhQ5/NCIFgAdCwHxGDAcs6P7z2yd4GxWeFfxsWG LVaqNkSRZfov5LuAHzOPtWvoWYn1Nkz5lgskLKeuOpeRz6QGzE+MtU4+fVDxvryjiLvc +Bc0wnJFxMTIOF7dHEpHUM5Bx4CsfVJIbc73ZuD81uOlfQZFRQC2Yz8i/0YKhJIbcj62 aYK76E7zqyCv2gycJfH/ISNjGEwrenZzdxAnZlSdNCebiOfYBIHrwMFRAEupwIxiQS4N hRjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:cc:subject:to:reply-to:sender:from:dkim-signature :dkim-signature:date; bh=UBQ3/xFHvmOkKBZDD2JTU+kk6vyyWU5opa7TLojmLdo=; fh=JTk9+qr5gpUHTA82NAoTC2Dn364LtWPF0bcXdXoFHrA=; b=su5tvziHS37qVUgYrdW35h9BKLQDM6kMJHLau9VXtiKMubvprRVCy96fubVdGFCJwb sqPvAv8FT+Jr+KSWp6Sk/Gin4a4HVEn0g5L8yE3Bq94jiQ/Gn/Y/5/q635BDsZSksNIF 2dpfiGfohtFvSMOhVhnjcM6+wnPQrjc2sTPnF9JpvKE1RRS8V03I4oR3f8NGMYHmHCbW kyX6gV6McpbMBqTWmbQdK0EoPa8yfnR2xKK+XpE9BULnsbLazVkpT0PZffrYFzLoRRJY My0uXaL+OhCPtytI8U0ceDI3Nd4TqmMtpvU57ENRvubwDMVYRd5wdR6GHYqCj4b2n0AL pc9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=shxBtztt; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-161944-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161944-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p2-20020a170902e34200b001dc6699f553si18788089plc.360.2024.04.29.02.02.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 02:02:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161944-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=shxBtztt; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-161944-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161944-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AE891281468 for ; Mon, 29 Apr 2024 09:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C21C82375B; Mon, 29 Apr 2024 09:02:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="shxBtztt"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eG7DvdLU" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42E651B94D; Mon, 29 Apr 2024 09:02:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714381322; cv=none; b=muA6MGByJNfgZODCfqQignf0Q51JAcZaA7WYQ7bNodBAXkxaCG30awWjhchsHKs+wPBTvtLUcP9BWtq5Wugw+26BE7p1ME1X7iYvJzybHX3zRXQxhyYR4p8PawgqGvViYhNuoGnkvg1jpwnpsXfEnPG5NNimrvETur9L3pn/PXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714381322; c=relaxed/simple; bh=VwiSlRRDbWDn6PdVwR+hV6UDvWxYg6QVXvMzs6ZC2xo=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=X2QQhtDeRhspg2KbW0PzxsWYxsg3q49VCJ9g1TGp5Hkafr4XhWfh5geYPFhBt+AxdIH1Sy9VcvNLIiqa5iHm/b0qjFWPvqAkG+bBEUWpnDWCEMmoP+GPRUkpvZ0X4gnb5VoFNxys17fUb6jK54UxvaylX01y6lmnH5ovJgh2FyI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=shxBtztt; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eG7DvdLU; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 29 Apr 2024 09:01:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1714381314; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UBQ3/xFHvmOkKBZDD2JTU+kk6vyyWU5opa7TLojmLdo=; b=shxBtzttrWnDEUIckBIG70YY26dh2EmQZur+3za9XpgiJ9z8L4fGAAWR+Ois0u6ONB3KaD F68jaN2WiUwEmJMwrj5wXoFb7jYPaMXLDlxTvKRL1FexvjiQzGzkMlPLVjF5iFbRETtNTn PrelRL7W/4fvmy/gfVQS9oBxJPIOd+YOV4G8J/zIbiIXClpk5hc3XD9NkUF2Ix6Mzu47Fj HuYBNTgTDcAMYQi8Xh4DKH4eLIrxD1RzzA+UO0bfxohGC9Lm26W6376wT2IqlO1WBte1Xb hPMmaqMZGJV3J88XbJACvW8h6J6ElCYzPy3lHLR5UrkEjXF6h8QXxBBwHxD5wQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1714381314; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UBQ3/xFHvmOkKBZDD2JTU+kk6vyyWU5opa7TLojmLdo=; b=eG7DvdLUiWFryJR5XPCa3XoiVDZy0lSLpRfh/izx6qeb/B/J3FQlK/siJz3DFasU8XLGmF 0P//PXiFh7LCUsBg== From: "tip-bot2 for Tony Luck" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/resctrl: Switch to new Intel CPU model defines Cc: Tony Luck , Dave Hansen , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171438131416.10875.10178202659609684261.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/cpu branch of tip: Commit-ID: db99675e4338e97e1469aeae5564e8242bd8fd6a Gitweb: https://git.kernel.org/tip/db99675e4338e97e1469aeae5564e8242bd8fd6a Author: Tony Luck AuthorDate: Wed, 24 Apr 2024 11:15:14 -07:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 29 Apr 2024 10:31:28 +02:00 x86/resctrl: Switch to new Intel CPU model defines New CPU #defines encode vendor and family as well as model. [ bp: Squash two resctrl patches into one. ] Signed-off-by: Tony Luck Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/all/20240424181514.41848-1-tony.luck%40intel.com --- arch/x86/kernel/cpu/resctrl/core.c | 10 +++++----- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 83e4034..19b4fdb 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include "internal.h" @@ -821,18 +821,18 @@ static __init bool get_rdt_mon_resources(void) static __init void __check_quirks_intel(void) { - switch (boot_cpu_data.x86_model) { - case INTEL_FAM6_HASWELL_X: + switch (boot_cpu_data.x86_vfm) { + case INTEL_HASWELL_X: if (!rdt_options[RDT_FLAG_L3_CAT].force_off) cache_alloc_hsw_probe(); break; - case INTEL_FAM6_SKYLAKE_X: + case INTEL_SKYLAKE_X: if (boot_cpu_data.x86_stepping <= 4) set_rdt_options("!cmt,!mbmtotal,!mbmlocal,!l3cat"); else set_rdt_options("!l3cat"); fallthrough; - case INTEL_FAM6_BROADWELL_X: + case INTEL_BROADWELL_X: intel_rdt_mbm_apply_quirk(); break; } diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c index 884b88e..04584a7 100644 --- a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c +++ b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -88,8 +88,8 @@ static u64 get_prefetch_disable_bits(void) boot_cpu_data.x86 != 6) return 0; - switch (boot_cpu_data.x86_model) { - case INTEL_FAM6_BROADWELL_X: + switch (boot_cpu_data.x86_vfm) { + case INTEL_BROADWELL_X: /* * SDM defines bits of MSR_MISC_FEATURE_CONTROL register * as: @@ -100,8 +100,8 @@ static u64 get_prefetch_disable_bits(void) * 63:4 Reserved */ return 0xF; - case INTEL_FAM6_ATOM_GOLDMONT: - case INTEL_FAM6_ATOM_GOLDMONT_PLUS: + case INTEL_ATOM_GOLDMONT: + case INTEL_ATOM_GOLDMONT_PLUS: /* * SDM defines bits of MSR_MISC_FEATURE_CONTROL register * as: @@ -1084,9 +1084,9 @@ static int measure_l2_residency(void *_plr) * L2_HIT 02H * L2_MISS 10H */ - switch (boot_cpu_data.x86_model) { - case INTEL_FAM6_ATOM_GOLDMONT: - case INTEL_FAM6_ATOM_GOLDMONT_PLUS: + switch (boot_cpu_data.x86_vfm) { + case INTEL_ATOM_GOLDMONT: + case INTEL_ATOM_GOLDMONT_PLUS: perf_miss_attr.config = X86_CONFIG(.event = 0xd1, .umask = 0x10); perf_hit_attr.config = X86_CONFIG(.event = 0xd1, @@ -1123,8 +1123,8 @@ static int measure_l3_residency(void *_plr) * MISS 41H */ - switch (boot_cpu_data.x86_model) { - case INTEL_FAM6_BROADWELL_X: + switch (boot_cpu_data.x86_vfm) { + case INTEL_BROADWELL_X: /* On BDW the hit event counts references, not hits */ perf_hit_attr.config = X86_CONFIG(.event = 0x2e, .umask = 0x4f); @@ -1142,7 +1142,7 @@ static int measure_l3_residency(void *_plr) */ counts.miss_after -= counts.miss_before; - if (boot_cpu_data.x86_model == INTEL_FAM6_BROADWELL_X) { + if (boot_cpu_data.x86_vfm == INTEL_BROADWELL_X) { /* * On BDW references and misses are counted, need to adjust. * Sometimes the "hits" counter is a bit more than the