From patchwork Mon Dec 3 07:50:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10708703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2263109C for ; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C787D2AD71 for ; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBDF92AD6D; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B6FC2AD3A for ; Mon, 3 Dec 2018 07:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725835AbeLCHvq (ORCPT ); Mon, 3 Dec 2018 02:51:46 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:60224 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbeLCHvp (ORCPT ); Mon, 3 Dec 2018 02:51:45 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id wB37p4O7009296; Mon, 3 Dec 2018 16:51:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com wB37p4O7009296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1543823468; bh=/bkD1AaEj77ORfzeA5lP0B9fBeG7hxBuHP/+JIDuorc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gYi/FM64UmEWhru1vPEsWksgX7+4FHQ/yeM0vaw/7w4qb0I0gZvTdsvNSo3eqWcua xqA9aSeYGR3iM4RMZysWfwtFtqDZKyzMVPB8qw4vgRa7C/dqHu5bTcrgxYEsXFrJVd JdcNRQxDjrbdxST93V4SQpssHnUFh2VJclPjJ1JHnFDrMFZ/1bnyUhC26ANl1dUEg2 MdMw3AO6RAF/55ZBRx6ALj1KqBFEYlsd6vlC7GhW8PigLdHkF7xGaKJOsjgaWxlENs h75chG7rpwz/pMkMPDNIqWehKGUH7NmLRY2QoM1YwdFRLdDxuSX92ZAk4J0QZCUvLP sD+umS9WKn3HA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek Cc: linux-kbuild@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 6/7] microblaze: fix race condition in building boot images Date: Mon, 3 Dec 2018 16:50:56 +0900 Message-Id: <1543823457-32478-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> References: <1543823457-32478-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I fixed a race condition in the parallel building of ARM in commit 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not generate invalid images"). I see the same problem for MicroBlaze too. "make -j ARCH=microblaze all linux.bin.ub" results in a broken build since two threads descend into arch/microblaze/boot simultaneously. Add proper dependencies to avoid it. Signed-off-by: Masahiro Yamada --- arch/microblaze/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 7a5df02..544796d 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -79,13 +79,15 @@ all: linux.bin archclean: $(Q)$(MAKE) $(clean)=$(boot) +linux.bin.ub linux.bin.gz: linux.bin + PHONY += linux.bin linux.bin.gz linux.bin.ub linux.bin linux.bin.gz linux.bin.ub: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')' PHONY += simpleImage.$(DTB) -simpleImage.$(DTB): vmlinux +simpleImage.$(DTB): linux.bin.ub $(Q)$(MAKE) $(build)=$(boot) simple_images @echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')'