Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1721932imm; Fri, 6 Jul 2018 05:27:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe+rdNOBdcAoJvUVQafsXb02CJFGpxD0o8e1+wrOs4dMKZEfXRgWNFrNZNUxzdzli7987t6 X-Received: by 2002:a62:3856:: with SMTP id f83-v6mr10504776pfa.48.1530880061859; Fri, 06 Jul 2018 05:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530880061; cv=none; d=google.com; s=arc-20160816; b=RcdFU9DWq8HROAVdqFxdHsK5E0uAQ7l7wlGFdVAtgLXvl2E4OM0n4LD25O2PpSnJPZ jKcb+DuivuVP2ERc7hoZ3LcvTdfSUFjDqFws0Mb9yo+Oo6scVCpQLdh8oOiT1Rv3KCCm 44vhyJNJSyvEhp++phBVjrCqefpNkMwqjpN+WueZ+nVUpJ5TH2vcCkK/3Vnd5jfAV52y zlLc2LQtCWnBobHZHdhNacgXga0DiRSViEkVxuzwSxbmZ70SnXgJ7pJD034WPxYHZ/tW OAmH7cMvXn7Nkx2Bv77nSnWnobzB5tVz1VJYYuKLNet8xG958J1C5GqhkKBhLkPYlOyA diCA== 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:arc-authentication-results; bh=MlgfmIvHdIlN/9+h47dfa1k96S3+mN38y5WBiakyYLA=; b=MMl/IfXVwlI13PsZBpjjiVbbUwrGZA5rgaolWTmoWxSmUhqiGUFjPlezFhzT/SPbcL th8Fr6ScU1rF6lcZzVg9VdDmOt6RBrFnmD55y2Xtq+zpLXNhAuWkw+I+OYjuCvSHa5Yt XMmIANte3IhEquH3KcTk/UWxcSwHrXlOd8383up2GU5oHKkLzA6vi5icRO7ebLtxnt84 xhrEr22/sm/NzlO1/moxxOPxRS7dTp73f/7LQl0pZIEtOBG98qFtXqD8sCUDUkSWVvHu K37Th5vzskjih/TibhYJSQfrj26fivUmxvVWZz4oPtGIyPtGItMzIyUAP0jZS7BCjNYM yE5g== 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 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2-v6si8017305plr.393.2018.07.06.05.27.26; Fri, 06 Jul 2018 05:27:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932830AbeGFM0q (ORCPT + 99 others); Fri, 6 Jul 2018 08:26:46 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:39068 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932732AbeGFM0o (ORCPT ); Fri, 6 Jul 2018 08:26:44 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07793569|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e01l01425;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=12;RT=12;SR=0;TI=SMTPD_---.CN5.Ucd_1530879991; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.CN5.Ucd_1530879991) by smtp.aliyun-inc.com(10.147.40.233); Fri, 06 Jul 2018 20:26:31 +0800 Date: Fri, 6 Jul 2018 20:26:31 +0800 From: Guo Ren To: Mark Rutland Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, daniel.lezcano@linaro.org, jason@lakedaemon.net, arnd@arndb.de, c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org, green.hu@gmail.com Subject: Re: [PATCH V2 16/19] csky: SMP support Message-ID: <20180706122631.GA30265@guoren> References: <21d859826fe19aecaa2aefe3103d6d33e6f1b925.1530465326.git.ren_guo@c-sky.com> <20180706052432.q74gql32dtj5gj3b@salmiak> <20180706113200.GA27148@guoren> <20180706114352.6r7zkjunoafqtr3s@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180706114352.6r7zkjunoafqtr3s@lakrids.cambridge.arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 06, 2018 at 12:43:52PM +0100, Mark Rutland wrote: > Please see the devicetree spec [1], section 2.3.4. Valid values are: > > * "okay" // equivalent to no status property present > * "disabled" > * "fail" > * "fail-sss" Nice tip, thx. > I'm a bit confused. You write (1 << cpu) into cv<29, 0>, to enable a > particular CPU, so I assume that bit uniquely identifies a CPU, Yes, you're right and cr<29, 0>'s bit uniquely identifies a cpu. > and > therefore the reg is some unique ID for the CPU. static int csky_of_cpu(struct device_node *node) { const char *status; if (of_property_read_string(node, "status", &status)) status = "okay"; if (strcmp(status, "disabled") == 0) goto error; return 1; error: return 0; } void __init setup_smp(void) { struct device_node *node = NULL; int i = 0; while ((node = of_find_node_by_type(node, "cpu"))) { if (!csky_of_cpu(node)) continue; set_cpu_possible(i, true); set_cpu_present(i, true); i++; } } Hmm? No in next version patch, it's no use. > I see. > > Is this SMP bringup mechanism architectual, or are you likely to need > another mechanism to turn on CPUs on future chips? It's the only SMP bringup mechanism architectual for C-SKY SMP. There is no another way in future and SOC vendor couldn't change it. > You probably want to use an enable-method property to describe this. No, thx. Guo Ren