Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp449308rdb; Tue, 23 Jan 2024 04:53:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzYC+M644X3bgWWoFn55AP01jhc6fPbyOwQuJlPppo0KxKLH9TlHvBJVmZF9HxuZPzuRKT X-Received: by 2002:a17:902:ed4d:b0:1d6:ff40:665d with SMTP id y13-20020a170902ed4d00b001d6ff40665dmr5533686plb.93.1706014425437; Tue, 23 Jan 2024 04:53:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706014425; cv=pass; d=google.com; s=arc-20160816; b=k1vsWkYA2bXr886DYaflnxnGlRwRoJiCywKBTnu76bOz3MGvRXxfbYkDctG8SM/bzE XiV1czhRQUTM+5E4pSqcipeZm3Vah+ssHQaGqz0gDj2LF7PVDduPNelGqGnMdhfBAbqj 21haCIxDgme/HiFP07c/tSWq58entPd90ZP792aYmm9S2ilMdGWVMPvjQgMfXuenTEyu 4jJfnrmc66fEUpN1XGPOQ6cpU+sXElDy9DEZ/aRvM9WbceG3vM5R+ShorEK4/32BKds4 F+vQwGWvFMNvgx+5QBZIQOO1RNm0MUj/ujP8E29vvzhImwsmo6US7+xoBSKzdtwA+CVr 8CdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:date:subject:cc :to:from:dkim-signature:dkim-signature:message-id; bh=1wZd9ffAqGbuli/t8ueJvyjn6qOFNSXfo6836tJNYwM=; fh=Te0fDPJ/sd+7p881M6fa/oF213lBbJvGdEFWr/TLqNA=; b=mTf4KSiKOH0+EK755zMjWCAFJ+Gmg4hrNK/6t7C8Hlje81CcLxmhWlCqHB+WjPWB2K zBmL759bF6ne4lZitRSGhxPQXf7pN6AGluQrzZUtXurumglNLzELvaeVk1l9BVkUVzxv Eg8ePLWcgHaOy6koaiy/aPFjQFawj3rCsF6OI1/3FlIcB/HfpwLu7tB4OemRSX5du/S9 tm3c6lNeOej7A3kMGndStpRWkXjC/T/p0fyvsRCh8Umlna3Sv5qrUYzz51Wj5/oycB23 KSlqLEfqpy830SBF7Y9MuOtkbIeZXWzaCsuGkvMgg+R/uLZWHijamAePoE6ztsRoWOxd 9HYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pMQ3AGH5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-35264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j8-20020a170903024800b001d6f7879b34si10037047plh.383.2024.01.23.04.53.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 04:53:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pMQ3AGH5; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-35264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 75832B20E1D for ; Tue, 23 Jan 2024 12:53:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E195B5F54A; Tue, 23 Jan 2024 12:53:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pMQ3AGH5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YWlqUNF+" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 9E0DB5F540 for ; Tue, 23 Jan 2024 12:53:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706014414; cv=none; b=iYmivekgaUZvLZaOG+WcN57q08DCudAo2VJuP15cpFhJEiH5MTWs1cntJ3L4qkrmypEkx4pTBU4guX6Ax6bSBSn87AwxVYc8bh3Dk+TMxgSgc3XzR+JZEibRHcugh5ECEOzgyIWo4S2qDCMMCe+JHzsq/UA25ew0KAhjZzjzwBE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706014414; c=relaxed/simple; bh=wOSIRE7vK8aKnDShnAbJeJb+a6x9BurgdxlcOpOD0lg=; h=Message-ID:From:To:Cc:Subject:Date; b=GV6/WGl7LSvupzuT3x9IFi9VEjA/WBPbAZ0yR84NfZ/aVBdNSRox5tsxcLZY+y+pa4tP5yqDdNrJAvRAfjg051A7giB4FjA9+vJ0tH0qCjxkR86S7IdEr1BqwCedVTUch+rYCGSab0D/VHv3sQt1tbeYv3czzH/PpLeTaI0HBs8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pMQ3AGH5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YWlqUNF+; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240117115752.863482697@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706014410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=1wZd9ffAqGbuli/t8ueJvyjn6qOFNSXfo6836tJNYwM=; b=pMQ3AGH5Q7JkuavYsDR7ITmmIgsuT4o4oh9ckkzcPoFCNLQfgCBADFe8QeZZb6aOAusYBj hZK75EarN94xLx7cXoITAo1U0EBaJET11wRLkVKhVzfZDhxb5kyk+3wKNH95ZkTbc4grhl TLeTSjOaMekjzA0vuSX8a8LSS/Gnx2NNl8AujAgxFtCHxi0lLvPvBxyS1ws0fL0zpacVhQ 754q1g0+lHN1WmTW/H/gGOm2kVtpWiLalXB7vQ6tT2D8W9AlIlj1vLni1yYzSy58zyDh66 FhAT9bYLn+o72YB/Ia+KOZhzf4F0hgr4Td/6fdfi7oYWd5wRPxJ9/poDzPSVmA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706014410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=1wZd9ffAqGbuli/t8ueJvyjn6qOFNSXfo6836tJNYwM=; b=YWlqUNF+IyCBJXStAl+Bad5d2YIIPH+cIo6ZHX9GNwz3SmTtDM0t92nNiDX1oGDHp7Nqlv 2uWxvqvW8OKoedAQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" Subject: [patch v5 00/19] x86/cpu: Rework topology evaluation Date: Tue, 23 Jan 2024 13:53:29 +0100 (CET) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This is a follow up on V4 of this work: https://lore.kernel.org/all/20230814085006.593997112@linutronix.de and contains only the not yet applied part which reworks the CPUID parsing. This is also preparatory work for the general overhaul of APIC ID enumeration and management. Changes vs. V4: - Add DIEGRP level explicitly This applies on Linus tree and is available from git: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git topo-cpuid-v5 Thanks, tglx --- arch/x86/kernel/cpu/topology.c | 167 ---------------------- b/arch/x86/events/amd/core.c | 2 b/arch/x86/include/asm/apic.h | 1 b/arch/x86/include/asm/cpuid.h | 36 ++++ b/arch/x86/include/asm/processor.h | 5 b/arch/x86/include/asm/topology.h | 39 +++++ b/arch/x86/kernel/amd_nb.c | 4 b/arch/x86/kernel/apic/apic_flat_64.c | 7 b/arch/x86/kernel/apic/apic_noop.c | 3 b/arch/x86/kernel/apic/apic_numachip.c | 7 b/arch/x86/kernel/apic/bigsmp_32.c | 6 b/arch/x86/kernel/apic/local.h | 1 b/arch/x86/kernel/apic/probe_32.c | 6 b/arch/x86/kernel/apic/x2apic_cluster.c | 1 b/arch/x86/kernel/apic/x2apic_phys.c | 6 b/arch/x86/kernel/apic/x2apic_uv_x.c | 63 +------- b/arch/x86/kernel/cpu/Makefile | 3 b/arch/x86/kernel/cpu/amd.c | 146 ------------------- b/arch/x86/kernel/cpu/cacheinfo.c | 6 b/arch/x86/kernel/cpu/centaur.c | 4 b/arch/x86/kernel/cpu/common.c | 91 +----------- b/arch/x86/kernel/cpu/cpu.h | 13 - b/arch/x86/kernel/cpu/debugfs.c | 40 +++++ b/arch/x86/kernel/cpu/hygon.c | 129 ----------------- b/arch/x86/kernel/cpu/intel.c | 25 --- b/arch/x86/kernel/cpu/mce/amd.c | 4 b/arch/x86/kernel/cpu/mce/inject.c | 7 b/arch/x86/kernel/cpu/topology.h | 56 +++++++ b/arch/x86/kernel/cpu/topology_amd.c | 182 ++++++++++++++++++++++++ b/arch/x86/kernel/cpu/topology_common.c | 241 ++++++++++++++++++++++++++++++++ b/arch/x86/kernel/cpu/topology_ext.c | 130 +++++++++++++++++ b/arch/x86/kernel/cpu/zhaoxin.c | 4 b/arch/x86/kernel/smpboot.c | 12 + b/arch/x86/kernel/vsmp_64.c | 13 - b/arch/x86/mm/amdtopology.c | 35 ++-- b/arch/x86/xen/apic.c | 6 b/arch/x86/xen/smp_pv.c | 3 b/drivers/edac/amd64_edac.c | 4 b/drivers/edac/mce_amd.c | 4 39 files changed, 792 insertions(+), 720 deletions(-)