Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp289706imw; Fri, 8 Jul 2022 03:04:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uGL9SSZCNDbGHJ4e+oxlha4EYWDaxUU5BZye8UVXI0uKCht90Ga3vpF0j22eKk0ir7J4Wc X-Received: by 2002:a17:90a:6284:b0:1df:4595:57af with SMTP id d4-20020a17090a628400b001df459557afmr3218673pjj.188.1657274684973; Fri, 08 Jul 2022 03:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657274684; cv=none; d=google.com; s=arc-20160816; b=VKbK0f/9bOWsyd3dxEcFYDEDG3t5hErXjhQpONYpAIlAF1B3Q1f7QVgL3yLL9jklyM GEEHksOQYU0ymrzUr2BCru0LWg543GhwtaN5c6/ZcVgLR47HCxOTwR/lyagMa+vhT9TP uVG85JNLv5Ji1NVqjCLyHGm143PVFWOyfRSHllEsF3wOliHjO6LzVIa/8Spszu/oHn6b L6mU1WiLTw+aA3XUPm1S4S8GRYO7Tws//afigULx34RdpgUlVNpQbQLpnYjDRu3eWWvp LA18u5fQvMfGoCSflo0ShLlzoA6gFepsc1hRu/EzJOx8t+aITHAJXO17chFj88+ItTdG LI8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=W2am/zK6PC4HGxKqfN+++fIpKVkb0ekZzNWrSt1JL+A=; b=Y2dKAunqWJtiIsxc+tqTn4Khh6C756moEnBiu6vKBivmWFQQtyoU4ZSM2uMWu8mcJ7 jwtYzNS1+V5/6cUmy4esgHMDb9xwNaUTZbJ7FNtWJ19kmXxqcoqD2d37vp0ZRZZIUtuR zOBLYI5JIXABnrVr3HA7I4NUJ9iU+NVdKQC1gZ+MbBwQIru5DgTL6o67oZcI53QLpLD0 NDxy/e7SjBhZXJlsE9/HRXLdK+IKPm5IJaiCb/Va7VXEsSAzjFs4RpTrtHdAdBUmKxfi aC17tUxTiPPrm6nufYdMWzAU30nd6VgwPFba0jeiSChxd/y8ciro2Dj2WXH03cyF9POD a9vQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902c40c00b0016a2c24fbf7si11919531plk.478.2022.07.08.03.04.31; Fri, 08 Jul 2022 03:04:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237829AbiGHJsg (ORCPT + 99 others); Fri, 8 Jul 2022 05:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237169AbiGHJsa (ORCPT ); Fri, 8 Jul 2022 05:48:30 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4AFB3CC6 for ; Fri, 8 Jul 2022 02:48:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3A1B1106F; Fri, 8 Jul 2022 02:48:27 -0700 (PDT) Received: from bogus (unknown [10.57.39.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6BD4E3F66F; Fri, 8 Jul 2022 02:48:21 -0700 (PDT) Date: Fri, 8 Jul 2022 10:47:10 +0100 From: Sudeep Holla To: Geert Uytterhoeven Cc: Conor Dooley , Paul Walmsley , Sudeep Holla , Palmer Dabbelt , Palmer Dabbelt , Albert Ou , Catalin Marinas , Will Deacon , Greg KH , "Rafael J. Wysocki" , Daire.McNamara@microchip.com, Niklas Cassel , Damien Le Moal , Zong Li , Emil Renner Berthing , hahnjo@hahnjo.de, Guo Ren , Anup Patel , Atish Patra , changbin.du@intel.com, Heiko Stuebner , philipp.tomsich@vrull.eu, Rob Herring , Marc Zyngier , Viresh Kumar , linux-riscv , Linux Kernel Mailing List , Linux ARM , Brice.Goglin@inria.fr Subject: Re: [RFC 2/4] arch-topology: add a default implementation of store_cpu_topology() Message-ID: <20220708094710.rxk6flrueegdsggr@bogus> References: <20220707220436.4105443-1-mail@conchuod.ie> <20220707220436.4105443-3-mail@conchuod.ie> <20220708082443.azoqvuj7afrg7ox7@bogus> <473e6b17-465b-3d14-b04d-01b187390e66@microchip.com> <20220708092100.c6mgmnt7e2k7u634@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 08, 2022 at 11:28:19AM +0200, Geert Uytterhoeven wrote: > Hi Sudeep, > > On Fri, Jul 8, 2022 at 11:22 AM Sudeep Holla wrote: > > On Fri, Jul 08, 2022 at 08:35:57AM +0000, Conor.Dooley@microchip.com wrote: > > > On 08/07/2022 09:24, Sudeep Holla wrote: > > > > On Thu, Jul 07, 2022 at 11:04:35PM +0100, Conor Dooley wrote: > > > >> From: Conor Dooley > > > >> > > > >> RISC-V & arm64 both use an almost identical method of filling in > > > >> default vales for arch topology. Create a weakly defined default > > > >> implementation with the intent of migrating both archs to use it. > > > >> > > > >> Signed-off-by: Conor Dooley > > > >> --- > > > >> drivers/base/arch_topology.c | 19 +++++++++++++++++++ > > > >> include/linux/arch_topology.h | 1 + > > > >> 2 files changed, 20 insertions(+) > > > >> > > > >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > > > >> index 441e14ac33a4..07e84c6ac5c2 100644 > > > >> --- a/drivers/base/arch_topology.c > > > >> +++ b/drivers/base/arch_topology.c > > > >> @@ -765,6 +765,25 @@ void update_siblings_masks(unsigned int cpuid) > > > >> } > > > >> } > > > >> > > > >> +void __weak store_cpu_topology(unsigned int cpuid) > > > > > > Does using __weak here make sense to you? > > > > > > > I don't want any weak definition and arch to override as we know only > > arm64 and RISC-V are the only users and they are aligned to have same > > implementation. So weak definition doesn't make sense to me. > > > > > > > > > > I prefer to have this as default implementation. So just get the risc-v > > > > one pushed to upstream first(for v5.20) and get all the backports if required. > > > > Next cycle(i.e. v5.21), you can move both RISC-V and arm64. > > > > > > > > > > Yeah, that was my intention. I meant to label patch 1/4 as "PATCH" > > > and (2,3,4)/4 as RFC but forgot. I talked with Palmer about doing > > > the risc-v impl. and then migrate both on IRC & he seemed happy with > > > it. > > > > > > > Ah OK, good. > > > > > If you're okay with patch 1/4, I'll resubmit it as a standalone v2. > > > > > > > That would be great, thanks. You can most the code to move to generic from > > both arm64 and risc-v once we have this in v5.20-rc1 > > Why not ignore risc-v for now, and move the arm64 implementation to > the generic code for v5.20, so every arch will have it at once? > We could but, 1. This arch_topology is new and has been going through lot of changes recently and having code there might make it difficult to backport changes that are required for RISC-V(my guess) 2. May be too late for v5.20, I would like to see if we can even drop tiny arm64 bit in the code. It may be risky to try that this late and also with other topology changes we already have queued. Let me know if that makes sense. -- Regards, Sudeep