Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1275528imm; Wed, 10 Oct 2018 11:52:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV60DLXIUFwlnzPK/DVGqvVzqnSHBnJInPCqqn13hXcxam8w8RZ57tr82mTABZjFK2BAPLWIg X-Received: by 2002:a63:4860:: with SMTP id x32-v6mr30519936pgk.375.1539197555839; Wed, 10 Oct 2018 11:52:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539197555; cv=none; d=google.com; s=arc-20160816; b=oO8QHcDY4yTDSJ+E0xw+nn992sl2OcSWGqOP9DeFYkpWhvr64/yo5LQ3NdByFC+6gP PcIxZCf6QddgdH95FlK7baQAfb87ysKdz/eJen36mxMl8nfSG4A0sR7awfn3HVjcj6KH Jl2ee/Fpbo5za1kVD8pG9Z57OG+I44HEjXaEZubAR+qqkyjhe2iOj4MY+EnPBCzVR3wr LctduI6kwKiSfGQoBK4paBopZ+Q3olqokQ75Kg7c2PYChhBGMMhccvoozjQN/3m9+dRp GaqO6i/Aka4cIALlGH5T0cpuJKT0N+8QtvKvn+r8QqYvw8WU1c+exUnfy0xnMHShipvt EP9w== 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=2V4ZZFd9aTsFkmL20XmPE3C9CFAmO8rQLeHVbGPvk6c=; b=qmF/oWUCKxY7XMfFwGk21uvNKX7WnompqUlA3Zzf+/FsjGLSAr2u/gkGReUddl2kmP k3tj9sN104SbF5mbvxG39+WmQa/QUrrKIBQuwM29o8aTJbCCfQgTIwWbNzhD99MD+lF/ OsfaOFfBNVS5uxD4u2nOiroDMCMpZ38jEZ4S5DWeguLRq8L1oADLQyknh1fgeMj0Ff2u ci9gWXh4/OTQbPzurmhi6s614MHr7ssuhamtgNDnIi4A5sxvzf5ebIwI0frnEW2IF0Oi hOrUgXSx+dQp82sFHfT6BNDvts1FPXsGarQLjcmV29zexcXdYYD3xoJTmYTkZRmBf7BW MrEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dLpS7wTu; 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 31-v6si25160366plj.117.2018.10.10.11.52.20; Wed, 10 Oct 2018 11:52:35 -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=dLpS7wTu; 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 S1727132AbeJKCPE (ORCPT + 99 others); Wed, 10 Oct 2018 22:15:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:39250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbeJKCPE (ORCPT ); Wed, 10 Oct 2018 22:15:04 -0400 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (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 3BF2B214DA; Wed, 10 Oct 2018 18:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539197497; bh=uB0V0LXSDHhFNqF05cL6wKvYwhMrIvYPYHycqFqFjQI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dLpS7wTunaLo35H+I95aB/AYLeb1pJ8nlV0vaG+JTIx+Dtl4RmmBWjWlOdzoU81rD QMfAuo6QPqhQsGmnF/E54dt+XZJq4FjHH/l64TztLpmubWzQF/8AvGpv/o36tqc1ug Wf65NJ9hkeBH1JrEn3sRaflE3XTvNHi5CDc1FxWk= Received: by mail-qt1-f170.google.com with SMTP id e10-v6so6904435qtq.12; Wed, 10 Oct 2018 11:51:37 -0700 (PDT) X-Gm-Message-State: ABuFfojqDmSRcfts7HHiAr/YM0Gt/ZJWuJMZzk4PcCbtHo9LhOi7mztD j7h55zcK6du5VDcnpFr8iYSXNFGNdiL83YpZXg== X-Received: by 2002:ac8:440d:: with SMTP id j13-v6mr29073546qtn.257.1539197496400; Wed, 10 Oct 2018 11:51:36 -0700 (PDT) MIME-Version: 1.0 References: <20181005165848.3474-1-robh@kernel.org> <20181005165848.3474-14-robh@kernel.org> <20181009115713.GE6248@arm.com> <20181010165048.GB16512@arm.com> In-Reply-To: <20181010165048.GB16512@arm.com> From: Rob Herring Date: Wed, 10 Oct 2018 13:51:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 13/36] dt-bindings: arm: Convert PMU binding to json-schema To: Will Deacon Cc: "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linuxppc-dev , Grant Likely , Kumar Gala , Frank Rowand , Mark Rutland , Linus Walleij , Olof Johansson , Arnd Bergmann , Mark Brown , Tom Rini , Pantelis Antoniou , Geert Uytterhoeven , Jonathan Cameron , Bjorn Andersson 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 Wed, Oct 10, 2018 at 11:50 AM Will Deacon wrote: > > On Tue, Oct 09, 2018 at 01:14:02PM -0500, Rob Herring wrote: > > On Tue, Oct 9, 2018 at 6:57 AM Will Deacon wrote: > > > > > > Hi Rob, > > > > > > On Fri, Oct 05, 2018 at 11:58:25AM -0500, Rob Herring wrote: > > > > Convert ARM PMU binding to DT schema format using json-schema. > > > > > > > > Cc: Will Deacon > > > > Cc: Mark Rutland > > > > Cc: linux-arm-kernel@lists.infradead.org > > > > Cc: devicetree@vger.kernel.org > > > > Signed-off-by: Rob Herring > > > > --- > > > > Documentation/devicetree/bindings/arm/pmu.txt | 70 -------------- > > > > .../devicetree/bindings/arm/pmu.yaml | 96 +++++++++++++++++++ > > > > 2 files changed, 96 insertions(+), 70 deletions(-) > > > > delete mode 100644 Documentation/devicetree/bindings/arm/pmu.txt > > > > create mode 100644 Documentation/devicetree/bindings/arm/pmu.yaml > > > > > > [...] > > > > > > > -- interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu > > > > - interrupt (PPI) then 1 interrupt should be specified. > > > > > > [...] > > > > > > > + interrupts: > > > > + oneOf: > > > > + - maxItems: 1 > > > > + - minItems: 2 > > > > + maxItems: 8 > > > > + description: 1 interrupt per core. > > > > + > > > > + interrupts-extended: > > > > + $ref: '#/properties/interrupts' > > > > > > This seems like a semantic different between the two representations, or am > > > I missing something here? Specifically, both the introduction of > > > interrupts-extended and also dropping any mention of using a single per-cpu > > > interrupt (the single combined case is no longer support by Linux; not sure > > > if you want to keep it in the binding). > > > > 'interrupts-extended' was implied before as it is always supported and > > outside the scope of the binding. But now it is needed to validate > > bindings. There must be some use of it and that's why I added it. > > However, thinking some more about this, I think it may be better to > > have the tools add this in automatically whenever we have an > > interrupts property. > > To be honest, if you'd included that in the commit message I'd have been > happy :) > > > I guess the single interrupt case is less obvious now with no > > description (it's the first list item of 'oneOf'). The schema If the > > single interrupt is not supported, then we can drop it here. > > Well the description says "1 interrupt per core" which is incorrect. You are reading the schema wrong. There are 2 cases supported as defined by each '-'. The 2nd case is all the keywords until the indentation decreases. So 'description' is just description of the 2nd case. The first case is just "maxItems: 1". I probably didn't put a description because why write in free form text what the schema says (other than of course no one knows json-schema...). YAML combines the best of Makefiles and python. You can't have tabs and Indentation is significant. :) > I also > don't understand why maxItems is 8. Humm, I probably just made that up based on GICv2 limitations. What should it be? If there's not any inherit maximum, can we put something reasonable? There's not really any way to express that it should match the number of cores in the system. Rob