From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E2BDCA0FF2 for ; Tue, 26 Aug 2025 18:20:38 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4cBGDj08VYz3dHC; Wed, 27 Aug 2025 04:20:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=93.17.235.10 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1756232436; cv=none; b=EKihEs6O3HNFVXwNwHZ2AVfQ7f7OUqcGrfziV/xaeOoNRQ4Gcr8H3i38nMj6whbdj4yQ0LYHqo+JX0aMfKGO42X97/GwN8400qTM+QOJk15RmkyYgL7Pkxw2snKjUGrnSBmU8HdPPQA0w36qzhn/gMVzS6B2K8SxOrwZd91BfQ/hJOZ9Y/dwPBoxvPVO9gTHIQHLu5P795MEhlVLqf/clwa8E2K2/AhRojGATHYzRT84pS+Jm+6Qk1sCa3MsS6pXYPdphpNbmoZltyjrWdy6/iElDcK639SlTPejWGV2jxTYQuVn4Hnm3KLWn1qTHZyNecXoBGzKNYdpXt3luiw7VA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1756232436; c=relaxed/relaxed; bh=4KEH2u08nM+KrNB8eUu36NxHIacVWyf4V1Cuy0P/MTM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IpqezaCYvxoQSlj+1cYv5UWM3kI5xNtfRqClGI/C2vj5Cr8L0v5itdlnpQuBuQQScyi4zfaXAMKpd7xkDH/4BG30b3MpcQKFcVlDua++obDWXwy2zLrttWTlW4IBero6STy0aOT7XS9v3DBpvgl+X1jjH8sbFpzgfh9q/Q7bM0OJqx4to+dRq6WbpYm+RYvovFtlPfpF8kilmXe9054pJ6tctzJ6I4g1deKUowZPd5jW5A/YF366YvbYyIYLWdXklSePlG9g9f6NB8Wijxuf4bIZ7Aq7xl5VsmYQTEh8i0VGp8iwNWJBARwfKBYroGhdqBnMTsUrIxReGobvqZ7dxg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu; spf=pass (client-ip=93.17.235.10; helo=pegase2.c-s.fr; envelope-from=christophe.leroy@csgroup.eu; receiver=lists.ozlabs.org) smtp.mailfrom=csgroup.eu Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=csgroup.eu (client-ip=93.17.235.10; helo=pegase2.c-s.fr; envelope-from=christophe.leroy@csgroup.eu; receiver=lists.ozlabs.org) Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lists.ozlabs.org (Postfix) with ESMTP id 4cBGDh1Bxnz3dGt for ; Wed, 27 Aug 2025 04:20:35 +1000 (AEST) Received: from localhost (mailhub4.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4c9wLb6DMvz9sSL; Tue, 26 Aug 2025 06:54:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NrvWrUS7BScP; Tue, 26 Aug 2025 06:54:31 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4c9wLb4cWgz9sSK; Tue, 26 Aug 2025 06:54:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 75E4E8B764; Tue, 26 Aug 2025 06:54:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id F2eraKjHbKgo; Tue, 26 Aug 2025 06:54:31 +0200 (CEST) Received: from [192.168.235.99] (unknown [192.168.235.99]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 93E148B763; Tue, 26 Aug 2025 06:54:29 +0200 (CEST) Message-ID: <1c8392b8-ea7b-48ef-8932-02f41e1233a3@csgroup.eu> Date: Tue, 26 Aug 2025 06:54:29 +0200 X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 3/8] powerpc/smp: Export cpu_coregroup_mask() To: K Prateek Nayak , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Juri Lelli , Vincent Guittot , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , thomas.weissschuh@linutronix.de, Li Chen , Bibo Mao , Mete Durlu , Tobias Huschle , Easwar Hariharan , Guo Weikang , "Rafael J. Wysocki" , Brian Gerst , Patryk Wlazlyn , Swapnil Sapkal , "Yury Norov [NVIDIA]" , Sudeep Holla , Jonathan Cameron , Andrea Righi , Yicong Yang , Ricardo Neri , Tim Chen , Vinicius Costa Gomes References: <20250826041319.1284-1-kprateek.nayak@amd.com> <20250826041319.1284-4-kprateek.nayak@amd.com> From: Christophe Leroy Content-Language: fr-FR In-Reply-To: <20250826041319.1284-4-kprateek.nayak@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 26/08/2025 à 06:13, K Prateek Nayak a écrit : > Deine cpu_coregroup_mask() to export the per-cpu cpu_corgrp_map when > coregroups are supported(). When has_coregroup_support() returns false, > cpu_coregroup_mask() returns the mask used by the PKG domain. > > Since this will only be used after CONFIG_SCHED_MC is added for PowerPC, > no functional changes are intended at this point. > > Signed-off-by: K Prateek Nayak > --- > arch/powerpc/include/asm/smp.h | 2 ++ > arch/powerpc/kernel/smp.c | 8 ++++++++ > 2 files changed, 10 insertions(+) > > diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h > index b77927ccb0ab..86de4d0dd0aa 100644 > --- a/arch/powerpc/include/asm/smp.h > +++ b/arch/powerpc/include/asm/smp.h > @@ -148,6 +148,8 @@ static inline const struct cpumask *cpu_smt_mask(int cpu) > } > #endif /* CONFIG_SCHED_SMT */ > > +extern const struct cpumask *cpu_coregroup_mask(int cpu); 'extern' keyword is pointless for function prototypes, remove it. See report from checkpatch: $ ./scripts/checkpatch.pl --strict -g a064a30c52a5 CHECK: extern prototypes should be avoided in .h files #28: FILE: arch/powerpc/include/asm/smp.h:151: +extern const struct cpumask *cpu_coregroup_mask(int cpu); total: 0 errors, 0 warnings, 1 checks, 22 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit a064a30c52a5 ("powerpc/smp: Export cpu_coregroup_mask()") has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. > + > /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. > * > * Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 4f48262658cc..e623f2864dc4 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1059,6 +1059,14 @@ static bool has_coregroup_support(void) > return coregroup_enabled; > } > > +const struct cpumask *cpu_coregroup_mask(int cpu) > +{ > + if (has_coregroup_support()) > + return per_cpu(cpu_corgrp_map, cpu); > + > + return cpu_node_mask(cpu); > +} > + > static const struct cpumask *cpu_mc_mask(struct sched_domain_topology_level *tl, int cpu) > { > return cpu_corgrp_mask(cpu);