Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp611112lqd; Wed, 24 Apr 2024 11:22:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqZGbFZKmG3d7aGeR7G+nFI7Ten8fcaOaGiVFD2HcA8k8WUSeL2m80FW1Wb8qE/R8E48sdAYyGzetwOuYJYf63wAxDTMCz5b7LZfnUhg== X-Google-Smtp-Source: AGHT+IEJnyDuZVT/o/fGasMSDR2c8X19vdfSQNKosjKtOE4JUP400Z7H6YHovOJKIeWCkYnmmU5l X-Received: by 2002:a05:620a:13dc:b0:78d:646d:e2e7 with SMTP id g28-20020a05620a13dc00b0078d646de2e7mr3498614qkl.66.1713982969428; Wed, 24 Apr 2024 11:22:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713982969; cv=pass; d=google.com; s=arc-20160816; b=zc+YPO9T26pP1DpDfBkHA++KB/wY24CZD9ScJGKV0mf19ojs/7ctZHgbTWhvtNKocm YYwsAuKYEnVXluGYiPDKYlVD6GEnoyrlfYFRHZFxxflAZQCg06vMQTizn+kd33JoO78n ydjN0ttIjH44Cs0/HSUEYhXWUiMGKmwNqMVmxTGVE+hIKvp1FmV3syAa+cPtUmR6dAUs dmNED+rWQb0k1B97PwFFeFx8NqT10Mg/4vHzBU59zdp9DGpyyY2hkmc0uvdD7BdU1d6S uO6fBBwJt38HObwrE+1tFpdLg8AocFt0ET1w+NyRZ7h1TL38d/w/draI6OJDg/R8nIKj 26sg== 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=0nlYje0zO4thVaQMtHFsJOd3zBPkb1Z68lbjcWvKLMs=; fh=EJOGqQfeQAsZ0hRyPOWyCGePhwxaBnsHU0wh4XbR9V0=; b=kxqQoX26KJi4kE6EaEwRw2fL3WFlWCxSfTQo4NcYbNnPYFmJy/Q0btzs2k3q8A3qI5 AKlPMPqiRBD9nm8j2rCSMYdFp0vDkqRItMsoFTQpLknHB/QF9qwNQ/wnVKTIUxYdeu+k RwyvsKJTnEaKeJmnZXhMUlrkDb4TF1gzlCwLIWOsHmbSYm8EGmIbm9NasiNIN2boBnJY OznVDNdE/J4pq+DmcNV4dNWtLcMV1JD7/uMyiG4ZrkdF5eBUIC2M+rAipBqeCvBJuk5V bjHfuWKU2WWf+GJo2S73gt1dEd/beeaV+uBM/xckcO3CaUykdRNI4QbkroBq93dUVnln W2Rg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d7Q3+AvA; 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-157489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157489-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 ow30-20020a05620a821e00b0078d4d99860asi15292057qkn.81.2024.04.24.11.22.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157489-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=d7Q3+AvA; 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-157489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157489-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 457F01C23718 for ; Wed, 24 Apr 2024 18:22:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57F39194C9C; 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="d7Q3+AvA" 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 6CB54181CE5; Wed, 24 Apr 2024 18:15:23 +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=1713982527; cv=none; b=sfc36+2m2TAWomfR2owIyJy2ivxxf3cvRn9OChXYJi/oGMIDH+SQ6RRu6DC7HZdS3TUbzHGikcTvbTqIIWjwj2TzR4TsImDlim+NCscoYDjta2+h7pePrQd9xdxZ7nspslBoIMtB0nbM/gArTtxL/UO72LX1LdLtTMwig6mAgR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982527; c=relaxed/simple; bh=iFfVDMwRelTPhBugxwSRQJDD52d9QsnZEZNpB2fnYgc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ThHv8uvXaR6kg9IhqxI5GS4w8Evm1UqdJTyoS2medeqH5ezahNsH0yEZvHN4FrvAeBxt7a4OuzjiSdshxFgTo8uEEn1fKrAV/XyfQNKUVFgsOyIbbJ4I5byUomgeo6NpRhh+6Hdsh6uO6WYe2M3NL7KVG1rBb8Djt2X26qQ/LEw= 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=d7Q3+AvA; 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=1713982523; x=1745518523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iFfVDMwRelTPhBugxwSRQJDD52d9QsnZEZNpB2fnYgc=; b=d7Q3+AvATS+jKQFlPqrtfVT95NxnMkoneuGa+uX+qD4LUkT66GYFKHbN M5XzpsYCcs2aUP5HE5SdbTg75e3TOB12FGWHc87o4sL4oxXRHuBF1zXov NUNm+FwY1fuawrZL1cpdPgjYiU4P5loFJ57YykX01hWd/ItYhZcnC8Blx ZJxY2rLV9AHu0aRHmNPjLugV+euwhhqC0w2n8aIDsB6kTVxn7/fQTQHEd 3Dbjcp9f7H5shosL5V9xFVvFfRjQgsqx3Cz2o23kFqfzQRhbnzT0DoY3p kicwp+/g9E5UM2au8N3QLWaypfGKr9WQ5oBXm9VVdgAXSY0z7ej24A1hE A==; X-CSE-ConnectionGUID: ZmFasxx6SH2Uep9SNahmtg== X-CSE-MsgGUID: nia1bv8VQuKMZSm4c67G8g== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9482013" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9482013" 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:13 -0700 X-CSE-ConnectionGUID: 3Me6owXQQ8yo33zZQJIkew== X-CSE-MsgGUID: hGlTsOXjSqaC+Kej4mCGHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="29262754" 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:13 -0700 From: Tony Luck To: Borislav Petkov , Tony Luck , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH v4 34/71] x86/mce: Switch to new Intel CPU model defines Date: Wed, 24 Apr 2024 11:15:13 -0700 Message-ID: <20240424181513.41810-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/mce/severity.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu/mce/severity.c b/arch/x86/kernel/cpu/mce/severity.c index fc8988cfe1c3..7293a1c49050 100644 --- a/arch/x86/kernel/cpu/mce/severity.c +++ b/arch/x86/kernel/cpu/mce/severity.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include @@ -45,14 +45,14 @@ static struct severity { unsigned char context; unsigned char excp; unsigned char covered; - unsigned char cpu_model; + unsigned int cpu_vfm; unsigned char cpu_minstepping; unsigned char bank_lo, bank_hi; char *msg; } severities[] = { #define MCESEV(s, m, c...) { .sev = MCE_ ## s ## _SEVERITY, .msg = m, ## c } #define BANK_RANGE(l, h) .bank_lo = l, .bank_hi = h -#define MODEL_STEPPING(m, s) .cpu_model = m, .cpu_minstepping = s +#define VFM_STEPPING(m, s) .cpu_vfm = m, .cpu_minstepping = s #define KERNEL .context = IN_KERNEL #define USER .context = IN_USER #define KERNEL_RECOV .context = IN_KERNEL_RECOV @@ -128,7 +128,7 @@ static struct severity { MCESEV( AO, "Uncorrected Patrol Scrub Error", SER, MASK(MCI_STATUS_UC|MCI_ADDR|0xffffeff0, MCI_ADDR|0x001000c0), - MODEL_STEPPING(INTEL_FAM6_SKYLAKE_X, 4), BANK_RANGE(13, 18) + VFM_STEPPING(INTEL_SKYLAKE_X, 4), BANK_RANGE(13, 18) ), /* ignore OVER for UCNA */ @@ -398,7 +398,7 @@ static noinstr int mce_severity_intel(struct mce *m, struct pt_regs *regs, char continue; if (s->excp && excp != s->excp) continue; - if (s->cpu_model && boot_cpu_data.x86_model != s->cpu_model) + if (s->cpu_vfm && boot_cpu_data.x86_model != s->cpu_vfm) continue; if (s->cpu_minstepping && boot_cpu_data.x86_stepping < s->cpu_minstepping) continue; -- 2.44.0