Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp257918imw; Fri, 8 Jul 2022 02:22:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vM1RjA2t520zxxKbUFCnHD7zWIfcJQP9okJ9uwiwEG/LAwJFpfar5LgU1ooF3a+W0/g2Le X-Received: by 2002:a05:6a00:1d26:b0:528:3a25:ea3c with SMTP id a38-20020a056a001d2600b005283a25ea3cmr2828721pfx.67.1657272154057; Fri, 08 Jul 2022 02:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657272154; cv=none; d=google.com; s=arc-20160816; b=FQvivb2vVnWGAiad5tKIR3sZUWhdqNL2RgjR4IEaxHcmGGW/kT4by3QvdzmnVrFGPo MyMYtvYjlKl++JS2EkCQOXpVt6MEtxdK8Blav6Ic7ebGfWn1W6+mle9A5CG6HvC9osST mdhL4hTA1KBdT/I+j1/c24vehtB966Gnx5Bq7BicYht3T2EV2zejnCGldNCxqak43Bgp l7WWyM4TictUBFi2LexMMDD07g9fZjABa8b3hYa8gK36rdubngNNRlokowyv7E8aCzlt RrUkXcUbAkNL9CldKAw8XvE6pZImxvaNqc9cYgo3B1Oy2AQD8yzdmv4PMpjO18RFy3KE RHBQ== 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=6WRAcgjZqhtsu7dnGbKno8OWNDz/e0XqsIPnoLEyQsA=; b=1HjtYy/7GcGkZVoqFXkQ/gij6y0YBErNcPf0dvn+mPDNGkzcZgr7cIofJpSEFaXm6C sFF4+Gtp/ONStXwsiWjxBZQL/MABZoJWVvJX+3L/MiPJhznAISy9rBuyMab6OznnZIKA FagArnKvEbb01NonBK8cGEE8gJ1I4xtEebYh2BDhUxUzCFOxaSzp/Q7Nl7QLwpsrHoD1 ZDuVxLnOZcyxG4+MEjmbwphombPeQXbemKdLcwt+WIaj0ZybzWez9zZUx60euyDW0U9m bgaEuTAgOnJTbi/0hQFJKRwOJbhe5nNY51jbxmcwX8JV+StcfcdC4JW0cvRy9JkTQtbh vc4Q== 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 x70-20020a633149000000b004129a79150asi2423283pgx.309.2022.07.08.02.22.16; Fri, 08 Jul 2022 02:22:34 -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 S237165AbiGHI0E (ORCPT + 99 others); Fri, 8 Jul 2022 04:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237138AbiGHI0C (ORCPT ); Fri, 8 Jul 2022 04:26:02 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 675C97969A for ; Fri, 8 Jul 2022 01:26:00 -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 6E21E1063; Fri, 8 Jul 2022 01:26:00 -0700 (PDT) Received: from bogus (unknown [10.57.39.193]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A11A53F792; Fri, 8 Jul 2022 01:25:54 -0700 (PDT) Date: Fri, 8 Jul 2022 09:24:43 +0100 From: Sudeep Holla To: Conor Dooley Cc: Paul Walmsley , Palmer Dabbelt , Palmer Dabbelt , Albert Ou , Catalin Marinas , Will Deacon , Greg Kroah-Hartman , "Rafael J . Wysocki" , Daire McNamara , Conor Dooley , Niklas Cassel , Damien Le Moal , Geert Uytterhoeven , Zong Li , Emil Renner Berthing , Jonas Hahnfeld , Guo Ren , Anup Patel , Atish Patra , Changbin Du , Heiko Stuebner , Philipp Tomsich , Rob Herring , Marc Zyngier , Viresh Kumar , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Brice Goglin Subject: Re: [RFC 2/4] arch-topology: add a default implementation of store_cpu_topology() Message-ID: <20220708082443.azoqvuj7afrg7ox7@bogus> References: <20220707220436.4105443-1-mail@conchuod.ie> <20220707220436.4105443-3-mail@conchuod.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220707220436.4105443-3-mail@conchuod.ie> 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 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) 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. -- Regards, Sudeep