Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp430203ybz; Wed, 15 Apr 2020 11:26:00 -0700 (PDT) X-Google-Smtp-Source: APiQypKiJueVjAR1kSRD4RsD/5NsLELWj5HE8ba27319i/LYnFNKo5XY/qKv5b3rRV7tc1UpHfN+ X-Received: by 2002:a17:906:30d7:: with SMTP id b23mr6411344ejb.108.1586975160761; Wed, 15 Apr 2020 11:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586975160; cv=none; d=google.com; s=arc-20160816; b=C9NlJSTyJ5w0c/HqdSQYE7s66bOI9lCTbdbTs5iQep1Vmm0bvHRTT2DpXqgUVhJpyg yNBlx4gEnx2uouKnFvlNOkKqYB5kTSYTDWDGenVDlXjOlTYaEtA4M6JMmiUQt99G9C4V TkrhuYkFesEPjT+rPO/3oLZYNy2OOhh69aln7S6eGzwRwKxkAMldIZSRaZHSLL63bcLk 1j+jivXrjuUNKPW3QCsla1PUWobwMhP6Wov7MiWLY7nZANuC9CxWT+yuoEm4z8NlVh/e Hot9Wo2gV8Y9kIrLkKX9dCaMTHKYaRCWLV67vB11Z1oFtlakHbIKQfc3cLC7DgB3Udld y6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AaBaD9p/mwWa658QzTU9Bci420+OpU6P+6Blusjzr0s=; b=b+P1gNr1Ntwmpvq6e1MP7QRizi6hst97TFS8i6ofnO3tkkBucpjRvh2MTw7W0jHLjj ybyfppcUoEg4h+PCbxV4QO1NzFBdDHHtVLLgL80ZvMFPeroWSdsw+9JKkpzIfmcig7Aa Sktbup47QQ6S9Ty3H8+QOs4q8OT9LJ61WYPeeq3Rgc825r0jrtYgxrLVoIq7kMq+l+sV RZPigBlytXmZZepZvbZe6RwtcSbd9/m+2ykcsqQH4Q+Fg/Rg+XZ05r7cSsSgrLMkQ47v EBWkr02YIWRwCQNnI7wphwoviZI1KImnNXe9Jfee0n0bZzbD4Ncw2zhSum+5K5xroTUh OBaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si10482609edz.258.2020.04.15.11.25.35; Wed, 15 Apr 2020 11:26:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438104AbgDNKDm (ORCPT + 99 others); Tue, 14 Apr 2020 06:03:42 -0400 Received: from foss.arm.com ([217.140.110.172]:52300 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438097AbgDNKDl (ORCPT ); Tue, 14 Apr 2020 06:03:41 -0400 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 2ED3031B; Tue, 14 Apr 2020 03:03:40 -0700 (PDT) Received: from bogus (unknown [10.37.12.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 896E43F6C4; Tue, 14 Apr 2020 03:03:31 -0700 (PDT) Date: Tue, 14 Apr 2020 11:03:24 +0100 From: Sudeep Holla To: Jiaxun Yang Cc: linux-mips@vger.kernel.org, dietmar.eggemann@arm.com, Thomas Bogendoerfer , Huacai Chen , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Florian Fainelli , Robert Richter , Greg Kroah-Hartman , "Rafael J. Wysocki" , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Marc Zyngier , Paul Burton , Allison Randal , Enrico Weigelt , Kate Stewart , Vladimir Kondratiev , Alexios Zavras , Paul Cercueil , Zhou Yanjie , =?utf-8?B?5ZGo55Cw5p2wIChaaG91IFlhbmppZSk=?= , YunQiang Su , Arnd Bergmann , Serge Semin , Matt Redfearn , Richard Fontana , Steve Winslow , afzal mohammed , Peter Xu , Kamal Dasu , Oleksij Rempel , Sudeep Holla , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, oprofile-list@lists.sf.net, linux-pm@vger.kernel.org Subject: Re: [PATCH v2 04/11] arch_topology: Reset all cpus in reset_cpu_topology Message-ID: <20200414100324.GA17835@bogus> References: <20200412032123.3896114-1-jiaxun.yang@flygoat.com> <20200412032123.3896114-5-jiaxun.yang@flygoat.com> <20200414082734.GC6459@bogus> <20200414163514.00000100@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414163514.00000100@flygoat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 14, 2020 at 04:35:14PM +0800, Jiaxun Yang wrote: > On Tue, 14 Apr 2020 09:27:34 +0100 > Sudeep Holla wrote: > > > On Sun, Apr 12, 2020 at 11:20:34AM +0800, Jiaxun Yang wrote: > > > For MIPS platform, when topology isn't probed by DeviceTree, > > > possible_cpu might be empty when calling init_cpu_topology, > > > that may result cpu_topology not fully reseted for all CPUs. > > > So here we can reset all cpus instead of possible cpus. > > > > > > > As I have told before adjust and make it default before this function > > gets called. > > Hi, > > That's really impossible under current MIPS code structure. > I really doubt that, but I have no knowledge on MIPS port, so I would let maintainers take that call. > Another option would be prefill possible_cpu with all_cpu_mask before > calling topology_init, but that would make the code unnecessarily > complex. > I still prefer that. By the time we call this function on a config with say NR_CPUS=1024, we would have parsed DT and set nr_cpus to say 8 or 16 just for sake of example, so if platforms can't figure the possible CPUs, let them set it to NR_CPUs so that not all platforms have to run through that loop. > Here simply reset the whole array won't cause any regression. > Not necessary, please discuss and check if some simplification to MIPS can be done rather than patching here and there to make it work. -- Regards, Sudeep