Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp611245lqd; Wed, 24 Apr 2024 11:23:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWT5KuC/1T0UybLjvrWarqua+1chawQ0JCWTh7KsitebFtlsJ/Wh31pgRFneDMppcrEGWrD/ux4oeRWaUs01aj3inD4Q2AF318RqHF8HQ== X-Google-Smtp-Source: AGHT+IEastMgWVdU3f2s4JuvK3InxXqAq89EbO5PpnJ/DX3IG0pr3sQAW22H59qY3QlkXo8su6Fn X-Received: by 2002:a9d:68d6:0:b0:6eb:d29e:8477 with SMTP id i22-20020a9d68d6000000b006ebd29e8477mr3813351oto.27.1713982982021; Wed, 24 Apr 2024 11:23:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713982981; cv=pass; d=google.com; s=arc-20160816; b=PdoVMSYJRAPUq6Rro+RaQ1xC0fSmINEhNR1uADxCVZpLNLejLZILfvpDqHZT/Uwzl3 akUfd/SD4lvUZlGMOySEzPe1KkjaC7yniHUH+bjfYSGjN3MdYAT4gZOV2n1gq2OMbB84 nsGglt9UMUhmPEqAl8LuBtKKoQnx5Jq3Vmr9hv7Q8A7WhdbP4mENf+21yy4wmUSTgB7g PqpO4wvxjrZEguHNbO249VVhtK3JhOiwhrwf3q51W9sPOqL+ROZUPYNjdKyLXwIdcz9h +DlXRAYt64LlgKhCvuXfzWcsowY3GRMDA/NNH7cd5+GY6jVtqzJMGYdc56d7qaDU/dE5 0y8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=R5hGG/y1FWsXScTT4vqNgwb7e3xAztWvG4wMlMv0IkM=; fh=u2VOD+NJjo1ddas1xlfygQ7ilPw7Ep/K6rZm156Dl9k=; b=yXNRrO+BMJR6A5zxmyZ0nS/XZaukonUZDqFVxsmpW+fgCR+6iQxC6lhA3s4VDFjLP1 2IBvsfVBMQW6gPtKAY9JSo0hBgjFHWjS7q827r4XtxqlWWyzgJB8YaKICssAzLprZe3A QHSZ7aGnyUZbg+gMSIop0v8fbpTRCiYKiS5Hr9Bt2cFYaQO7CqLIeiKMX4qHzU2Lp6+3 T7jxDkScVMy2JKfxaAlpZLx8IsHffXn4wdj4GoTABrnP1cxVwjtALtUptNZh0FL7fee4 HdMJlPRincLe3CewjzgEQthoTvsqzODaCBWkqFBVtpHzYJB1AXITSZqAdPgxnb9JbS6x HDcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AHui+clW; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-157491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g4-20020a05620a108400b0078d6c0cd0bfsi15851297qkk.46.2024.04.24.11.23.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:23:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AHui+clW; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-157491-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157491-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 910E21C226C4 for ; Wed, 24 Apr 2024 18:22:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED34E19DF77; Wed, 24 Apr 2024 18:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AHui+clW" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 C5E52184111 for ; Wed, 24 Apr 2024 18:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982528; cv=none; b=kJtNZnCrVSSl1QDAdy5LzPyVZdnSjCR+oyniXzvCsUiI58ui2dCeez57I7YdNgmEKJwYiO/L/7TL2l8ii7eNRyclGh990T0pVkChC5YEqP8tqDvkmzGMoEehgsk3meOXlyffmAS/ZPTCopy8JiNrOBQTEStfie0CWqrKqOcRICY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982528; c=relaxed/simple; bh=AsjGODFPSGB1rd7KGy1xLTYIPWqwB7V2MxUYDxCtEt0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bO1ZnuwmfKaxEu7CKgDBh8t5TjhoWqhpVYXJg1MCbw0Gw1u3TZqdkq8S0ssSUMv9rFSxxV+b77j5CzekMHSqpP7mfZF00dL8n3W8RXdFPVoFZJf6UIaNElPRmIBAvsaGghMLpgyVKEV/T+hU6f+vU/5F0QcJ15fVRrXaVM0PL30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=AHui+clW; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713982527; x=1745518527; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AsjGODFPSGB1rd7KGy1xLTYIPWqwB7V2MxUYDxCtEt0=; b=AHui+clWdDNJ7DuhdlFmkgG4VGiaUz2ups/1yo+XR3+ZXseqq2BHWFhW pmEC5qDTHUN0E9vSdEOgp6Rp8dG88XPyk2Z20u58HpZEWTrkCbSn1LUiC Pq+Arg93hHzjDxOLRnJwhmnVM6+KrC8Ysw3pthzyK724X7WJzJK6pi2Yp 0DzxiK8WRy6QWAzUwvDSorjE57LLqOUj48WW9yWeAiEfEihB66sgNL2lP +D2Hqh9rYkjZUojHBRLuJVh9HrChDUHfc2JUdDwSjJLZVt9OvAzSuGYal UIlyEO0yQSJY7tle8KO+0vzHM6eD1jQjYr4ylqSmhXuwP49RIU+MuLYzF g==; X-CSE-ConnectionGUID: P++34PywSw+Eu7qhX1ClTg== X-CSE-MsgGUID: fwAmb8gbTg6Y2PCrz5AAMQ== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9482039" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9482039" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:15 -0700 X-CSE-ConnectionGUID: K3hFkVG1Sseq0SnQKXWUCg== X-CSE-MsgGUID: +9Cg8+tzTJO+K/x3MGB3aw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="29262772" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:15 -0700 From: Tony Luck To: Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org Cc: Fenghua Yu , Reinette Chatre , "H. Peter Anvin" , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 37/71] x86/resctrl: Switch to new Intel CPU model defines Date: Wed, 24 Apr 2024 11:15:14 -0700 Message-ID: <20240424181514.41867-1-tony.luck@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424181245.41141-1-tony.luck@intel.com> References: <20240424181245.41141-1-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c index 884b88e25141..04584a76ceb4 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 -- 2.44.0