Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp609603lqd; Wed, 24 Apr 2024 11:20:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdCznonD0mPd5f1QdDaG+nel3bZ+xBhuRctRxCm4L+3qaSNrc3urVN5adFionDg3xY52G05anthR5hZEgVBs3OFLt8WC63TVR8qBzHDA== X-Google-Smtp-Source: AGHT+IHqv3Sy2DPmGbMq6n9E3pNArjtUyHc90l6CvqZzwLsKUu6uGrpRFdl5SsNqfSmwJFv0nE1i X-Received: by 2002:a17:906:408d:b0:a58:8bb8:a35 with SMTP id u13-20020a170906408d00b00a588bb80a35mr2077535ejj.4.1713982803077; Wed, 24 Apr 2024 11:20:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713982803; cv=pass; d=google.com; s=arc-20160816; b=rZjC/rod4PglrLLGKPx0iQ0NbQpiegDdOlisGJWzr5ThBo2xQQbFJEA14T4GHy6WhN 8NlZ7qitMEl5ZSZG7tEJ4EO5jdpoTd0tc8BkwzGGj2jwsPI8XhRjh637ZnlF5UYQWiSm 04/Sg8IUx23JW/GfORAp0k6pYTSnzI1cLTuRaLOKTVRsAu1HJPo/fxdrsSdzhhQIMT/D 7KeBEKA+W9FWDb4bTOZrxJiXoWVBUCY7vYFAVHr4tcajrl0y6/GwPXzWxtIkpElN1DXL +VDAoJ0pZktriGp8db4yFZ88tRhNv1FEYh7zcDdzS7VzItw+4qoo62DmJPZp83CDMKoO 29Wg== 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=GsDVq9+XCcGL0xkY2ROz+98cmkmkj9qzk5pzB/wMfK4=; fh=rMUER6/6LDUD3IphtgJcluSYLmip6tPJI1NKc16IHHU=; b=GXvPCXFaUhID9p9pNjDARoQRZVuiNGFK2vGneG3jdNoEIZ1QWsxLHl9Ub5VAnhM6Ur 4n4xrtH9tnQkoK8XScQYwyJSUthQBYLu6+6SD/MZ4+OJoHNtf5+y7mFmHfKiGPXlnZDQ Crxa2lvoAYxRQePC1g+mimK7V9hh9rmbLOlW/WYALbKfYseHvP4TgxyBffHvVI+W6MDe 4i0lW2zbr+BH80YJ2bu2Z0K7jFCJihQSASoyCtN3ipnMK5tS2DOM1/yrLa17MYC3VnAR C1JDqePClRVqD5m6/n9U1GdU1fi44C9ota+Tc/fRhPjM8sWCMXw1vmY6jMzvhMBMiTeJ FIow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RPybUfDH; 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-157474-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157474-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t25-20020a17090605d900b00a5569c15e77si8778048ejt.993.2024.04.24.11.20.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:20:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157474-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RPybUfDH; 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-157474-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157474-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 CB8171F22121 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 52F60180A9C; 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="RPybUfDH" 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 B18FD1802AD for ; 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=Csm93u6f0B+4n+NZf3T65tC/CXdhSAGx8noLvXO3HjpykzGJORpb74OiRsjzIFDy8kyjCFFZ2lqildgkPnKae7DARWZ2p6yFln3EoG8ev5X0V/8Op+G9A6YdUnHP7Nbmlbjj5gA7cieBm7a6jxii4UTOA887wn6IVB6a3EWcKbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982519; c=relaxed/simple; bh=9rMjpqoCOgRty8mRKqjOBHEBAP+bItOsOB0U8/8T0P4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EioY9f5F+Ou6MN6tH/G5GiHafkBi/EqwXSN9b/QUP8HSCZeeB3dQb9VAJ4EWlZnJ7GJ3M++QOlZhiz1oZo1G9Z92lQqD3COcy1KB2ezZ5BG+6cLebJaMb+SBsztb+OTjLOZbkSQbZLH1AsoO/tMO+Vck2Tzp+K0PMT6QP1ARS98= 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=RPybUfDH; 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=9rMjpqoCOgRty8mRKqjOBHEBAP+bItOsOB0U8/8T0P4=; b=RPybUfDHxluMbqGjOeyHytOaQV1f82jT1ZO5uyMpThihzMZ5lHK2ykac ziDixW+cQHIfnSRJ6hu88qjM0Gq3eQkYsd86TP2hPfzYJg0swc16TFyo0 pslo1WmH2/ugmhmeAGjZREKAl5G+GMZY5A9Ygh+U/tm+ZG6bDz7k9rgMb PIz3dtsclQdxxZcWGArv4RwvyZTgPXIVklnDONNrZtANIcpFjatEq6tT9 +ZioJm/0OpImilq1nFFppjYk9NWVSxv2+cKyzVMcMWesjzHoVXLPYmHMx sEefqe16osOBSbL6i50W+SKrtA9nl8xsvhIJkNeX+OHuGS6kZMU65mdZF w==; X-CSE-ConnectionGUID: rBmmDbMGTG6+Cv74tJK0Mw== X-CSE-MsgGUID: +q6BalzHTQmXA446NkaQVQ== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9481943" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9481943" 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:06 -0700 X-CSE-ConnectionGUID: Mn4Cqx1hS26PH8lQg704lQ== X-CSE-MsgGUID: d+cdyBE0SjOYHlJxgAxWNA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="29262695" 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:06 -0700 From: Tony Luck To: Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , Tony Luck , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH v4 26/71] x86/aperfmperf: Switch to new Intel CPU model defines Date: Wed, 24 Apr 2024 11:15:05 -0700 Message-ID: <20240424181505.41654-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/aperfmperf.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/cpu/aperfmperf.c b/arch/x86/kernel/cpu/aperfmperf.c index fdbb5f07448f..f9a8c7b7943f 100644 --- a/arch/x86/kernel/cpu/aperfmperf.c +++ b/arch/x86/kernel/cpu/aperfmperf.c @@ -124,25 +124,24 @@ static bool __init slv_set_max_freq_ratio(u64 *base_freq, u64 *turbo_freq) return true; } -#define X86_MATCH(model) \ - X86_MATCH_VENDOR_FAM_MODEL_FEATURE(INTEL, 6, \ - INTEL_FAM6_##model, X86_FEATURE_APERFMPERF, NULL) +#define X86_MATCH(vfm) \ + X86_MATCH_VFM_FEATURE(vfm, X86_FEATURE_APERFMPERF, NULL) static const struct x86_cpu_id has_knl_turbo_ratio_limits[] __initconst = { - X86_MATCH(XEON_PHI_KNL), - X86_MATCH(XEON_PHI_KNM), + X86_MATCH(INTEL_XEON_PHI_KNL), + X86_MATCH(INTEL_XEON_PHI_KNM), {} }; static const struct x86_cpu_id has_skx_turbo_ratio_limits[] __initconst = { - X86_MATCH(SKYLAKE_X), + X86_MATCH(INTEL_SKYLAKE_X), {} }; static const struct x86_cpu_id has_glm_turbo_ratio_limits[] __initconst = { - X86_MATCH(ATOM_GOLDMONT), - X86_MATCH(ATOM_GOLDMONT_D), - X86_MATCH(ATOM_GOLDMONT_PLUS), + X86_MATCH(INTEL_ATOM_GOLDMONT), + X86_MATCH(INTEL_ATOM_GOLDMONT_D), + X86_MATCH(INTEL_ATOM_GOLDMONT_PLUS), {} }; -- 2.44.0