linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference
@ 2017-07-25  2:23 Masahiro Yamada
  2017-07-25  2:23 ` [PATCH 1/3] of: remove drivers/of/testcase-data from include search path for CPP Masahiro Yamada
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Masahiro Yamada @ 2017-07-25  2:23 UTC (permalink / raw)
  To: devicetree, Rob Herring
  Cc: linux-arch, Omar Sandoval, Gaurav Minocha, Grant Likely,
	Frank Rowand, Mark Rutland, Olof Johansson, Russell King,
	Masahiro Yamada, Michal Marek, linux-kernel, linux-kbuild


Masahiro Yamada (3):
  of: remove drivers/of/testcase-data from include search path for CPP
  of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP
  of: search scripts/dtc/include-prefixes path for both CPP and DTC

 scripts/Makefile.lib | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] of: remove drivers/of/testcase-data from include search path for CPP
  2017-07-25  2:23 [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
@ 2017-07-25  2:23 ` Masahiro Yamada
  2017-07-25  2:23 ` [PATCH 2/3] of: remove arch/$(SRCARCH)/boot/dts " Masahiro Yamada
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2017-07-25  2:23 UTC (permalink / raw)
  To: devicetree, Rob Herring
  Cc: linux-arch, Omar Sandoval, Gaurav Minocha, Grant Likely,
	Frank Rowand, Mark Rutland, Olof Johansson, Russell King,
	Masahiro Yamada, Michal Marek, linux-kernel, linux-kbuild

This search path was added by commit b5190516b282 ("of: Move testcase
FDT data into drivers/of").  At that time, it was needed for platform
DT files to include testcase data.

It became unnecessary when commit ae9304c9d311 ("Adding selftest
testdata dynamically into live tree") introduced dynamic addition of
testcase data, but it missed to delete this search path.

Moreover, the directory drivers/of/testcase-data does not exist since
commit 19fd74879a32 ("of/unittest: Rename selftest.c to unittest.c").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/Makefile.lib | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 58c05e5d9870..011d464d2132 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -176,7 +176,6 @@ ld_flags       = $(LDFLAGS) $(ldflags-y)
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
 		 -I$(srctree)/arch/$(SRCARCH)/boot/dts                   \
 		 -I$(srctree)/scripts/dtc/include-prefixes               \
-		 -I$(srctree)/drivers/of/testcase-data                   \
 		 -undef -D__DTS__
 
 # Finds the multi-part object the current object will be linked into
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP
  2017-07-25  2:23 [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
  2017-07-25  2:23 ` [PATCH 1/3] of: remove drivers/of/testcase-data from include search path for CPP Masahiro Yamada
@ 2017-07-25  2:23 ` Masahiro Yamada
  2017-07-25  2:23 ` [PATCH 3/3] of: search scripts/dtc/include-prefixes path for both CPP and DTC Masahiro Yamada
  2017-08-20 16:06 ` [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
  3 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2017-07-25  2:23 UTC (permalink / raw)
  To: devicetree, Rob Herring
  Cc: linux-arch, Omar Sandoval, Gaurav Minocha, Grant Likely,
	Frank Rowand, Mark Rutland, Olof Johansson, Russell King,
	Masahiro Yamada, Michal Marek, linux-kernel, linux-kbuild

Having arch/$(SRCARCH)/boot/dts as an include search path is not
very useful these days because some architectures such as ARM64,
MIPS have no DT in this directory.  Instead, they have DT in vendor
sub-directories.

With some DT files in ARM and PowerPC fixed, we can now drop this
include search path.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/Makefile.lib | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 011d464d2132..9c8f38ac2620 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -174,7 +174,6 @@ cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \
 ld_flags       = $(LDFLAGS) $(ldflags-y)
 
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
-		 -I$(srctree)/arch/$(SRCARCH)/boot/dts                   \
 		 -I$(srctree)/scripts/dtc/include-prefixes               \
 		 -undef -D__DTS__
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] of: search scripts/dtc/include-prefixes path for both CPP and DTC
  2017-07-25  2:23 [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
  2017-07-25  2:23 ` [PATCH 1/3] of: remove drivers/of/testcase-data from include search path for CPP Masahiro Yamada
  2017-07-25  2:23 ` [PATCH 2/3] of: remove arch/$(SRCARCH)/boot/dts " Masahiro Yamada
@ 2017-07-25  2:23 ` Masahiro Yamada
  2017-08-20 16:06 ` [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
  3 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2017-07-25  2:23 UTC (permalink / raw)
  To: devicetree, Rob Herring
  Cc: linux-arch, Omar Sandoval, Gaurav Minocha, Grant Likely,
	Frank Rowand, Mark Rutland, Olof Johansson, Russell King,
	Masahiro Yamada, Michal Marek, linux-kernel, linux-kbuild

Since commit d5d332d3f7e8 ("devicetree: Move include prefixes from
arch to separate directory"), cross-arch DT reference works well,
but only for CPP style #include directives.

It makes as much sense to share DT between different architectures
by using DTC's /include/ directives.

So, scripts/dtc/include-prefixes should be passed to both CPP and DTC.
I refactored Makefile.lib a bit to not repeat the same path.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/Makefile.lib | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9c8f38ac2620..dcc0d5fdf5a2 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -173,8 +173,10 @@ cpp_flags      = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE)     \
 
 ld_flags       = $(LDFLAGS) $(ldflags-y)
 
+DTC_INCLUDE    := $(srctree)/scripts/dtc/include-prefixes
+
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
-		 -I$(srctree)/scripts/dtc/include-prefixes               \
+		 $(addprefix -I,$(DTC_INCLUDE))                          \
 		 -undef -D__DTS__
 
 # Finds the multi-part object the current object will be linked into
@@ -315,7 +317,7 @@ quiet_cmd_dtc = DTC     $@
 cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
 	$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
 	$(DTC) -O dtb -o $@ -b 0 \
-		-i $(dir $<) $(DTC_FLAGS) \
+		$(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
 		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
 	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference
  2017-07-25  2:23 [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
                   ` (2 preceding siblings ...)
  2017-07-25  2:23 ` [PATCH 3/3] of: search scripts/dtc/include-prefixes path for both CPP and DTC Masahiro Yamada
@ 2017-08-20 16:06 ` Masahiro Yamada
  2017-08-21 17:23   ` Rob Herring
  3 siblings, 1 reply; 6+ messages in thread
From: Masahiro Yamada @ 2017-08-20 16:06 UTC (permalink / raw)
  To: devicetree, Rob Herring
  Cc: linux-arch, Omar Sandoval, Gaurav Minocha, Grant Likely,
	Frank Rowand, Mark Rutland, Olof Johansson, Russell King,
	Masahiro Yamada, Michal Marek, Linux Kernel Mailing List,
	Linux Kbuild mailing list

Hi Rob, DT developers,

Any comments for this series?

Thanks.


2017-07-25 11:23 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
>
> Masahiro Yamada (3):
>   of: remove drivers/of/testcase-data from include search path for CPP
>   of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP
>   of: search scripts/dtc/include-prefixes path for both CPP and DTC
>
>  scripts/Makefile.lib | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference
  2017-08-20 16:06 ` [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
@ 2017-08-21 17:23   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2017-08-21 17:23 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: devicetree, linux-arch, Omar Sandoval, Gaurav Minocha,
	Grant Likely, Frank Rowand, Mark Rutland, Olof Johansson,
	Russell King, Michal Marek, Linux Kernel Mailing List,
	Linux Kbuild mailing list

On Sun, Aug 20, 2017 at 11:06 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Hi Rob, DT developers,
>
> Any comments for this series?

I've applied the series now.

Rob

>
> Thanks.
>
>
> 2017-07-25 11:23 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
>>
>> Masahiro Yamada (3):
>>   of: remove drivers/of/testcase-data from include search path for CPP
>>   of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP
>>   of: search scripts/dtc/include-prefixes path for both CPP and DTC
>>
>>  scripts/Makefile.lib | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> --
>> 2.7.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe devicetree" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> Best Regards
> Masahiro Yamada

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-21 17:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25  2:23 [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
2017-07-25  2:23 ` [PATCH 1/3] of: remove drivers/of/testcase-data from include search path for CPP Masahiro Yamada
2017-07-25  2:23 ` [PATCH 2/3] of: remove arch/$(SRCARCH)/boot/dts " Masahiro Yamada
2017-07-25  2:23 ` [PATCH 3/3] of: search scripts/dtc/include-prefixes path for both CPP and DTC Masahiro Yamada
2017-08-20 16:06 ` [PATCH 0/3] devicetree: cleanup and improve DT cross-arch reference Masahiro Yamada
2017-08-21 17:23   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).