Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp517544ybk; Wed, 20 May 2020 05:36:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeuVisTL/oIsA3RLuwSL3XsvHCxbnqPHHUBHnSywTURQ2Q05by+B2q/pC1YqFfighm1WyV X-Received: by 2002:a17:906:f06:: with SMTP id z6mr1701941eji.105.1589978166013; Wed, 20 May 2020 05:36:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589978166; cv=pass; d=google.com; s=arc-20160816; b=pY2Ty/4CIYwQhczytx6DBiVK0LpN2eB/KMX5IaqUXwrOi6fZpBnN3wSskN5zNP0Jew VdEZZGhj2XFYFc/fD/qOhtamJCd8950lOFROXNDgEXt9jPOYBdFR+aqguyjPyDXLU/Fh ZVHkAup05z5S1fyfDuxCkm8zcA3O6tSPiaIrZKtV0iHhyO4U9DVjmic9AGJvDEOIdrLY n/wcbAzChEwhsi2gI4mKO9ZabNh8e2ZfSxxncoR2yjRaXoo4ljDO7kHyiL9Nx9Au5Bww mPzb7F+5M296PRl2W7UHAbSi1dJT4MVo+V3mSubxgnOklkTfSaFnpshiZBRNBs0VX7pH z3KQ== 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 :message-id:references:in-reply-to:reply-to:user-agent:subject:cc:to :from:date:dkim-signature; bh=TJqmWfeUuN5LE75nul3wH3FZ6nQ1yQSdQfK6PtOHOHs=; b=izythmFdtXaqqN2bYdq0gthOLOdi37hteuFPXvQmekAG8hgTZUgUTmLguv/5r22u0c UrWEaJuGuDmhFaFfh2nzUdqinBDCw/WsriQ+uaor+g4x6YfdYqGIEEfMfckF3EXtYVYb nQ9ftqoTe8yhD7iGPVsupAHDjfa7vOfam6hvURR8z92kK/5r4jkFWZjUY9+XJLBZ6A4C 1jLqlKrmEHCkFjKSiIKEcCLnpAK9IsPHd5F4PqkkUlErjq8ybOMlhUD1Fz8RHqqv3t/H p39CmSDJs9KFmswrK0+0Q+5edl5C6Yh9fgefgovO43/fTtIqJHGWn2TAIvYCegnIRtQ3 PgbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=FPh8G8GY; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dmarc=pass fromdomain=flygoat.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id s11si1369505edq.114.2020.05.20.05.35.43; Wed, 20 May 2020 05:36:05 -0700 (PDT) Received-SPF: pass (google.com: 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; dkim=pass header.i=@flygoat.com header.s=mail header.b=FPh8G8GY; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dmarc=pass fromdomain=flygoat.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726990AbgETMda (ORCPT + 99 others); Wed, 20 May 2020 08:33:30 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17708 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726868AbgETMd3 (ORCPT ); Wed, 20 May 2020 08:33:29 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1589977932; cv=none; d=zoho.com.cn; s=zohoarc; b=Ik0Yigs8kImtKhjXZnlMAInonF7b/WsWonJh+gODoNZXScAlhj+leFUpuOQGOFU2QVL9m0hstajj9njFXh7BeEZaD+0c4rMG0bmZ1bVV4eYTYBdiYHVXXU+dbZpfnZMHhqZzKu+IH4SW6Yfa6ycINAoyAeAUkFgTsG7I36u/mbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1589977932; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:Reply-To:References:Subject:To; bh=TJqmWfeUuN5LE75nul3wH3FZ6nQ1yQSdQfK6PtOHOHs=; b=O2Au6E6yKNllX40+daihOylvmzJCdZenyqgJHZaYbeCGZvSlQ5nEjMfUDwDKkZjsYDs8M70ZoKeYOuT4P0dGYpi2Pgv0TRAPtO714bx/bs3nFrIbvdEwcTjNi5Xhvz8Lz0dmIyfboL2mB4nLD+YDyMnSmmGYKXW3n9gpM22f3ik= 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=1589977932; s=mail; d=flygoat.com; i=jiaxun.yang@flygoat.com; h=Date:From:To:CC:Subject:Reply-to:In-Reply-To:References:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=TJqmWfeUuN5LE75nul3wH3FZ6nQ1yQSdQfK6PtOHOHs=; b=FPh8G8GY+zJnnKuDxur7rUuF/DurU4V4e9Wx3Za4T0yrgFvXXKgl8Q/MJRyK+zby 5p529MSsXY5b722bnTsLlU5d6PaW5DfyXR+SCdodNEMEmHQY5Ntpxo1uvU3c+Uo+1jj M5MLJ7GLWH66SmoY4v3+X+wGHp0Sz5Tasa2+cKw8= Received: from [127.0.0.1] (223.104.210.187 [223.104.210.187]) by mx.zoho.com.cn with SMTPS id 1589977929817309.0615537915593; Wed, 20 May 2020 20:32:09 +0800 (CST) Date: Wed, 20 May 2020 20:32:01 +0800 From: Jiaxun Yang To: Paul Cercueil , Zhou Yanjie CC: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, tsbogend@alpha.franken.de, paulburton@kernel.org, chenhc@lemote.com, tglx@linutronix.de, robh+dt@kernel.org, daniel.lezcano@linaro.org, keescook@chromium.org, krzk@kernel.org, hns@goldelico.com, ebiederm@xmission.com, dongsheng.qiu@ingenic.com, yanfei.li@ingenic.com, rick.tyliu@ingenic.com, sernia.zhou@foxmail.com, zhenwenjin@gmail.com Subject: Re: [PATCH v8 1/6] MIPS: JZ4780: Introduce SMP support. User-Agent: K-9 Mail for Android Reply-to: jiaxun.yang@flygoat.com In-Reply-To: References: <1589898923-60048-1-git-send-email-zhouyanjie@wanyeetech.com> <1589898923-60048-3-git-send-email-zhouyanjie@wanyeetech.com> <5EC4DADD.1000801@wanyeetech.com> Message-ID: <13934660-2138-489A-A87E-A6AA222F6218@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E4=BA=8E 2020=E5=B9=B45=E6=9C=8820=E6=97=A5 GMT+08:00 =E4=B8=8B=E5=8D=887= :33:22, Paul Cercueil =E5=86=99=E5=88=B0: >>=20 >> Yes, the current way is indeed a little problem, it will cause=20 >> num_possible_cpus() =3D=3D NR_CPUS, I will try to find a better way=2E > >You can do: > >for_each_of_cpu_node(cpu_node) { > cpu =3D of_cpu_node_to_id(cpu_node); > __cpu_number_map[cpu] =3D cpu; > __cpu_logical_map[cpu] =3D cpu; > set_cpu_possible(cpu, true); >} > FYI: There is a abandoned DeviceTree[1], parser=2E You can take it=2E I'm going to submit this topology clean-up for next release cycle but you can pick it for now=2E [=2E=2E=2E] [1]: https://lkml=2Eorg/lkml/2020/4/11/1088 --=20 Jiaxun Yang