Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp518443ybb; Wed, 8 Apr 2020 04:43:49 -0700 (PDT) X-Google-Smtp-Source: APiQypLD9Z+3Gu+clNmDV1iF2CM8a0KEj809JzL6USc7XhROlDNvFGRU1mMUg+SXLqQy99KU8DEJ X-Received: by 2002:a9d:895:: with SMTP id 21mr5127436otf.365.1586346229230; Wed, 08 Apr 2020 04:43:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586346229; cv=pass; d=google.com; s=arc-20160816; b=RvHM1HHvb9FQ5UZV8YKkz7z4n6vzK0KA+39gYBGgbpKAX3Xp78w4HTb8gGkDL5SNrX /3MLGphj6H3jZ/+TLUIbDjgZwpinIF1HmEbtSHTa/su684kffmB4Tt09bWCb3MiW625E aYw9+rJbgkKvqt+xUHXWmiN5M0KxkA7JHTYd5DpWGLr7JbruGJiStDcottIvrnAXA0Ov 1ZtB27f1FFjY2bZgDk9+ceywUnrJOZOxAu7eiMhEtBKrLgCxR0n5Qsi0aoinXdEAa9x7 qfgQ/PF7ShF5le+DoHfCjULgpoLcb5Hr1IpPqbjZzC5R/3hrYCPIFoOanCZE0w7oAIXV 15Mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:subject:message-id:cc:to:from :dkim-signature; bh=kAfR+MEcWmH1pn2XtI1ye2XkXpLmPO99yHe8dszIBGg=; b=GZL8AnfeB6R0AkTkIDlB4sd3qiehhxTAry5B0/KhuOywS7VvTMT+UCk6mSgSQsIOLP QicEU2aWCIqW/cxMZnr9YMqL2eXiR78YvPAqepiK6xJ85OVYOL7UQXmyENG4ESW7+lwj hiRdBu+h7tKaUHFrUP5pdOBF3kDrVzvqujVXA1QdanEGAdeKGhYazo9pZik2agSashjY F2BXwEboQRKQbpFkmosSYMlIwa1sbcRhuUfUZuaUyV8F7SO81OEJ5hq8h8UyRpEzTmq2 sKVPGjGAY0ltSowpNmoK9to2lxdC0+bF17XJAkLjmlfLAIdcWIZVcidLqxjoUum4tjT7 ZDpw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=OF6Nt3iy; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dmarc=pass fromdomain=flygoat.com>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 141si2185858oii.44.2020.04.08.04.43.34; Wed, 08 Apr 2020 04:43:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=OF6Nt3iy; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dmarc=pass fromdomain=flygoat.com>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728600AbgDHLmH (ORCPT + 99 others); Wed, 8 Apr 2020 07:42:07 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17823 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728454AbgDHLmG (ORCPT ); Wed, 8 Apr 2020 07:42:06 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1586345987; cv=none; d=zoho.com.cn; s=zohoarc; b=fCtkhLymfD9CHEpnp/e36RIN0jp2eO9Q8YObQQ/hH3SPpeBTRAcB2w0x8PufvgkObUGSuIxOFACGQGHz/d4vPPu3O6PIgtxjEa/NxAkrAqj2LASYI71j/p2L8461Gd/sa9+NW7hG24JS9IsE/uWh0vZLUOXt4rXI11IFyDvIw68= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1586345987; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=kAfR+MEcWmH1pn2XtI1ye2XkXpLmPO99yHe8dszIBGg=; b=Rsfiow0S0UN13KV9WUZgibfvDOgZwcEwq5+ATIFJAjfcizvjDCcYKoBQhAtPch4r+k2MHkSiAod3fAfhkMRJ8kaj0b3vHrJUvWWSjEuLMfPa2IjHt1XyZeV/CMRLci4te3vJlZR/t0b/6jxUVNjTK1EAfNzRW4D32EOiCImxh74= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=flygoat.com; spf=pass smtp.mailfrom=jiaxun.yang@flygoat.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1586345987; s=mail; d=flygoat.com; i=jiaxun.yang@flygoat.com; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=kAfR+MEcWmH1pn2XtI1ye2XkXpLmPO99yHe8dszIBGg=; b=OF6Nt3iysk9nvLjDkbzL1V/4j51ZIbNOjrBnD6TQz0lvX8Ni+b2paJOFRYT8DgMy fdyXF8NMzzGOFz7jusgTzL2gl3LfGcc7dp0eWeY6oxoAJ+AuOZSrAQWatyBY+cY7noZ 8MCjqyP5TKgGzhclvzOGUpofOHFHj+D9vGhHqmME= Received: from localhost.localdomain (39.155.141.144 [39.155.141.144]) by mx.zoho.com.cn with SMTPS id 1586345984855887.2159695647649; Wed, 8 Apr 2020 19:39:44 +0800 (CST) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Thomas Bogendoerfer , Huacai Chen , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Florian Fainelli , Robert Richter , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , Thomas Gleixner , Jason Cooper , Marc Zyngier , Paul Burton , Allison Randal , Enrico Weigelt , Vladimir Kondratiev , Alexios Zavras , Richard Fontana , Paul Cercueil , Zhou Yanjie , =?UTF-8?q?=E5=91=A8=E7=90=B0=E6=9D=B0=20=28Zhou=20Yanjie=29?= , YunQiang Su , Arnd Bergmann , Serge Semin , Matt Redfearn , Steve Winslow , Peter Xu , afzal mohammed , Mike Rapoport , Kamal Dasu , Oleksij Rempel , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, oprofile-list@lists.sf.net Message-ID: <20200408113505.2528103-5-jiaxun.yang@flygoat.com> Subject: [PATCH 04/12] arch_topology: Reset all cpus in reset_cpu_topology Date: Wed, 8 Apr 2020 19:34:14 +0800 X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200408113505.2528103-1-jiaxun.yang@flygoat.com> References: <20200408113505.2528103-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Jiaxun Yang --- drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 9c2405d08dae..3398b7ac7dfb 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -542,7 +542,7 @@ void __init reset_cpu_topology(void) { =09unsigned int cpu; =20 -=09for_each_possible_cpu(cpu) { +=09for (cpu =3D 0; cpu < NR_CPUS; cpu++) { =09=09struct cpu_topology *cpu_topo =3D &cpu_topology[cpu]; =20 =09=09cpu_topo->thread_id =3D -1; --=20 2.26.0.rc2