From patchwork Tue Jan 23 12:53:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 190889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp310358dyi; Tue, 23 Jan 2024 04:55:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKGe7+ByQiVkT+/lwbbaF4kCmlgcGyjOn9nfXGMvdGgxnr8VBBEhrU6jPKGu37M0QsnbR4 X-Received: by 2002:a17:907:c08b:b0:a2f:ba03:43c7 with SMTP id st11-20020a170907c08b00b00a2fba0343c7mr63711ejc.222.1706014505126; Tue, 23 Jan 2024 04:55:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706014505; cv=pass; d=google.com; s=arc-20160816; b=pNqr6VzI2cyvAM1ap14xHCtwSWgS+/kRi6C6GFTGln1oqgtBehUysa7aeprfT7TavK Bi/1BppandmrGzj2JEfEwbnbv2xqBZX3SMRgCy03FRM3Xv2WChGYVjlnLom7IMTRZgZ5 zW7lddcqLZPMB+nTDb1iwQ6fhP19/tQLOLGOUsqrENHqo4ODclcB8pG7DcrgIkgHh2kk O1VZA5P21/p4q3VEaEdtRzny+6sbA4mp2qs2zjAZStnd2WTsOo+BBvNEPDHsHWyAjuoa o+3mnkD8xELq7cVP5yPSWKILKwr8uI0vbt06tZMXvMkOhKt3P5A/ct5aEyUYBm5MJzG3 95bA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=5SkHGXX2iNobIfvEprLaCMhF0AA0+N9lS14uXgc9Oxo=; fh=Te0fDPJ/sd+7p881M6fa/oF213lBbJvGdEFWr/TLqNA=; b=DwkGHGgL+QTXqty22h2DP+1hjjQoPHz6G/gvWNpQI+94JXaoY5Tc3pKPQx65WBp/SU 6oQCXQqGZkVQuVbiv34gFkNOyXnss82Os8rE69STaTPbXWvL94/UOHdjuAHfEo2H0lUf u/KRgOjKcC7u+wHk5pgtFOIYzhEaRv2ksaLVhjOIRO2iDnxyxBr6GBiVjaxvsn2XGO1a 4gaEGOA6LdiHEi78u4MPmRq23dzsET9SSH/NS/mhq7hzHN2sNDWmrFf10as7OFdqGH3b oBvHZG5o8EFAhUf/ClasqvQvC0YY74gYud4ACImzlOcJR0PICcGYlESnDOXFILkUmBlI GbXg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="x/oJxVld"; 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-35269-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35269-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id kt8-20020a170906aac800b00a3035753f42si2261855ejb.637.2024.01.23.04.55.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 04:55:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35269-ouuuleilei=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=@linutronix.de header.s=2020 header.b="x/oJxVld"; 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-35269-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35269-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id A1B441F232F9 for ; Tue, 23 Jan 2024 12:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E57255FDAD; Tue, 23 Jan 2024 12:53:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="x/oJxVld"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sQdvtvy2" 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 EDC5C5F866 for ; Tue, 23 Jan 2024 12:53:39 +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=1706014421; cv=none; b=CyHXYp04A71m3Pl0l3dQoqZeI/Vnl04gjw+hvL6+zuVffig75Yhff9ZFIAljvU96Fiuf3Q96pxo48rn6iQvueYozVtXL6lAbW/QO0IRkIThcbCCUr1vnx5tmlBtaiwtFjvWXTQl8aPOcJu2cpHPLgSY5ywAE1bz/Pzy58M0Jwd0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706014421; c=relaxed/simple; bh=4HZ2n8xBznhGrWWyNa9CZ7scSju09FL9B9OOA/nZ0Pw=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=j3GB0NYeaFLzIvDd6xNyVZdutTePzAEwAvmwNHPC0XJc9XhqSAQ/buHXc1Cv8jO1b8FLz15jKUdSsr68BESyHEIU5oXyJivXnsCmki9LkUftv3AwoZPAGX9CFt2bqmiSwzI4M2T2gZKbTA+gvPlbOkAT6ZHkMlnCi3NmDSBlZlE= 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=x/oJxVld; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sQdvtvy2; 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: <20240117115908.608449830@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706014418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=5SkHGXX2iNobIfvEprLaCMhF0AA0+N9lS14uXgc9Oxo=; b=x/oJxVldzzIyWd9ZZhwZhssdZKDrRgfxNHcYnKG/3GrGMwMZPNRatO+NrqBmIZ0uoyGtL2 brfSjrt0/B9WMLStSX8TZvDoXpyVQopg/COt5eOV2O92qQ4TInF4kTKd5AeY/TvWQ691RB KdhNzTCV3BglPj4vcgMZiiR7trTSDgLBRY6I/dAYGIQqivX2Lp7fSaT7LZxXn186Kn4yvv aVvq/4TeXYNHQ9hYPsPWaPapwe/bhB60eiMK12IOtYL6jAUd7v9zmAlZ5kM831j4TgdJXA 4hM6+GkQLNd0jU8G3QY9WIHvF2IjOzl45XulfQtI4WD7ZVfM4ZMUTnydEX4kNQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706014418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=5SkHGXX2iNobIfvEprLaCMhF0AA0+N9lS14uXgc9Oxo=; b=sQdvtvy2kaOWzsmDxl+ZpL18NeCsTTrWDpPeVJYlmnDXHk0M7M6l9w1+tP4r++lryZxQMn 63IppdJg/LznmTAQ== 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 05/19] x86/cpu: Move __max_die_per_package to common.c References: <20240117115752.863482697@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 23 Jan 2024 13:53:37 +0100 (CET) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788885865789655259 X-GMAIL-MSGID: 1788885865789655259 From: Thomas Gleixner In preparation of a complete replacement for the topology leaf 0xb/0x1f evaluation, move __max_die_per_package into the common code. Will be removed once everything is converted over. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Sohil Mehta Tested-by: Michael Kelley --- arch/x86/kernel/cpu/common.c | 3 +++ arch/x86/kernel/cpu/topology.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) --- --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -75,6 +75,9 @@ u32 elf_hwcap2 __read_mostly; int smp_num_siblings = 1; EXPORT_SYMBOL(smp_num_siblings); +unsigned int __max_die_per_package __read_mostly = 1; +EXPORT_SYMBOL(__max_die_per_package); + static struct ppin_info { int feature; int msr_ppin_ctl; --- a/arch/x86/kernel/cpu/topology.c +++ b/arch/x86/kernel/cpu/topology.c @@ -25,9 +25,6 @@ #define BITS_SHIFT_NEXT_LEVEL(eax) ((eax) & 0x1f) #define LEVEL_MAX_SIBLINGS(ebx) ((ebx) & 0xffff) -unsigned int __max_die_per_package __read_mostly = 1; -EXPORT_SYMBOL(__max_die_per_package); - #ifdef CONFIG_SMP /* * Check if given CPUID extended topology "leaf" is implemented