Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1966153ybz; Thu, 23 Apr 2020 09:11:21 -0700 (PDT) X-Google-Smtp-Source: APiQypJNElsAzWJZj2xc6sj25rlYCd0p1qIwSYor4Jp4RnvP1+vz7nKgZbZxZApsHr/j2DrUI6gE X-Received: by 2002:a17:906:2f8f:: with SMTP id w15mr3367477eji.255.1587658281051; Thu, 23 Apr 2020 09:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587658281; cv=none; d=google.com; s=arc-20160816; b=O3wbZk8JAbNGWssH4cW3pTgj67XPqm0iVaTdtVsO8NBx+sPmcNB1DMi3qrFpU2U/Sy xtACedpXAl9H0hPNmXpevTDWoqHHK0aEhdCfl0ycJdspE3LBdftQpCQPonw1Epln0rwB dUcfLcu3ClSEtzfP84wwi0NekyvwX4FSAlu4NloBVf/wOd9+fVhg5Pg737Zo+MKGHPZt pEQzqMFpYmrYKTQ6VW8qwmixWu5oQcGEFKor+vkLlUTQK348hVj63L8khBDEAdtBtgt4 LR47cMT/BH8BLKwLU+L3nYsGl8kRpaVeEYn7KMA8bVW16Pw1tftL01bJtV1B2l0DfF1v ScyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=AZLyCcwqkibGaR9le7IP63Bh1Kjru1KSQHlQI6dGnFk=; b=jSxr/GoxnUYLhOtmnnwJztxreGTsdrp0Vw+7RwimJ960CEsId+HzyI4qo47pusege7 xljjYSHfAcDEbp6X4RIuf0JcjA4/eHXMWpHf8yu3yt5VD/UUbAZNV/GileJzA/+Y2gkY lK/l2tVmxHB9d+F/FXS/JKPZr8DZIZTGypwRyk40DgXdi9XBDvkHzWxJi7yP0j5WMVG4 9EmOxrpVlLrXO2dqr39CnO5jD9/nBr2/frRyO1ohTK+n1hXKH5Xqk1bqwXMdFX1a/Dt7 cFJoSd1FpJNkzt8wrNNCITzI8I7toIO852wQvL+wVdI38xB4bLg+wcEUl590nBTeHyUf JNAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DY3WH2bJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc27si1632641edb.544.2020.04.23.09.10.53; Thu, 23 Apr 2020 09:11:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DY3WH2bJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729480AbgDWQGk (ORCPT + 99 others); Thu, 23 Apr 2020 12:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729386AbgDWQGj (ORCPT ); Thu, 23 Apr 2020 12:06:39 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 944C2C09B040; Thu, 23 Apr 2020 09:06:39 -0700 (PDT) Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6B5BE4F7; Thu, 23 Apr 2020 18:06:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1587657996; bh=eWZUj9lTkWCXbhwqDd22bo5n7vvld9tAlLBaI/AKyv4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DY3WH2bJ8iJqesFWYQRAgc8apuelXqtZ/iHRDw+zHNOQC7hM6JCLyNNTaM8gxEAK5 WjAHJAVRNkG55Otg2RPBzSnARNva14Kd1mLtU9ZyfeAdafVYqx0qUjMxzB2kLcYy32 MeQ2uqL7UOq1ADpod+3DO5CMqmXSit3XxqtPbuco= Date: Thu, 23 Apr 2020 19:06:22 +0300 From: Laurent Pinchart To: Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada Subject: Re: [PATCH v2] dt-bindings: Fix command line length limit calling dt-mk-schema Message-ID: <20200423160622.GE6196@pendragon.ideasonboard.com> References: <20200422185708.6363-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200422185708.6363-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Thank you for the patch. On Wed, Apr 22, 2020 at 01:57:08PM -0500, Rob Herring wrote: > 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 passing the schema file list in a pipe and using xargs. We end > up doing the find twice, but the time is insignificant compared to the > dt-mk-schema time. > > Reported-by: Laurent Pinchart > Cc: Masahiro Yamada > Signed-off-by: Rob Herring Tested-by: Laurent Pinchart > --- > Documentation/devicetree/bindings/Makefile | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > > diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile > index 87c76bdabfe6..7782d9985082 100644 > --- a/Documentation/devicetree/bindings/Makefile > +++ b/Documentation/devicetree/bindings/Makefile > @@ -14,16 +14,18 @@ $(obj)/%.example.dts: $(src)/%.yaml FORCE > # Use full schemas when checking %.example.dts > DT_TMP_SCHEMA := $(obj)/processed-schema-examples.yaml > > +find_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \ > + -name 'processed-schema*' ! \ > + -name '*.example.dt.yaml' \) > + > quiet_cmd_mk_schema = SCHEMA $@ > - cmd_mk_schema = $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) -o $@ $(real-prereqs) > + cmd_mk_schema = rm -f $@ ; \ > + $(if $(DT_MK_SCHEMA_FLAGS), \ > + echo $(real-prereqs), \ > + $(find_cmd)) | \ > + xargs $(DT_MK_SCHEMA) $(DT_MK_SCHEMA_FLAGS) >> $@ > > -DT_DOCS = $(addprefix $(src)/, \ > - $(shell \ > - cd $(srctree)/$(src) && \ > - find * \( -name '*.yaml' ! \ > - -name 'processed-schema*' ! \ > - -name '*.example.dt.yaml' \) \ > - )) > +DT_DOCS = $(shell $(find_cmd) | sed -e 's|^$(srctree)/||') > > DT_SCHEMA_FILES ?= $(DT_DOCS) > -- Regards, Laurent Pinchart