Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3659033pxf; Mon, 15 Mar 2021 15:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkowRjZDHDy0jdBbK91U3htUMQwC2jZgr8GhiWW5f/JOhaEK3xCoktmcjzKmQGxX9AVspH X-Received: by 2002:a50:ec0e:: with SMTP id g14mr32688184edr.264.1615846589290; Mon, 15 Mar 2021 15:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615846589; cv=none; d=google.com; s=arc-20160816; b=oOpXHk2i41ndOWYjD8qtRZ9IoV7behdS5xNFcSsYjUkchuH7XAsshaq53EK0VmZnmf KzFLBIyiGJZaeSiFY2TMXkH2SZYRLgZy48D/2CH8A+bmpYlh8XCFycFkukTh86qYd8ct gwzek19M/6kdl8GRX+IOjn/rsrv0ECz8QZNzXCm5UFp+HwwEgGw6l0JyFnmOCG6Gwix5 y/QtunDOe3BPiv3ua418DGkaTA45bdETD+cE19sv2mXjAT8zXe7AQDyrb6jD/0Epe5XU Q0f7rTXn0kziPykWOVZTDFN0XQ3dbYhYK1gnNH7jaEQgltMRfvJeLtY6NPZ0Bm5s2oqz 9ynA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HitwLeedE/UybWtZalNhzBcEbECdE3C3rWo2fGgBC7s=; b=YqhGWduDZu/OK6i2Jo3xKLxLylT8DcqDe64xln6W1HiL5JxhRdg3yP5G80NTnwydRB 4MDKLahMEqv3bxdBwZNoVp/SPeMoOweX6zeM6SjsdMjYR8BcowF8hoXOcQUnpVltucXK EGvUfOGFbbj9/pHbVtKakdTNtT8LD4x+tUoEnqo6mwGJR15tblzE9qwD4t/m5wWaq44G quY54EM1o+RXb5iBWaOXx2Va3E4gGS0RuOi8ZzU0tBWo2+DFgfqqIk9Z1tUGNC/MqMNo uckyA9c88atRp17rRwYg05fKPDjdM4idg6kTyHLMwVb2QvFut6hi18hjO0NzFIUaf0rn Rqeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ckPK2DNP; 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 q5si11849155eds.165.2021.03.15.15.16.07; Mon, 15 Mar 2021 15:16:29 -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=ckPK2DNP; 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 S231364AbhCOWNV (ORCPT + 99 others); Mon, 15 Mar 2021 18:13:21 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:41990 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbhCOWNG (ORCPT ); Mon, 15 Mar 2021 18:13:06 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E1A82316; Mon, 15 Mar 2021 23:13:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615846385; bh=73c9i3x/pZaVNcLHX/PwQ73wX2ErVRnjivgwz2iKHoQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ckPK2DNP7sWGYN/x56bTYCBuTD8ctf1HNtCkv9MBhmpsk7nmxgeIvWAJQ14j4Xp5A JUFt+lWapV4xAlJl9uK9wRD8/yd1qeKlQtsNg3NGO0McyNmZC60rYFAYxq3XFkWNnQ HcteAA9/OoWaIEl1afjlYJ7l/1A1wXXaKmQNKL/E= Date: Tue, 16 Mar 2021 00:12:29 +0200 From: Laurent Pinchart To: Masahiro Yamada Cc: Viresh Kumar , Frank Rowand , Michal Marek , Vincent Guittot , David Gibson , Michal Simek , Geert Uytterhoeven , Anmar Oueja , Bill Mills , Geert Uytterhoeven , Linux Kbuild mailing list , Linux Kernel Mailing List Subject: Re: [PATCH V11 3/5] kbuild: Allow .dtso format for overlay source files Message-ID: References: <170e086a5fa076869e7b37de8eea850fa7c39118.1615354376.git.viresh.kumar@linaro.org> <20210312044712.srmqfuie7fae55pb@vireshk-i7> <17c65559-865f-f742-660f-0ab30ed45d90@gmail.com> <4d9bee7a-416e-50a1-65a5-0674ae83d42e@gmail.com> <20210312071325.zosmlttse4ym7sit@vireshk-i7> <6f093bb1-1a80-a906-fb4c-3f6fdeed4838@gmail.com> <9068520f-76d6-ec94-716c-02383422ac85@gmail.com> <20210315064051.otcjt3x6vkfdrio6@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yamada-san, On Tue, Mar 16, 2021 at 02:43:45AM +0900, Masahiro Yamada wrote: > On Mon, Mar 15, 2021 at 3:40 PM Viresh Kumar wrote: > > On 14-03-21, 20:16, Frank Rowand wrote: > > > On 3/12/21 11:11 PM, Frank Rowand wrote: > > > > On 3/12/21 1:13 AM, Viresh Kumar wrote: > > > >> On 12-03-21, 01:09, Frank Rowand wrote: > > > >>> I suggested having the .dtso files include the .dts file because that is a relatively > > > >>> small and easy change to test. What would probably make more sense is the rename > > > >>> the existing overlay .dts files to be .dtso files and then for each overlay .dtso > > > >>> file create a new .dts file that #includes the corresponding .dtso file. This is > > > >>> more work and churn, but easier to document that the .dts files are a hack that is > > > >>> needed so that the corresponding .dtb.S files will be generated. > > > >> > > > >> What about creating links instead then ? > > > >> > > > > > > > > I don't really like the idea of using links here. > > > > > > > > Maybe it is best to make the changes needed to allow the unittest > > > > overlays to be .dtso instead of .dts. > > > > > > > > Off the top of my head: > > > > > > > > scripts/Makefile.lib: > > > > The rule for %.dtb.S invokes cmd_dt_S_dtb, which puts the > > > > overlay data in section .dtb.init.rodata, with a label > > > > pointing to the beginning of the overlay __dtb_XXX_begin and > > > > a label pointing to the end of the overlay __dtb_XXX_end, > > > > for the overlay named XXX. I _think_ that you could simply > > > > add a corresponding rule for %.dtbo.S using a new command > > > > cmd_dt_S_dtbo (the same as cmd_dt_S_dtb, except use labels > > > > __dtbo_XXX_begin and __dtbo_XXX_end). > > > > > > If you do the above, please put it in drivers/of/unittest-data/Makefile > > > instead of scripts/Makefile.lib because it is unittest.c specific and > > > not meant to be anywhere else in the kernel. > > > > What about doing this then in unittest's Makefile instead (which I > > already suggested earlier), that will make everything work just fine > > without any other changes ? > > > > +# Required for of unittest files as they can't be renamed to .dtso > > +$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE > > + $(call if_changed_dep,dtc) > > > > If those rules are only needed by drivers/of/unittest-data/Makefile, > they should not be located in scripts/Makefile.lib. > > But how can we fix drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a779*.dts > if these are doing bad things. > They seem to be overlay files even though the file name suffix is .dts That is correct, they are overlays. I have no issue with those files being renamed to .dtso if that can help (but I haven't checked if that would have any adverse effect on the R-Car DU driver). These files are there to ensure backward compatibility with older DT bindings. The change was made 3 years ago and I wouldn't object to dropping this completely, but I understand I may not be the most cautious person when it comes to ensuring DT backward compatibility :-) > $ find drivers -name '*.dts' > drivers/staging/pi433/Documentation/devicetree/pi433-overlay.dts > drivers/staging/mt7621-dts/gbpc2.dts > drivers/staging/mt7621-dts/gbpc1.dts > drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dts > drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dts > drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dts > drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dts > drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dts > drivers/of/unittest-data/overlay_1.dts > drivers/of/unittest-data/testcases.dts > drivers/of/unittest-data/overlay_bad_add_dup_node.dts > drivers/of/unittest-data/overlay_bad_symbol.dts > drivers/of/unittest-data/overlay_0.dts > drivers/of/unittest-data/overlay_11.dts > drivers/of/unittest-data/overlay_gpio_03.dts > drivers/of/unittest-data/overlay_gpio_04a.dts > drivers/of/unittest-data/overlay_gpio_04b.dts > drivers/of/unittest-data/overlay_5.dts > drivers/of/unittest-data/overlay_bad_add_dup_prop.dts > drivers/of/unittest-data/overlay_gpio_01.dts > drivers/of/unittest-data/overlay_10.dts > drivers/of/unittest-data/overlay_7.dts > drivers/of/unittest-data/overlay_bad_phandle.dts > drivers/of/unittest-data/overlay_3.dts > drivers/of/unittest-data/overlay_6.dts > drivers/of/unittest-data/overlay_8.dts > drivers/of/unittest-data/overlay_12.dts > drivers/of/unittest-data/overlay_gpio_02a.dts > drivers/of/unittest-data/overlay_gpio_02b.dts > drivers/of/unittest-data/overlay_4.dts > drivers/of/unittest-data/overlay.dts > drivers/of/unittest-data/overlay_9.dts > drivers/of/unittest-data/overlay_2.dts > drivers/of/unittest-data/overlay_15.dts > drivers/of/unittest-data/overlay_base.dts > drivers/of/unittest-data/overlay_13.dts -- Regards, Laurent Pinchart