diff mbox series

[4/7] MIPS: boot: correct prerequisite image of vmlinux.*.its

Message ID 1523890067-13641-5-git-send-email-yamada.masahiro@socionext.com
State New
Headers show
Series MIPS: boot: fix various problems in arch/mips/boot/Makefile | expand

Commit Message

Masahiro Yamada April 16, 2018, 2:47 p.m. UTC
vmlinux.*.its does not directly depend on $(VMLINUX) but
vmlinux.bin.*

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

---

 arch/mips/boot/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.7.4

Comments

Paul Burton June 20, 2018, 12:22 a.m. UTC | #1
Hi Masahiro,

Thanks for these - I've applied patches 1-3, 5 & 6 to mips-next for
4.19.

On Mon, Apr 16, 2018 at 07:47:44AM -0700, Masahiro Yamada wrote:
> vmlinux.*.its does not directly depend on $(VMLINUX) but

> vmlinux.bin.*


This isn't really true - to generate the .its we actually do depend on
the ELF, which we read the entry address from (entry-y in
arch/mips/Makefile, provided to arch/mips/boot/Makefile as
VMLINUX_ENTRY_ADDRESS). In practice $(VMLINUX) is built before this
makefile is ever invoked anyway, but the dependency is there.

We don't need the vmlinux.bin.* file until we generate the .itb, so it
should be fine for the .its & .bin steps to be executed in parallel
which this patch would prevent.

Thanks,
    Paul
Masahiro Yamada June 20, 2018, 11:33 p.m. UTC | #2
Hi Paul,

2018-06-20 9:22 GMT+09:00 Paul Burton <paul.burton@mips.com>:
> Hi Masahiro,

>

> Thanks for these - I've applied patches 1-3, 5 & 6 to mips-next for

> 4.19.

>

> On Mon, Apr 16, 2018 at 07:47:44AM -0700, Masahiro Yamada wrote:

>> vmlinux.*.its does not directly depend on $(VMLINUX) but

>> vmlinux.bin.*

>

> This isn't really true - to generate the .its we actually do depend on

> the ELF, which we read the entry address from (entry-y in

> arch/mips/Makefile, provided to arch/mips/boot/Makefile as

> VMLINUX_ENTRY_ADDRESS). In practice $(VMLINUX) is built before this

> makefile is ever invoked anyway, but the dependency is there.

>

> We don't need the vmlinux.bin.* file until we generate the .itb, so it

> should be fine for the .its & .bin steps to be executed in parallel

> which this patch would prevent.



You are right.

Thanks for catching this.




-- 
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
index 6c7054e..30512ab 100644
--- a/arch/mips/boot/Makefile
+++ b/arch/mips/boot/Makefile
@@ -136,19 +136,19 @@  quiet_cmd_cpp_its_S = ITS     $@
 			-DADDR_BITS=$(ADDR_BITS) \
 			-DADDR_CELLS=$(itb_addr_cells)
 
-$(obj)/vmlinux.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin FORCE
 	$(call if_changed,cpp_its_S,none,vmlinux.bin)
 
-$(obj)/vmlinux.gz.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.gz.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.gz FORCE
 	$(call if_changed,cpp_its_S,gzip,vmlinux.bin.gz)
 
-$(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(VMLINUX)  FORCE
+$(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.bz2 FORCE
 	$(call if_changed,cpp_its_S,bzip2,vmlinux.bin.bz2)
 
-$(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.lzma FORCE
 	$(call if_changed,cpp_its_S,lzma,vmlinux.bin.lzma)
 
-$(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE
+$(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.lzo FORCE
 	$(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo)
 
 quiet_cmd_itb-image = ITB     $@