Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2107117imd; Fri, 2 Nov 2018 06:10:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5edm/U8TS4D8eF1QIbPgaMGGeRujmjnaXifD9FDlVeVJx3/g4jbzOk8ggWdjUbHrUKVAWvB X-Received: by 2002:a62:a50d:: with SMTP id v13-v6mr11748746pfm.18.1541164258805; Fri, 02 Nov 2018 06:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541164258; cv=none; d=google.com; s=arc-20160816; b=SmLDNLrkEnCPq9b5HZ6KFiCtTNWZLsgzg4Lj27DRHc5uYwg1mfapteWXj5Ss+58IWg FyiaFX9JCL3NrzGVwrMTb7bJ8TyY7yJCDnTm7dCAlauqVSaNzqvTqZnKj8/0UPRRIgFn oKKq3Bc69hy5YcXwZXoME1n95QY6wNaJ95USSqTwCTl3p4+HTj68nOHytIKhAOBI6j6a mw0aDnPLEzGE30t9U12rfHLmjTue1KzKEVwt6Sdwz8CwSf2Ha96cBYVx6bEKV/voHyu3 XFCoQCEHK8m9XtLL0hgWbyyaikB+PsRX7kRXgcYmx/ORdzfBjJo7CCde9uOOIVTCKeQY JuEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4TAIHZMnGJwHrHHRNCRIX9i2QaXdmawy9E1pYUncJkg=; b=xLy9i2SOHiKK7nRiTzjTjtZIgpDtLtqD5An4ows+2evH0/HZS4B1kxngn7ck2yOqfk InwftjJwYo9h2BH4K2rkbb16ILxhaCn+RIaYaJ7dYLEw/T83wi2DSXzygmSHzVcRbgn0 K/GoLwsru2vVu/i9B/Uf9wRuRn4W8U/ReRvlhmhK6bLuAbybcFy932Hy6KDJ5Ns0r/bT OR/3gn6d1ekM/IcZ1CcesTB6IUsr0xbHJ7AHul9FYPeLyt0WwiZU6sP425DgFDGkt57j CApQeYM+2OTewFZy47xw6D0sJcfZw23m0uEe08BOXw6h53kX4HaxgN8kGN2IGmGbjV0O bmOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YNfbpLCs; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10-v6si11738124pge.18.2018.11.02.06.10.43; Fri, 02 Nov 2018 06:10:58 -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=@kernel.org header.s=default header.b=YNfbpLCs; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727552AbeKBWQ7 (ORCPT + 99 others); Fri, 2 Nov 2018 18:16:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:44554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbeKBWQ7 (ORCPT ); Fri, 2 Nov 2018 18:16:59 -0400 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B81E020847; Fri, 2 Nov 2018 13:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541164191; bh=qMZ9pyvPPpltF8qgL0zVw3Rg77DcLSobc/0euP13IuA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YNfbpLCsCdgkYETVweEENx2a5g4v6uDlZI0ZuR5jKt1z6kq91OotgOiOfYRCOtwb1 J035zvN6THkJOvhI36eG8c3LZag2Xw2fY0SMyu8Pq2QuiLv5jlKl/ddlqYlofPqk+t +Eh6xJR0U5sdMqrgTltaxid+bSJ24QNRt0TCcWXI= Received: by mail-qk1-f174.google.com with SMTP id o125so2901695qkf.3; Fri, 02 Nov 2018 06:09:51 -0700 (PDT) X-Gm-Message-State: AGRZ1gIds90/v2BkbqFTNr8VY2moMjAz662JQRF8OkKm5hbHiXWoMmND 5dofMmsO6OZ4OZPKB5IOEsD2BKNABuN40WqHKg== X-Received: by 2002:a0c:9e05:: with SMTP id p5mr10685349qve.246.1541164190826; Fri, 02 Nov 2018 06:09:50 -0700 (PDT) MIME-Version: 1.0 References: <1541113468-22097-1-git-send-email-atish.patra@wdc.com> <1541113468-22097-2-git-send-email-atish.patra@wdc.com> In-Reply-To: <1541113468-22097-2-git-send-email-atish.patra@wdc.com> From: Rob Herring Date: Fri, 2 Nov 2018 08:09:39 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 1/2] dt-bindings: topology: Add RISC-V cpu topology. To: Atish Patra Cc: linux-riscv@lists.infradead.org, Palmer Dabbelt , Anup Patel , Christoph Hellwig , Damien.LeMoal@wdc.com, Thomas Gleixner , Mark Rutland , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, alankao@andestech.com, Zong Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 1, 2018 at 6:04 PM Atish Patra wrote: > > Define a RISC-V cpu topology. This is based on cpu-map in ARM world. > But it doesn't need a separate thread node for defining SMT systems. > Multiple cpu phandle properties can be parsed to identify the sibling > hardware threads. Moreover, we do not have cluster concept in RISC-V. > So package is a better word choice than cluster for RISC-V. There was a proposal to add package info for ARM recently. Not sure what happened to that, but we don't need 2 different ways. There's never going to be clusters for RISC-V? What prevents that? Seems shortsighted to me. > > Signed-off-by: Atish Patra > --- > .../devicetree/bindings/riscv/topology.txt | 154 +++++++++++++++++++++ > 1 file changed, 154 insertions(+) > create mode 100644 Documentation/devicetree/bindings/riscv/topology.txt > > diff --git a/Documentation/devicetree/bindings/riscv/topology.txt b/Documentation/devicetree/bindings/riscv/topology.txt > new file mode 100644 > index 00000000..96039ed3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/riscv/topology.txt > @@ -0,0 +1,154 @@ > +=========================================== > +RISC-V cpu topology binding description > +=========================================== > + > +=========================================== > +1 - Introduction > +=========================================== > + > +In a RISC-V system, the hierarchy of CPUs can be defined through following nodes that > +are used to describe the layout of physical CPUs in the system: > + > +- packages > +- core > + > +The cpu nodes (bindings defined in [1]) represent the devices that > +correspond to physical CPUs and are to be mapped to the hierarchy levels. > +Simultaneous multi-threading (SMT) systems can also represent their topology > +by defining multiple cpu phandles inside core node. The details are explained > +in paragraph 3. I don't see a reason to do this differently than ARM. That said, I don't think the thread part is in use on ARM, so it could possibly be changed. > + > +The remainder of this document provides the topology bindings for ARM, based for ARM? > +on the Devicetree Specification, available from: > + > +https://www.devicetree.org/specifications/ > + > +If not stated otherwise, whenever a reference to a cpu node phandle is made its > +value must point to a cpu node compliant with the cpu node bindings as > +documented in [1]. > +A topology description containing phandles to cpu nodes that are not compliant > +with bindings standardized in [1] is therefore considered invalid. > + > +This cpu topology binding description is mostly based on the topology defined > +in ARM [2]. > +=========================================== > +2 - cpu-topology node cpu-map. Why change this? What I would like to see is the ARM topology binding reworked to be common or some good reasons why it doesn't work for RISC-V as-is. Rob