Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp609764lqd; Wed, 24 Apr 2024 11:20:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsX3lFQkdWVm2bbmfjQUNZbXVjT96HQx9cFBFe+qV/lGMqrq71xvNuvoiZHfpDYFrdxAJPKbpDOjJ6o6mjOac6gAgu8HX3a1nk3DfqIQ== X-Google-Smtp-Source: AGHT+IE/9e5365EHlJAD2Xfzt0Ahhh4g5p4NBbcb4j4B/ncTSgcGSiBJ/t+JSA+jThMGvfsQR5+A X-Received: by 2002:a05:622a:1a03:b0:436:5a0e:cb48 with SMTP id f3-20020a05622a1a0300b004365a0ecb48mr3434003qtb.24.1713982821737; Wed, 24 Apr 2024 11:20:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713982821; cv=pass; d=google.com; s=arc-20160816; b=HYcP3K3LMQtJ7afstdJdVv349XvGr/CgHK3kAK/RpRF/3enQ2XrPO+jZ8cquO+HYs+ +zVPwMk4IcjrMJI0EapqrMr0mqcuapxuWf+xJfwaA5o/WqI2JPtst/XbT/XrO53NOnvp YRKBC5jP+1GKo8mnQVtEsCTTP6hdIBI0kg2Ot8Z+NcL+5ucJuKgw5lxA3eslKM55tt2K IrZ3DFNe1t/0zJULUp2agFkvXJm/05cOktQYuzIHdZDxqWGKI+d+P0n+HYFtspwZNCvf VTNEllwKPD1XsinElr/1NPJgtVY1mG8j71QeOTCFPHto9hOMZpFd67HlnRXRYQxpt4Qd l4Gw== 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=5FAaNO14fssgbvV3kBE5dtBAYp0+vX9dVxC2kvz0d6s=; fh=5s6W4w6x1Zs0Fr3OEets4qgL7TMNt4/0CDcX9+H43TU=; b=EBavAtz7Nswawif7x2FqGlnhL4Q+5XGlWO793vrz8NL59kUGtecND0b54w+UqkqPL5 krk2NBVrU3hDhpfDfwkFMQ3UyCpqnB2Pi/6IvbNNLqsrlEimn0OgE8QGvZIYUPr6XzmT qGXGYVyTZzmFF9kNmwkQ90ZEZglf9EnnMKhks5nJ2bekseVcKQwEaNH48Kozv0sm/6k5 sPPXyfQDVfa1FnKndE62CnVSlhLDPxkjFEmkj5XsVFpgKO6cKP8btwg3HS7lSZe68b5X lWFLw1k+sMRuJe29AIeMIQm1cudHLaBeVKpvo8cSxuQi/40Imn5Awj6WeAXKJ0XOiKZo n0KQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="i7/XmhJV"; 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-157473-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157473-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 d13-20020ac85d8d000000b004368dd7068csi16084266qtx.510.2024.04.24.11.20.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:20:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157473-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="i7/XmhJV"; 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-157473-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157473-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 56DD81C23BEF for ; Wed, 24 Apr 2024 18:20:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C843180A9D; Wed, 24 Apr 2024 18:15:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="i7/XmhJV" 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 57C1317F393; Wed, 24 Apr 2024 18:15:17 +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=1713982519; cv=none; b=T5huLxHU9ZpZwVlZ27HtK92iFW/1xSNVj9J7Vcu+gB1AFCK1RZ6NmnuOWhpFPPQdhs8rkp7zSn3qzoRrgztuX3OJ6Ybwp/6qpcSSaIcCU6oSRENAPadcBFtVjd4d/yBXA96CvH/FLmmYt55QMAfSgCI6me8wO4qAGAazjSxW5h4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982519; c=relaxed/simple; bh=8UQAqNekjg9PUGac6X2MaPesViGhIMmQkwSJ6hmLGVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I/AbuSp9J1E7ociiE7G/AGC07LMV0g5e087uYhJuQzdVBfEoeIHuMA/snVr53Dz8z2w+9fbfeuUJuEfqZ4Sff5YItz3uciUiNC/j1jfOH1+4HfboftdPuiX1UrPYtMMIgy5cM+Atkrs2RRldvecOhwj6PZS2r8myX9XUDIIR5JY= 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=i7/XmhJV; 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=1713982517; x=1745518517; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8UQAqNekjg9PUGac6X2MaPesViGhIMmQkwSJ6hmLGVc=; b=i7/XmhJVyzzmBitM6qlXuuSsaW8AUGyQ3WyRn9iVVlIR+Yw9RxMwFXJs Dtg8tedLRUl4BROWWq60Bqqz1qs6y18Svn0J7kJNPH3FgbvvJ3zPJbZYh sgZBPzbJJMKMbX0YNXvzKMogNqPJQUibOnMcw7KmTRcg6VOsfujzzHwRh /mRl66EN77isOP2+2xSmx1KCO1A8+d9Fi6DBGBglKMRoCa5dWA5AXoasA Vyx0wK8VIX6vSxgmjWMTSEp506/fnX8HH23+R56EumFCzgGB4xGPMXSZ9 FoCYpc21SBc47TYCnvC/FcesEc9KbJ02EDMSWdW/I4suL+KAjRVmoXDP7 w==; X-CSE-ConnectionGUID: DRDSns2DRWeni47EcUiqZA== X-CSE-MsgGUID: cJbaAQrUQTeojap1HtcRuA== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9481919" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9481919" 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:04 -0700 X-CSE-ConnectionGUID: JpkwHJ5qT7uNl2yr25dvbg== X-CSE-MsgGUID: B7y1IQoSTaaDvWuFEobSCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="29262676" 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:04 -0700 From: Tony Luck To: Borislav Petkov , Thomas Gleixner , Dave Hansen , x86@kernel.org Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "H. Peter Anvin" , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 24/71] perf/x86/msr: Switch to new Intel CPU model defines Date: Wed, 24 Apr 2024 11:15:03 -0700 Message-ID: <20240424181503.41614-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/events/msr.c | 132 +++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/arch/x86/events/msr.c b/arch/x86/events/msr.c index 9e237b30f017..45b1866ff051 100644 --- a/arch/x86/events/msr.c +++ b/arch/x86/events/msr.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include "probe.h" enum perf_msr_id { @@ -43,75 +43,75 @@ static bool test_intel(int idx, void *data) boot_cpu_data.x86 != 6) return false; - switch (boot_cpu_data.x86_model) { - case INTEL_FAM6_NEHALEM: - case INTEL_FAM6_NEHALEM_G: - case INTEL_FAM6_NEHALEM_EP: - case INTEL_FAM6_NEHALEM_EX: - - case INTEL_FAM6_WESTMERE: - case INTEL_FAM6_WESTMERE_EP: - case INTEL_FAM6_WESTMERE_EX: - - case INTEL_FAM6_SANDYBRIDGE: - case INTEL_FAM6_SANDYBRIDGE_X: - - case INTEL_FAM6_IVYBRIDGE: - case INTEL_FAM6_IVYBRIDGE_X: - - case INTEL_FAM6_HASWELL: - case INTEL_FAM6_HASWELL_X: - case INTEL_FAM6_HASWELL_L: - case INTEL_FAM6_HASWELL_G: - - case INTEL_FAM6_BROADWELL: - case INTEL_FAM6_BROADWELL_D: - case INTEL_FAM6_BROADWELL_G: - case INTEL_FAM6_BROADWELL_X: - case INTEL_FAM6_SAPPHIRERAPIDS_X: - case INTEL_FAM6_EMERALDRAPIDS_X: - case INTEL_FAM6_GRANITERAPIDS_X: - case INTEL_FAM6_GRANITERAPIDS_D: - - case INTEL_FAM6_ATOM_SILVERMONT: - case INTEL_FAM6_ATOM_SILVERMONT_D: - case INTEL_FAM6_ATOM_AIRMONT: - - case INTEL_FAM6_ATOM_GOLDMONT: - case INTEL_FAM6_ATOM_GOLDMONT_D: - case INTEL_FAM6_ATOM_GOLDMONT_PLUS: - case INTEL_FAM6_ATOM_TREMONT_D: - case INTEL_FAM6_ATOM_TREMONT: - case INTEL_FAM6_ATOM_TREMONT_L: - - case INTEL_FAM6_XEON_PHI_KNL: - case INTEL_FAM6_XEON_PHI_KNM: + switch (boot_cpu_data.x86_vfm) { + case INTEL_NEHALEM: + case INTEL_NEHALEM_G: + case INTEL_NEHALEM_EP: + case INTEL_NEHALEM_EX: + + case INTEL_WESTMERE: + case INTEL_WESTMERE_EP: + case INTEL_WESTMERE_EX: + + case INTEL_SANDYBRIDGE: + case INTEL_SANDYBRIDGE_X: + + case INTEL_IVYBRIDGE: + case INTEL_IVYBRIDGE_X: + + case INTEL_HASWELL: + case INTEL_HASWELL_X: + case INTEL_HASWELL_L: + case INTEL_HASWELL_G: + + case INTEL_BROADWELL: + case INTEL_BROADWELL_D: + case INTEL_BROADWELL_G: + case INTEL_BROADWELL_X: + case INTEL_SAPPHIRERAPIDS_X: + case INTEL_EMERALDRAPIDS_X: + case INTEL_GRANITERAPIDS_X: + case INTEL_GRANITERAPIDS_D: + + case INTEL_ATOM_SILVERMONT: + case INTEL_ATOM_SILVERMONT_D: + case INTEL_ATOM_AIRMONT: + + case INTEL_ATOM_GOLDMONT: + case INTEL_ATOM_GOLDMONT_D: + case INTEL_ATOM_GOLDMONT_PLUS: + case INTEL_ATOM_TREMONT_D: + case INTEL_ATOM_TREMONT: + case INTEL_ATOM_TREMONT_L: + + case INTEL_XEON_PHI_KNL: + case INTEL_XEON_PHI_KNM: if (idx == PERF_MSR_SMI) return true; break; - case INTEL_FAM6_SKYLAKE_L: - case INTEL_FAM6_SKYLAKE: - case INTEL_FAM6_SKYLAKE_X: - case INTEL_FAM6_KABYLAKE_L: - case INTEL_FAM6_KABYLAKE: - case INTEL_FAM6_COMETLAKE_L: - case INTEL_FAM6_COMETLAKE: - case INTEL_FAM6_ICELAKE_L: - case INTEL_FAM6_ICELAKE: - case INTEL_FAM6_ICELAKE_X: - case INTEL_FAM6_ICELAKE_D: - case INTEL_FAM6_TIGERLAKE_L: - case INTEL_FAM6_TIGERLAKE: - case INTEL_FAM6_ROCKETLAKE: - case INTEL_FAM6_ALDERLAKE: - case INTEL_FAM6_ALDERLAKE_L: - case INTEL_FAM6_ATOM_GRACEMONT: - case INTEL_FAM6_RAPTORLAKE: - case INTEL_FAM6_RAPTORLAKE_P: - case INTEL_FAM6_RAPTORLAKE_S: - case INTEL_FAM6_METEORLAKE: - case INTEL_FAM6_METEORLAKE_L: + case INTEL_SKYLAKE_L: + case INTEL_SKYLAKE: + case INTEL_SKYLAKE_X: + case INTEL_KABYLAKE_L: + case INTEL_KABYLAKE: + case INTEL_COMETLAKE_L: + case INTEL_COMETLAKE: + case INTEL_ICELAKE_L: + case INTEL_ICELAKE: + case INTEL_ICELAKE_X: + case INTEL_ICELAKE_D: + case INTEL_TIGERLAKE_L: + case INTEL_TIGERLAKE: + case INTEL_ROCKETLAKE: + case INTEL_ALDERLAKE: + case INTEL_ALDERLAKE_L: + case INTEL_ATOM_GRACEMONT: + case INTEL_RAPTORLAKE: + case INTEL_RAPTORLAKE_P: + case INTEL_RAPTORLAKE_S: + case INTEL_METEORLAKE: + case INTEL_METEORLAKE_L: if (idx == PERF_MSR_SMI || idx == PERF_MSR_PPERF) return true; break; -- 2.44.0