Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1265066imu; Fri, 4 Jan 2019 17:13:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN7cKHX5IIqp54PaoBQsQ0jXl0rUK7kQ0Ffm1q9nCR6eeLosI0NQ5U0xs2/VL45XeGe6AdX2 X-Received: by 2002:a17:902:820d:: with SMTP id x13mr54367650pln.229.1546650825891; Fri, 04 Jan 2019 17:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546650825; cv=none; d=google.com; s=arc-20160816; b=MFueCSbu9qyb9wKu8P11w79P4osffDkiggXKeURFVPoU2dywR7mFKjnMz4x7worhYX zsT5MelsBhhhkmPm70qthdswrycaFT+UdE4cOZbuXpbJ0kR0fMv/A4DeLyayYsYFwdCw 5m4eGMkKe1bWNnmu3KdbgiZRXDFm73tggcexYZiD2O7vVXIuiF7pHXiJfVaj0TBhzHUa 7gyNwxKudnGYm9i/zqlw6ssFoOsWqJBRMfsBwVghb+w7fo5Dq4XouxFX4Xhab/XOSL5m y4b8nWzBzPMKHwsNN3xGJpo715wgohdtvJyZylNPfraDEIBJlEDsDQxyETjDTE1noyDM nmDw== 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=X0vaNpnx8FZ9RScG8FEYYK+1etTJclr20a4HrzsXwEc=; b=tg2p5P2igClC+b0DXBKtycMhlY9gzYbEMtjsNMOUVQqStDLTHNjg5GZ3IxIz308aXJ kAC9J7/9dmMCKsyR3pE9fUtDSY6Jw/cReBSEEn4GcRdZ6UEwlOet0t+s5Eu5wWZ06GZc Wb69Ka9d0X80Jn3xMrViu9cAOXgKN+4SmkuSXWK+3tryzLnYxQ2Q227H4jpfSKXn5RJ4 GRZCCqHJaMwINGL5iJr+0BI36eMZkKmJnY6c/T7DWdXzbPqYkkVtZbeDF4ZdtEZ0lKWz cnZYfjfoPsA1wlgm+Al7bzZUIGvhd9WyXGzwZrl5e42fPa4C4Bcb3dH+cxAjb6E2Ecyv aNbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wKUjabnn; 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 k134si55966732pga.401.2019.01.04.17.13.17; Fri, 04 Jan 2019 17:13:45 -0800 (PST) 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=wKUjabnn; 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 S1726383AbfAEBKS (ORCPT + 99 others); Fri, 4 Jan 2019 20:10:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:54450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbfAEBKS (ORCPT ); Fri, 4 Jan 2019 20:10:18 -0500 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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 48AA3218E0; Sat, 5 Jan 2019 01:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1546650617; bh=izqCTOdMtM2Q4k4QJclyd2lx3suw6mEz/I9wnXl1lI0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=wKUjabnnUaYNqbBdb8BvEbsUEOHOtgZfL6//PYG152G8VNgJGZFofVwdCHY6M0Ixk AO424sV6TfBoiGGMAiJirdQo+5x5Ute0XwVF7TpI+BWOxaEmpUHlYv1yXvZocDu9TX xpd6fQxtsT+Np+ht9goCueLK1nOD/B7GJ5J35GZw= Received: by mail-qt1-f176.google.com with SMTP id v11so42303320qtc.2; Fri, 04 Jan 2019 17:10:17 -0800 (PST) X-Gm-Message-State: AA+aEWaLvH1yLat7Dec64CuxwRFg7FCKzeWNxlUast/FJ/jbH6A2CYSE SbIk/8unHVNjqB26U76VAaxeoEDtfDc7Kq8h6w== X-Received: by 2002:ac8:6b18:: with SMTP id w24mr52668314qts.144.1546650616425; Fri, 04 Jan 2019 17:10:16 -0800 (PST) MIME-Version: 1.0 References: <20181220210141.GA17198@bogus> In-Reply-To: From: Rob Herring Date: Fri, 4 Jan 2019 19:10:05 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/7] dt-bindings: riscv: cpus: add E51 cores to the list of documented CPUs To: Palmer Dabbelt Cc: Paul Walmsley , "linux-kernel@vger.kernel.org" , linux-riscv@lists.infradead.org, Mark Rutland , Albert Ou , devicetree@vger.kernel.org, Paul Walmsley 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 Fri, Jan 4, 2019 at 4:46 PM Palmer Dabbelt wrote: > > On Thu, 20 Dec 2018 13:01:41 PST (-0800), robh@kernel.org wrote: > > On Fri, Dec 14, 2018 at 09:21:50PM -0800, Paul Walmsley wrote: > >> Add compatible strings for the SiFive E51 family of CPU cores to the > >> RISC-V CPU compatible string documentation. The E51 CPU core is > >> described in: > >> > >> https://static.dev.sifive.com/FU540-C000-v1.0.pdf > >> > >> Cc: Rob Herring > >> Cc: Mark Rutland > >> Cc: Palmer Dabbelt > >> Cc: Albert Ou > >> Cc: devicetree@vger.kernel.org > >> Cc: linux-riscv@lists.infradead.org > >> Cc: linux-kernel@vger.kernel.org > >> Signed-off-by: Paul Walmsley > >> Signed-off-by: Paul Walmsley > >> --- > >> Documentation/devicetree/bindings/riscv/cpus.txt | 5 +++-- > >> 1 file changed, 3 insertions(+), 2 deletions(-) > >> > >> diff --git a/Documentation/devicetree/bindings/riscv/cpus.txt b/Documentation/devicetree/bindings/riscv/cpus.txt > >> index adf7b7af5dc3..fb9d4f86f41f 100644 > >> --- a/Documentation/devicetree/bindings/riscv/cpus.txt > >> +++ b/Documentation/devicetree/bindings/riscv/cpus.txt > >> @@ -68,8 +68,9 @@ described below. > >> - compatible: > >> Usage: required > >> Value type: > >> - Definition: must contain "riscv", may contain one of > >> - "sifive,rocket0" > >> + Definition: must contain "riscv", may contain one or > >> + more of "sifive,rocket0", "sifive,e51", > >> + "sifive,e5" > > > > I can't really tell what are valid combinations from this. It reads that > > I could list every string here and that would be valid. It is basically > > 'riscv' plus any other combinations of strings. > > I think that's actually the correct interpretation: if it's a RISC-V CPU then > it must have "riscv" listed in compatible, but it can also be anything else. But is '"sifive,rocket0", "sifive,e51", "sifive,e5", "riscv"' valid? What about '"sifive,rocket0", "sifive,e5", "riscv"'? If they are, is there really any value in specifying all of them or different variations? I'd suggest keeping things simple because writing a json-schema gets messy when there's arbitrary combinations of compatible values. > There's some concrete examples here (a "sifive,e51" is a type of "riscv"), but > I don't think it's realistic to count on us being able to enumerate all RISC-V > implementations here. I think you'll find that "riscv" will become pointless as it is not specific enough to mean anything. It would be like having "arm" as a compatible on Arm based systems. OTOH, you only really need to enumerate what you can't discover. For example, how are optional features (SIMD inst a common example) discovered? On Arm, we generally just have the CPU model in the compatible, but it's generally not even used because that, cpu revision, instruction set features, etc. are all discoverable. Rob