Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2747781lqo; Mon, 20 May 2024 15:52:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxJUwFhsUub6Qm3prgRqYgBDeiDSz0rzUTDw2GNRjrCXhCZBEGKemLJ1qflsR6L6kk4G/XYaS8JI9LtMjvizfOk9D9mTu/wjonlaxpfg== X-Google-Smtp-Source: AGHT+IHfeteV12tlYXEgwhCnaNvHgDz3Kc9UyOlBIQ2loN0L2JTrnq9mwyeULTLlrYUgV5N1/gSd X-Received: by 2002:a25:8747:0:b0:dee:7942:c099 with SMTP id 3f1490d57ef6-dee7942c49fmr23601510276.38.1716245569833; Mon, 20 May 2024 15:52:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716245569; cv=pass; d=google.com; s=arc-20160816; b=msbHibGi/MCgdTf5LcOhBRRHAizxcnGxisbFRv7bkEd9paZOchKXBNYygaW2/YGcpa 32VBaBNe4+NKJnEIvlj5K+45M3Lz9G95Q2+Evw9Zlzt5yK1ZRQP3cIthXi0TeLqa/uFk oWlAerco42lxesx39E9lkO68EdHkxDi3XYgvoEnmjxNckKT+03sAsNE9Pps/P1TZqtdM BaOFtCaqI+XBGQGMxlISCv+E01SKLBmSHtubdfGAI+xSUCWXLk39RmVTn5Og4poNBo+c zNX4fgftTcd/AsZ34EKBCNStg10OEiCSLHyzC0qQ0rUs1ZaEmxEiDG/1thQMj4EBwd15 15iw== 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=S8EwCL3EXre9Ykr709iMKLSXhLDWSDA/oQp+ABYof6E=; fh=T26ksdX6UpceKBTmCjnZX4okm/RnV1G8gmRkfePNArg=; b=z5ey6RNmf7oiBViIY6uKUi+wKUGUehcmU/Z+YX1xmkL3YrRlEIA3/J1XsYOlPIip3d GKfdJnwlVJIktg8wLJi8+3kfWbtBFPXYvhfd36oTI0mppvhdnmX+I7kZHnd+EZq9Ys2N TXqd3DeQd7vLpeQ4ARSNmQCYEyFhNgu2zEXusRa9RNhlPSyUHzTVCaMpA4+3CVEpI87Z czv4/3yBr0zznrtcSFSpl7B08muIqe4CinJAxSBlUiP6MjcliLMvffU8a+Snbs8jfxIR b6jBXG1e/D2dMXQu4XXbYTbQgwm4nBHlfVqe0dACLvFXYS8K67eNEznwbqXdLosqJFuy baiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=COd+zUsm; 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-184262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184262-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 6a1803df08f44-6ab72541048si3410536d6.103.2024.05.20.15.52.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 15:52:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184262-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=COd+zUsm; 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-184262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184262-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 933AB1C202EF for ; Mon, 20 May 2024 22:52:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC45113D27D; Mon, 20 May 2024 22:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="COd+zUsm" 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 8C1F013C8FB for ; Mon, 20 May 2024 22:46:52 +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=1716245215; cv=none; b=Rgosw0Lgq0t+uwCc9SBOqgkBAQ4YtZMkNzioysoVb+kR/23EZgvh05W8K7QkdcPOBiJtzi9+A9lfWUwHnLOyqJ+BKmALxwU1HdovHOVcofZGRbp8ZufGzljvoQ+B1Mb8G/cwF5vDb7mlIm4R6yBgU6O2P2FBQOpsU6HwSHqiqkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716245215; c=relaxed/simple; bh=tMaJ9LquKdyqtIrCznQawsIwTZJVDk5Gf87ol/G8gIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gbr/PsbhsgtixDk+aTs/UHfNhU8YvD4twi9OxGKIFTZHZM3dWdPNuus65IeAyPxS0gFPYRy0h7SR0CO3/sNTgZeXMyiHXELOH2L8xriyngQDEyic5nrfp1j09QEreIP69buoo7MS5MFbRwSyFiaycZrMHYX0PMkeOg5YfqsU0bc= 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=COd+zUsm; 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=1716245213; x=1747781213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tMaJ9LquKdyqtIrCznQawsIwTZJVDk5Gf87ol/G8gIM=; b=COd+zUsmGDo1I7Bf3T9XhaFUKwMDksHa/uokSUTIotf2Q03L3MR33gpn ZJcb2ItjeRFAiU0dqjE6/X7XzmAVed5tmf8SU592ceHTEwMI2/l+7xurL DV8n366SvfCOioaFWzyRzPDpew4N8jJMsfsrX4IkilMRl6iktcW589JX6 BNoV1HkMBP6JIltkp5lcoYSAhobX5hd3zMB+ZD8uXFn22V6MVIjpzDZy+ Oevdo4tWu5oM8seTjf19l3BkanJXT57lUROmRGIYoP2suS85YK02qAIsg dXS1UB0yIyl3/6Z29P/TYphA4kRI676bXTOVKfyB68ZXVvI3sQy5EwZKg w==; X-CSE-ConnectionGUID: VsVUUSw7S9+qzdxLcFPIng== X-CSE-MsgGUID: 7wTOAzMTTUulzk1+3xkZeA== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12199866" X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="12199866" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 15:46:39 -0700 X-CSE-ConnectionGUID: wwPHbdJoRQGiEM90Rv7ckw== X-CSE-MsgGUID: Ljne8m3+TIaOHBGZftr0Zg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="32593483" Received: from agluck-desk3.sc.intel.com ([172.25.222.70]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 15:46:39 -0700 From: Tony Luck To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , "Peter Zijlstra (Intel)" , Uros Bizjak , Rick Edgecombe , Arnd Bergmann , Tony Luck , Mateusz Guzik , Thomas Renninger , Andi Kleen , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH v6 33/49] x86/cpu: Switch to new Intel CPU model defines Date: Mon, 20 May 2024 15:46:04 -0700 Message-ID: <20240520224620.9480-34-tony.luck@intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240520224620.9480-1-tony.luck@intel.com> References: <20240520224620.9480-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 54a71c669ce9..df07d3776db8 100644 --- a/arch/x86/include/asm/cpu_device_id.h +++ b/arch/x86/include/asm/cpu_device_id.h @@ -277,10 +277,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.45.0