Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp611603lqd; Wed, 24 Apr 2024 11:23:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWOsPwSFG23pNfKwGKTFUhkbi6b7uJf2i34p4TleBh62bU4pqyeDb3nALNPJbByEM0mAr59TWQlTPh2TFOio5plDnvOrGH50rjI2fL3zQ== X-Google-Smtp-Source: AGHT+IFCweofnDw+0Muwe4fUZ3t04QfE7r/FmVSEFDpmoJDk+WSJ0uBPIAJ28/knVpJbS/ayKJvh X-Received: by 2002:a17:906:3896:b0:a55:339d:bd20 with SMTP id q22-20020a170906389600b00a55339dbd20mr2208432ejd.51.1713983028058; Wed, 24 Apr 2024 11:23:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713983028; cv=pass; d=google.com; s=arc-20160816; b=NP0gy0qQFs6AibWZyiasfCmzYxPFpqOZzlGnV662zv4QtQ9bueimzHoKKKxoeGkj20 rlfeTLHx1a7rWBZO5Gr+XVXgvbjJ0/Etq27DiSVEysYjg964WlkDAEYwQd1631wJl8hO UmidrCVa9/N5amEKzd7+F7i/1AnFEgQny/gzfP8QZIVIuLItVo6YG0MZHeXZZ/J/fWs7 2A9eOWM1FllGTNXgaB6MLj4M0z8Xey6b54I17f3cCwBduPq8Ws6umuFbShOxuWjorEPK o0pq0dVzIh9HYKWye0ZcM4Q5nbV1tWwNgW822UjcrWDvWQKHDykSLAeeAkglgjIQ8HlC bW9Q== 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=EIjBsBnwVjnF+e9oYo+Po0C57YCET5DR/kdCMU8Oqak=; fh=Bz9SO20ugAq9xn9VwbO/Hx3hjW3ITIVBzIsjJYn+7cY=; b=1K+64WUM7XSid2IaLPOlHMjAZ7qlh/ECb3SzLUkft4ZCbF0aW8jx4WLMNa4gIwddLf PGWSUC8nyiPdy112VeaM9hEwT1IQJG1XliTalhTrigFKqMVxOlf+4MF1PzLvwhKEdw0z C4RM+Da078ekAXTtqP0NBaPxEfDMMvvXIgrWRBYTv/3gVWvP1ewisUznErJonxHDf25e 40ph/ieG/RVxIi1WFWXgCD+gR1gmr5CK3ZSmKZ7K+ZeGheDXEQ+8YTYeU5JpFNn0qhu0 Kp2z+4rlWKqGUWRnAW9PG68L1OcZOMJmwky39196yT0ooJnC4XUD+bO/lodwa8OI6WXj FuXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nP+43LFC; 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-157494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gb25-20020a170907961900b00a55bfeb0638si3750173ejc.675.2024.04.24.11.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:23:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nP+43LFC; 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-157494-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157494-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A0DFD1F212AD for ; Wed, 24 Apr 2024 18:23:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA76B1A38FC; Wed, 24 Apr 2024 18:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nP+43LFC" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 54056194C75; Wed, 24 Apr 2024 18:15:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982530; cv=none; b=qW7PKnN4s4BYCXwKC9nJiXirjctPAA83U7k6vDdf54VcUVkkEoniYzTz7Efl7kw724632EIJJha39Q3VQyKGdM+3aztZA2/QGcYH2ib8O0wE/L4SK0xAoCPI+ghv7IStiMMTKNflGC8/EgF/BdNmIHkshAr3GWgEhOnak+2HN2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982530; c=relaxed/simple; bh=iSDmP+MytJ7eLJmAn34fXLBZm0qQmXA1YWZNK0YVPgs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hur9fqncgjtu3gFzdQnx6hg1HDrfq/843syR6nRgReVA3bgups24UMIB3CoBIgqdWI2sCadnHaOzQIBhUFOg/hqBqN9VJU/P1vOu72YWRFcAEMoZeF46fzqCc+OjzAWsbTrL1Tf41qXVnvsW6zov8344XQ1Gug1XW0tVGNLZLcA= 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=nP+43LFC; arc=none smtp.client-ip=192.198.163.19 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=1713982528; x=1745518528; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iSDmP+MytJ7eLJmAn34fXLBZm0qQmXA1YWZNK0YVPgs=; b=nP+43LFChJSfGuwEUBKGdKjTRwoWBW18B1hiOKRXNiZ7u4BTiY5VzWKt fOotmbZCDrCIIrbXCatFOZuyuUU4bFUVnsA75quvUfzS8KShp8UGRjvS+ pHLetzdsEiEVlYvsU7DLm3rKNbp+GZMkOY1jvG7iytC2l1gYXoXhHcWzl dc1DxUOMHXbKK+/yh8YgTkGhdkqMGQv9+8KBHTW6/ZhwQkbdhzWEIqRXE dEIbVMIw9bPsT2u9wJwu4nQ1o8wLku7KOHjRxl3S/X4nG/bwFR6LWLRfu BxmLnzov2C08T+kgeEKXz5bH1ifNAeKVHU4sgsoBSVpvfx3z2ntM9cvOE Q==; X-CSE-ConnectionGUID: LUDkKGp6TeSPjH+yglt1Wg== X-CSE-MsgGUID: HyoqyaaSSfmLr2sXV1q8Zw== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9503596" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9503596" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:27 -0700 X-CSE-ConnectionGUID: dyKn5rdOQSKtPHnYaNTl7Q== X-CSE-MsgGUID: 6soV4DYhRzqI7GH2rtN7Fw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="55750163" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:27 -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" , Tony Luck , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH v4 47/71] x86/cpu: Switch to new Intel CPU model defines Date: Wed, 24 Apr 2024 11:15:26 -0700 Message-ID: <20240424181526.42063-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. Update INTEL_CPU_DESC() to work with vendor/family/model. Signed-off-by: Tony Luck --- arch/x86/include/asm/cpu_device_id.h | 8 ++-- arch/x86/events/intel/core.c | 64 ++++++++++++++-------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/arch/x86/include/asm/cpu_device_id.h b/arch/x86/include/asm/cpu_device_id.h index 970a232009c3..cac33812c609 100644 --- a/arch/x86/include/asm/cpu_device_id.h +++ b/arch/x86/include/asm/cpu_device_id.h @@ -275,10 +275,10 @@ struct x86_cpu_desc { u32 x86_microcode_rev; }; -#define INTEL_CPU_DESC(model, stepping, revision) { \ - .x86_family = 6, \ - .x86_vendor = X86_VENDOR_INTEL, \ - .x86_model = (model), \ +#define INTEL_CPU_DESC(vfm, stepping, revision) { \ + .x86_family = VFM_FAMILY(vfm), \ + .x86_vendor = VFM_VENDOR(vfm), \ + .x86_model = VFM_MODEL(vfm), \ .x86_stepping = (stepping), \ .x86_microcode_rev = (revision), \ } diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 94206f8cd371..d3294ef18aef 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -5187,35 +5187,35 @@ static __init void intel_clovertown_quirk(void) } static const struct x86_cpu_desc isolation_ucodes[] = { - INTEL_CPU_DESC(INTEL_FAM6_HASWELL, 3, 0x0000001f), - INTEL_CPU_DESC(INTEL_FAM6_HASWELL_L, 1, 0x0000001e), - INTEL_CPU_DESC(INTEL_FAM6_HASWELL_G, 1, 0x00000015), - INTEL_CPU_DESC(INTEL_FAM6_HASWELL_X, 2, 0x00000037), - INTEL_CPU_DESC(INTEL_FAM6_HASWELL_X, 4, 0x0000000a), - INTEL_CPU_DESC(INTEL_FAM6_BROADWELL, 4, 0x00000023), - INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_G, 1, 0x00000014), - INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_D, 2, 0x00000010), - INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_D, 3, 0x07000009), - INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_D, 4, 0x0f000009), - INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_D, 5, 0x0e000002), - INTEL_CPU_DESC(INTEL_FAM6_BROADWELL_X, 1, 0x0b000014), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 3, 0x00000021), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 4, 0x00000000), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 5, 0x00000000), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 6, 0x00000000), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 7, 0x00000000), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_X, 11, 0x00000000), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE_L, 3, 0x0000007c), - INTEL_CPU_DESC(INTEL_FAM6_SKYLAKE, 3, 0x0000007c), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE, 9, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE_L, 9, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE_L, 10, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE_L, 11, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE_L, 12, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE, 10, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE, 11, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE, 12, 0x0000004e), - INTEL_CPU_DESC(INTEL_FAM6_KABYLAKE, 13, 0x0000004e), + INTEL_CPU_DESC(INTEL_HASWELL, 3, 0x0000001f), + INTEL_CPU_DESC(INTEL_HASWELL_L, 1, 0x0000001e), + INTEL_CPU_DESC(INTEL_HASWELL_G, 1, 0x00000015), + INTEL_CPU_DESC(INTEL_HASWELL_X, 2, 0x00000037), + INTEL_CPU_DESC(INTEL_HASWELL_X, 4, 0x0000000a), + INTEL_CPU_DESC(INTEL_BROADWELL, 4, 0x00000023), + INTEL_CPU_DESC(INTEL_BROADWELL_G, 1, 0x00000014), + INTEL_CPU_DESC(INTEL_BROADWELL_D, 2, 0x00000010), + INTEL_CPU_DESC(INTEL_BROADWELL_D, 3, 0x07000009), + INTEL_CPU_DESC(INTEL_BROADWELL_D, 4, 0x0f000009), + INTEL_CPU_DESC(INTEL_BROADWELL_D, 5, 0x0e000002), + INTEL_CPU_DESC(INTEL_BROADWELL_X, 1, 0x0b000014), + INTEL_CPU_DESC(INTEL_SKYLAKE_X, 3, 0x00000021), + INTEL_CPU_DESC(INTEL_SKYLAKE_X, 4, 0x00000000), + INTEL_CPU_DESC(INTEL_SKYLAKE_X, 5, 0x00000000), + INTEL_CPU_DESC(INTEL_SKYLAKE_X, 6, 0x00000000), + INTEL_CPU_DESC(INTEL_SKYLAKE_X, 7, 0x00000000), + INTEL_CPU_DESC(INTEL_SKYLAKE_X, 11, 0x00000000), + INTEL_CPU_DESC(INTEL_SKYLAKE_L, 3, 0x0000007c), + INTEL_CPU_DESC(INTEL_SKYLAKE, 3, 0x0000007c), + INTEL_CPU_DESC(INTEL_KABYLAKE, 9, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE_L, 9, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE_L, 10, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE_L, 11, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE_L, 12, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE, 10, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE, 11, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE, 12, 0x0000004e), + INTEL_CPU_DESC(INTEL_KABYLAKE, 13, 0x0000004e), {} }; @@ -5232,9 +5232,9 @@ static __init void intel_pebs_isolation_quirk(void) } static const struct x86_cpu_desc pebs_ucodes[] = { - INTEL_CPU_DESC(INTEL_FAM6_SANDYBRIDGE, 7, 0x00000028), - INTEL_CPU_DESC(INTEL_FAM6_SANDYBRIDGE_X, 6, 0x00000618), - INTEL_CPU_DESC(INTEL_FAM6_SANDYBRIDGE_X, 7, 0x0000070c), + INTEL_CPU_DESC(INTEL_SANDYBRIDGE, 7, 0x00000028), + INTEL_CPU_DESC(INTEL_SANDYBRIDGE_X, 6, 0x00000618), + INTEL_CPU_DESC(INTEL_SANDYBRIDGE_X, 7, 0x0000070c), {} }; -- 2.44.0