Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3128547rdb; Tue, 6 Feb 2024 07:59:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEi7Kg5EVO1G6Ij3BU55WNew40WQ3a1YosSqnjvn0px32aDBemsCJNBbUp7fP8tlDrlUPT2 X-Received: by 2002:a05:6808:399a:b0:3bf:c9c0:a262 with SMTP id gq26-20020a056808399a00b003bfc9c0a262mr4732008oib.9.1707235142268; Tue, 06 Feb 2024 07:59:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707235142; cv=pass; d=google.com; s=arc-20160816; b=kVKb1S3v886w9886CTMJ8MqPcgm6kyq/VT8Ua8YNb3ti/TzAJ2mmUb8lnJqAJtx9pM mMjWzGOgW/Yy4BXF/2WkwbDsBfALfKoYH7NvcCsXAJFx3gEuK2HAYReGOn8eSQ3SXwRj HBoCkGqTIK+zh0Q+4MbuvvXaxlss/wHyXXHXYoo3ItJ58XebQXzGMoIRfv6FK/TziUxd vaw2Nte0Y9Hof6Jafqs6meKASqgWOT7XsGgx9Lav2Zyld1px5XtQUU5XjsH5EK6xcC1Q VJNcQHyevyAnOG44Z8ftaZarzSrOiKC3HfDbnmicZGZEOhw5NNVAyhQTW/JMxQtODRku MwEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nCnf8Q3aeAEVnysuF0oNuGH4F1kDc0xuQ8p1tyHi5Lg=; fh=HOLfkro1JGq+s/jb3CwZZEs/XAhpNIQnGx8F6LGX3c0=; b=LEHp4sKqVMboRBuBBgRJ57uRWEdKn+M8KCzLY2vPKY1JPiZpx16Tg2h04jIT036n+E PzA9SXbrlpm09G6JNZJIEX5ef2zRUO6fvGrhPac0DXK971N9ISU6OtcPWSkiOHus4p9f Cq5lz7txTiZomBcBYhxtcqe9TYgzk3NRUl0xbSaPDeLuYalpgDSbCWSw3KZojbeBNXc4 JhJXQq+Ui8Wo6cIiexZFQY/6NdtJZVQZtAmR+C6sGAMy9hPq9M/JzMnBv8LtAQyO7CYz 1DasiFbynb2xQaO7M/ZZawTdii9eP2yHZ7iigRt4+otGtE5V8uGx+BrtDI7ZfFW08QCL 9Utg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=OOqG6FMe; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-55291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de X-Forwarded-Encrypted: i=1; AJvYcCWtK/X1pUu5BK63ILb5sMykzX3ihZwwFHETE74aVFi13OKlG4nRH0vCD3KskOXtY1OGk1f+u7JIz4WD0WtZj8pB4ljYaQrjqUdZYoKzBw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i8-20020a05620a0a0800b00785535a5dacsi1596590qka.466.2024.02.06.07.59.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 07:59:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55291-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=@alien8.de header.s=alien8 header.b=OOqG6FMe; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-55291-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55291-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 097091C22ADA for ; Tue, 6 Feb 2024 15:59:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC756134742; Tue, 6 Feb 2024 15:58:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="OOqG6FMe" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 4FDAB134727 for ; Tue, 6 Feb 2024 15:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707235135; cv=none; b=o9IkYjpxZAG9hOFLN3nCmBo04J+k8LUxk7hR9og6qd7faSHD8xAmFl7Lau7Vv25QZLR/bCUMWQJKITJC0xNVSHXEJCTJZ7kcTEJEikOt5qy2gbUWFVXwI8c5gzQ3oG/xfHi3nAXzO23JMRMMEXwNYbGM57ITYBNChERctbIUrhM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707235135; c=relaxed/simple; bh=iQKdxn8Q6UzvgRQIU5HP7nQIZF+PWL+WLsjt877ujqk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FqM4z8E4gWP3v9KDeXP/ffxm8FqN+sezyOzzvinMRyA98vOH/KbDYqLT4hi3NndriCMdCWIoRgOUud3DGqa0HJzg2ksEWdGungL4tA9VUQudldrIalXelMf7JOgvYaQPNO/GzR6H5xdn/E+VVX2H4kbyX4/OpR9V1d5zxPVV3QM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=OOqG6FMe; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 9EA0140E023B; Tue, 6 Feb 2024 15:58:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wcfWwa9y7WDI; Tue, 6 Feb 2024 15:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1707235129; bh=nCnf8Q3aeAEVnysuF0oNuGH4F1kDc0xuQ8p1tyHi5Lg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OOqG6FMeLE9lSwQzjfmXlOeWzIoniHYY94+BXKXZ6pFnVwTDqP1dgCE35ya53OdHy 32MHf9/TPOhk4yQiBQIPuuGUJHHqGt+wdi+C59kSWm6scJH56eriVkVuKlvH7A0eyK lK+vnLMJBNpBYWSk3eYwyYdTAD2mfilOqoeplpmKoakG1iZ1eQnDceBucqxsXwMvmZ wxJIk40U1bRxjG95KdLSyKoDkQUL/BdKHNOinlFj0YA1LPLTpc4pzxa8ZhliOlDWxw g9PbpvF1xbt23/HZrn36nFaKUH0MCvlHBOOo9v0Msft+2JR8bPvwFOikAPzuqDnPmK lo0sV08VsKOYY8zvicWTGO0NxHogWYedd0cwhMLhhQ7y9g1WEMiuE8v+RFd3tSQBCZ SzqahK3JIBN1aT9ujmVmYZy7KinoS5C+fGH8rOYBPBJ52p7IeqmtYzeYQ04f9mG9IR KXfRn3hQ9GNjniVyGMwpyiJmgzpmPVXa42miWTOf1vWvzxo2i9yZBQg9k8ppwqqCiM eP2g5uCSQ2ARDa7lH5aLQv/0B+9iQybNziij7auNHsGzvYJQEJ7xnmxZPpNLDJJTtz 3HsDFDSIomKLmk3FnWfz2iR4bwePXvDWwC9j7IN6b4nJ8B5gnXDpqCv+HnWuvVDYFm rB2A26BHjlh4AlQ1wBY56uLE= Received: from zn.tnic (pd953021b.dip0.t-ipconnect.de [217.83.2.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 27A3B40E01A2; Tue, 6 Feb 2024 15:58:31 +0000 (UTC) Date: Tue, 6 Feb 2024 16:58:30 +0100 From: Borislav Petkov To: Thomas Gleixner Cc: LKML , 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: Re: [patch v5 11/19] x86/cpu: Use common topology code for AMD Message-ID: <20240206155830.GPZcJXJkOv8NOtIfHi@fat_crate.local> References: <20240117115752.863482697@linutronix.de> <20240117115909.011311608@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240117115909.011311608@linutronix.de> On Tue, Jan 23, 2024 at 01:53:47PM +0100, Thomas Gleixner wrote: > --- a/arch/x86/kernel/cpu/mce/inject.c > +++ b/arch/x86/kernel/cpu/mce/inject.c > @@ -433,8 +433,7 @@ static u32 get_nbc_for_node(int node_id) > struct cpuinfo_x86 *c = &boot_cpu_data; > u32 cores_per_node; > > - cores_per_node = (c->x86_max_cores * smp_num_siblings) / amd_get_nodes_per_socket(); > - > + cores_per_node = (c->x86_max_cores * smp_num_siblings) / topology_amd_nodes_per_pkg(); > return cores_per_node * node_id; > } One more hunk depending on what goes in when and in what order, to fix a build issue from the RAS tree: ERROR: modpost: "amd_get_nodes_per_socket" [drivers/ras/amd/atl/amd_atl.ko] undefined! make[2]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 1 make[1]: *** [/mnt/kernel/kernel/2nd/linux/Makefile:1873: modpost] Error 2 make: *** [Makefile:240: __sub-make] Error 2 --- diff --git a/drivers/ras/amd/atl/umc.c b/drivers/ras/amd/atl/umc.c index 7e310d1dfcfc..283812bd8497 100644 --- a/drivers/ras/amd/atl/umc.c +++ b/drivers/ras/amd/atl/umc.c @@ -264,7 +264,7 @@ static u8 get_die_id(struct atl_err *err) * For CPUs, this is the AMD Node ID modulo the number * of AMD Nodes per socket. */ - return topology_die_id(err->cpu) % amd_get_nodes_per_socket(); + return topology_die_id(err->cpu) % topology_amd_nodes_per_pkg(); } #define UMC_CHANNEL_NUM GENMASK(31, 20) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette