Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp88698imn; Fri, 29 Jul 2022 00:02:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v2pxuZw/b1eNs3A3DJ0lC7X6ZghTLdZpCUwmPtwx958N8ReuhsPYFKKPO73/COKbtUzyjo X-Received: by 2002:a17:907:7355:b0:72b:977f:65 with SMTP id dq21-20020a170907735500b0072b977f0065mr1863203ejc.768.1659078177851; Fri, 29 Jul 2022 00:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659078177; cv=none; d=google.com; s=arc-20160816; b=n/cXhNE6Y8QfjMTuxIrMSlC8L14w3Va8SYgRr0mYYIiD3Y5b8462YXajZSUS1ZSqhi vwTP4Sp+ijyeb11uu+cybT6F4O0vq3bWa07mrw9cLCV2L+xnp+2d9XkujCc/imhiwNKC NhKLt5HkahGcyDxypEjrvevCRyxo97TO4BhxtyAjMerg7/EH/SS0sSFXg23TeOz6l07Y 65b8RSUtMah6JqV7E8K23m5ZR8IIg2/HJT89zYKdf2CqATquJVeu9Afg5oQijgEQ5GFS WiyLHpWXy/nqgwuM9qxpSwbInTlRFxrzmplLY8dsDh0sEpz9lf1K4bL9IZVP+EelnX45 bkDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=B9NJPMCqsZZzif8NOi6LqBERuaw3Qi0GLNSjXaKH72E=; b=jI6oWD2PYmq5fr3tstF+k+aO/a8Dzf3GvfF6ecEnLYz8DhfnPMzzytQdgOF/oxvSzv Gne3mCqJ5KwOXQPMGq3ztdiSeLuXeJ19o8VCCOh1xWG42djKEzUE07XT0tIVm+FEIdXm QTjzKzZfGzTyt6COReQ22Vd434pDO5lSOLbBWb2nyejXU1WPRGTontcFOc8Cezc4HG25 pUTM5vFaibuhfb65pCHna5ekuk1Yaq8iryIADEQUuqF6ujSZRA2Dt/TbwNVf/oFMmSqg Ofl0bQGi1fyoXYcnLRAb+nnHTdTKAB7opJzc1NWID0AWz3nNjN03hoLrpuVva01LEFxb Ic0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ouhZLlcv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a170906815100b006ff6c9f7081si2432299ejw.738.2022.07.29.00.02.33; Fri, 29 Jul 2022 00:02:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ouhZLlcv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234573AbiG2GxP (ORCPT + 99 others); Fri, 29 Jul 2022 02:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234603AbiG2Gw6 (ORCPT ); Fri, 29 Jul 2022 02:52:58 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB4F580508 for ; Thu, 28 Jul 2022 23:52:56 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id a9so2717981qtw.10 for ; Thu, 28 Jul 2022 23:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B9NJPMCqsZZzif8NOi6LqBERuaw3Qi0GLNSjXaKH72E=; b=ouhZLlcvdbHtvTf8YiOPEo07AwaL3uSKyKjAL/0/JobC+hqJYFj2hPitySQnXMVmXr jX6Vj8FadMnkc9GRr+1qhzOjhORahTchrfixJIj93dV669SrEQNR/NYkeBnpX9XCDKrD EjuCOGzLj3ynVi0ctabQWqVkPDbPd2Ig6ob8oT4bMqPeiiV0pQaRf8KZSEl9n6KNLinf 3GuoC/3SaicfSNEPRZpHzpFr/uSBf4MFNIdKJWjH3Wa3b6Ln/wBd32CagEzMmi8daPFs xu4o2NbjuLbjWvnAuwsi4guqdXJXAAkf1Ot94cP4ACDhDg5aBIDVeqPoEMatRMlmFHI1 qiXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B9NJPMCqsZZzif8NOi6LqBERuaw3Qi0GLNSjXaKH72E=; b=IRVpW5n190SjFe4l84RY63ETPs0rItjmtPSgutNXGGgrUNFICKE9AqSlPAK2r5G1fY hYs4+pSG8Jwo0wRvwFmvE5i0uqwvfE+yAxqwxB0MauM/n0EoMP4clJxyv1qEIcqz8Don jAQIrrPGR+c4daejHqleYrxnrwgvw9R+WKIthyi1sbXkyGt/9152upLjn8BmeiGLAxOw r8JUy74n+uJ8Z/pVXC6rTXjnr/MP+9ZHg+UF24Hl5Baf6kZhms1MhGONRHB4WQK3cG7N 4CHylhqeJoBIwRDK2kEHoi6STSMxvwvyEOux1/NwU4gOe8FR52LDEJtwUeCMPRCWhiev HMkw== X-Gm-Message-State: AJIora/CE3mpFhTFzM3b1lmK/cuws/7E8W/+LGmJw9lji37yVbY5t3S3 ns4UgdmgWjaXoS1OW6jwiWSop1HxOK7UyxYl+dYXVw== X-Received: by 2002:ac8:5942:0:b0:31f:39f6:aba7 with SMTP id 2-20020ac85942000000b0031f39f6aba7mr2122937qtz.295.1659077575797; Thu, 28 Jul 2022 23:52:55 -0700 (PDT) MIME-Version: 1.0 References: <20220727100615.638072-1-dmitry.baryshkov@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Fri, 29 Jul 2022 09:52:44 +0300 Message-ID: Subject: Re: [PATCH] kbuild: take into account DT_SCHEMA_FILES changes while checking dtbs To: Masahiro Yamada Cc: Rob Herring , Michal Marek , Nick Desaulniers , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , Krzysztof Kozlowski , Bjorn Andersson , linux-arm-msm Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Jul 2022 at 08:55, Masahiro Yamada wrote: > > On Thu, Jul 28, 2022 at 2:36 AM Rob Herring wrote: > > > > On Wed, Jul 27, 2022 at 4:06 AM Dmitry Baryshkov > > wrote: > > > > > > It is useful to be able to recheck dtbs files against a limited set of > > > DT schema files. This can be accomplished by using differnt > > > DT_SCHEMA_FILES argument values while rerunning make dtbs_check. However > > > for some reason if_changed_rule doesn't pick up the rule_dtc changes > > > (and doesn't retrigger the build). > > > > > > Fix this by changing if_changed_rule to if_changed_dep and squashing DTC > > > and dt-validate into a single new command. Then if_changed_dep triggers > > > on DT_SCHEMA_FILES changes and reruns the build/check. > > > > > > Signed-off-by: Dmitry Baryshkov > > > --- > > > scripts/Makefile.lib | 14 ++++++-------- > > > 1 file changed, 6 insertions(+), 8 deletions(-) > > > > > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > > > index c88b98b5dc44..3df470289382 100644 > > > --- a/scripts/Makefile.lib > > > +++ b/scripts/Makefile.lib > > > @@ -383,17 +383,15 @@ DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),-l $(DT_SCHEMA_FILES),-m) > > > DT_BINDING_DIR := Documentation/devicetree/bindings > > > DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.json > > > > > > -quiet_cmd_dtb_check = CHECK $@ > > > - cmd_dtb_check = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ || true > > > +quiet_cmd_dtb = DTC/CHECK $@ > > > > This is supposed to be 7 chars or less. DTCCHK or DTC_CHK perhaps. Or > > always do just 'DTC'. I can fixup when applying. > > > > I'll give it a few days for other comments. > > > > When you change DT_SCHEMA_FILES, re-running dt-validate should be enough. > You do not need to re-run dtc. > > I guess the strangeness comes from the fact that you are trying to do the > two different things in a single rule. The issue is that with the current rules the dt-validate isn't re-executed on DT_SCHEMA_FILES changes. Thus comes my proposal. -- With best wishes Dmitry