From patchwork Tue Apr 21 21:20:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 1274522 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 496GgG4rS0z9sSb for ; Wed, 22 Apr 2020 07:20:10 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726363AbgDUVUI (ORCPT ); Tue, 21 Apr 2020 17:20:08 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:35414 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgDUVUH (ORCPT ); Tue, 21 Apr 2020 17:20:07 -0400 Received: by mail-oi1-f193.google.com with SMTP id o7so61858oif.2; Tue, 21 Apr 2020 14:20:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BekGHQXhf3Jp2g2yBPT6sfHMkawHAJ1e7QouDFB2tgI=; b=uORWPMJTrzsmtUNiX1N/VOoxwKCVrXlP4MTNtaFPGv309mGsPIHlc4Z3c6VrfAjIpJ Q6evG9c967S70aeaDKxMDJGuKFGOTUVUeiDvdaD2VhjP4Rbrs+YURYjMtCleW8J/VG7k opMDpUle4xogIp5wd6HJaPuZqaQZS+38LFrenBHbhX4obJSNj8pMK5Pt5tnP8tpYJW0q 8B5Wunw6vagFUuUH+nX3Goq910Ej6PIr5eQRGaYQ+8aMIItQt4KKqhcRSN4D+C7WnxHR hB/bKPWKQTbgT8jkJlM+gztmMqticXkErCKnNRVHqQNLAy95RcGsqagznOBt5VbxfWhY ckCg== X-Gm-Message-State: AGi0PuYk8rGjxbYLIKymoM+NOZtRanHxK9s7+MKNHkfg7oPtwM4HY3vE VPRir182R69ACZt2ewDzt+Ph5OU= X-Google-Smtp-Source: APiQypJrtH80baDZtKRTOT0kMElY1jA2cRjLb3VeIJ1NvV5x+EnvfLhDMQL6YiHEORNm+arCo/wTiA== X-Received: by 2002:aca:4d47:: with SMTP id a68mr4743679oib.60.1587504006390; Tue, 21 Apr 2020 14:20:06 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id e15sm1040430otr.36.2020.04.21.14.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 14:20:05 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Laurent Pinchart , Masahiro Yamada Subject: [PATCH 1/2] dt-bindings: Fix command line length limit calling dt-mk-schema Date: Tue, 21 Apr 2020 16:20:03 -0500 Message-Id: <20200421212004.6146-1-robh@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org As the number of schemas has increased, we're starting to hit the error "execvp: /bin/sh: Argument list too long". This is due to passing all the schema files on the command line to dt-mk-schema. It currently is only with out of tree builds and is intermittent depending on the file path lengths. Commit 2ba06cd8565b ("kbuild: Always validate DT binding examples") made hitting this proplem more likely since the example validation now always gets the full list of schemas. Fix this by putting the schema file list into a temp file and using xargs. Reported-by: Laurent Pinchart Cc: Masahiro Yamada Signed-off-by: Rob Herring Tested-by: Laurent Pinchart --- Documentation/devicetree/bindings/.gitignore | 2 +- Documentation/devicetree/bindings/Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/.gitignore b/Documentation/devicetree/bindings/.gitignore index 5c6d8ea1a09c..0a6aef915fa4 100644 --- a/Documentation/devicetree/bindings/.gitignore +++ b/Documentation/devicetree/bindings/.gitignore @@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only *.example.dts -processed-schema*.yaml +processed-schema*.yaml* diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 1df680d07461..1c1cad860b7c 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -14,7 +14,8 @@ $(obj)/%.example.dts: $(src)/%.yaml FORCE DT_TMP_SCHEMA := $(obj)/processed-schema-examples.yaml quiet_cmd_mk_schema = SCHEMA $@ - cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs) + cmd_mk_schema = $(file >$@.tmp, $(real-prereqs)) \ + cat $@.tmp | xargs $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ DT_DOCS = $(addprefix $(src)/, \ $(shell \ From patchwork Tue Apr 21 21:20:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 1274523 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 496GgH2DKLz9sSd for ; Wed, 22 Apr 2020 07:20:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726055AbgDUVUK (ORCPT ); Tue, 21 Apr 2020 17:20:10 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:39832 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbgDUVUI (ORCPT ); Tue, 21 Apr 2020 17:20:08 -0400 Received: by mail-ot1-f68.google.com with SMTP id m13so287646otf.6; Tue, 21 Apr 2020 14:20:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Whprd6tZ2Z3Ve7mfuOJp09utBtWbFV7OF9k2tpLKr2I=; b=TIVe4yakHJRg1UYLPJ0kXOOpthkq3sW8dOMh3GoEA9h8kC77h+4nMb1cMQr/KIy6En bav8aQfXLXAZMbdaTENlqBVCVNjnETM5YQMmKn35Wtp7k3Z4yRONcDD9nzIdiEC/Tbrg A9cgolijyUkUtn0mqJcaklUaZYgqBezjelfNn/R301aFK9BcM3jKWIkqXXry8hab5/TG lMwUmf/ZVfbbqeg0/vmrRQKfZHgBRt+lI7ce0OSJ8Dcs1F3bUgAyJ8qbQcxfBdDOxlxT srn3XxAwlsZ0cjctRTmvo1vg8ZFuGvLTnvODF7H0PQsRteqgWyRJmkKK8cLny1ys+c3w TraQ== X-Gm-Message-State: AGi0PuaVMMBRh6wCw7bTNpLzByZOOc+Rg5ugua6pCUga50ma0NXjgzNr jW/Tp46NQ0AhwiV0sI9ZFt1g6Yc= X-Google-Smtp-Source: APiQypLpsCeWU4XUjL0B8mZHZX5CA/U+tQ+3fyggCajo3mWxcqIePFw9Tse8L6JifWGxnhFCRDKcuw== X-Received: by 2002:a9d:1d45:: with SMTP id m63mr14790276otm.271.1587504007552; Tue, 21 Apr 2020 14:20:07 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id e15sm1040430otr.36.2020.04.21.14.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 14:20:06 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Laurent Pinchart , Masahiro Yamada Subject: [PATCH 2/2] dt-bindings: Re-enable core schemas for dtbs_check Date: Tue, 21 Apr 2020 16:20:04 -0500 Message-Id: <20200421212004.6146-2-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200421212004.6146-1-robh@kernel.org> References: <20200421212004.6146-1-robh@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In commit 2ba06cd8565b ("kbuild: Always validate DT binding examples"), the core schemas (from dtschema repo) were inadvertently disabled for dtbs_checks. Re-enable them. Fixes: 2ba06cd8565b ("kbuild: Always validate DT binding examples") Cc: Masahiro Yamada Signed-off-by: Rob Herring Reviewed-by: Masahiro Yamada --- Documentation/devicetree/bindings/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 1c1cad860b7c..c66e8329a645 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -2,6 +2,7 @@ DT_DOC_CHECKER ?= dt-doc-validate DT_EXTRACT_EX ?= dt-extract-example DT_MK_SCHEMA ?= dt-mk-schema +DT_MK_SCHEMA_USERONLY_FLAG := $(if $(DT_SCHEMA_FILES), -u) quiet_cmd_chk_binding = CHKDT $(patsubst $(srctree)/%,%,$<) cmd_chk_binding = $(DT_DOC_CHECKER) -u $(srctree)/$(src) $< ; \ @@ -38,7 +39,7 @@ override DTC_FLAGS := \ $(obj)/processed-schema-examples.yaml: $(DT_DOCS) FORCE $(call if_changed,mk_schema) -$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := -u +$(obj)/processed-schema.yaml: DT_MK_SCHEMA_FLAGS := $(DT_MK_SCHEMA_USERONLY_FLAG) $(obj)/processed-schema.yaml: $(DT_SCHEMA_FILES) FORCE $(call if_changed,mk_schema)