From patchwork Thu Aug 30 18:08:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145557 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp204734ljw; Thu, 30 Aug 2018 11:08:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZjlMaD/yifOguldBecLLNOvm+I0M8vOWHawf2DqxeANrxnpvGyBS529GYnS26Ed0n22Kuo X-Received: by 2002:a63:af17:: with SMTP id w23-v6mr9406428pge.47.1535652526963; Thu, 30 Aug 2018 11:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535652526; cv=none; d=google.com; s=arc-20160816; b=iUfZaFX5PQiFMBaQq4c8eOD9cBo6336AvPon+UxGMqt88AmguNDBCs969pIyc6CFS4 NhF8mfxrh3+LQP1aS5wppCXMq8LudB30iG1/w2ajz66LgWp4/EaQZLhr1Kb1hPbcDp6d KcNeFCJZ9bg3ZCOJb10PUUD6C3D8WMCg9UnFVhgjTpch5jNHbrqt34KpEqaLs+63BvBL kY8e7WyCUp/Jbz2sqKpkXuKCbttaoa2Vwxpkw5R9nCYPEakTEhnJbo/wDtrH6i82A/gw yB2DQbSnAE9CiE6oOFNFqC34/v7WVhODdX9FMKIBGeyuWJ+mP9/61c3vXuCJEW88GNHt U4kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=0oGN5z5qlg5jVBl97nAjuCBDheCuQWj50IgZDOsiN2I=; b=UoPFN3kZOG5H2++RmEWGVBCTolvru4kICkxzgUt/rqEeyDEgj3yxXs3SD8yFTyzqWW yCrE9M8BPxnQzX68RCBTxYylFhWoEyatw+N1omomeU/hQtnd7KQW55iI9O+zcD87yxte nnCYKzlmn+JwCa5bNOIYNslTy/wjiyO96/rHwe/E4iA7ojr62YxvspM1DzyQ+JkhnoJC eT0NE0Phxb26NJ/F5HjjYXV/7Gm64ncjoAneBLVz9DGWkBYPknnP7jXWJuNPsW6jqvGN WJ7VLS3AwtDn5am0TjK+Wd4mp8r+Pamz9V5zuWJR03A4mRBFw9hU2a7MGq9MRc5i3+YM ja7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Dl0XLBh4; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33-v6si7201561pld.269.2018.08.30.11.08.46; Thu, 30 Aug 2018 11:08:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Dl0XLBh4; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727665AbeH3WMH (ORCPT + 13 others); Thu, 30 Aug 2018 18:12:07 -0400 Received: from mail-bn3nam01on0121.outbound.protection.outlook.com ([104.47.33.121]:36753 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727340AbeH3WMH (ORCPT ); Thu, 30 Aug 2018 18:12:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0oGN5z5qlg5jVBl97nAjuCBDheCuQWj50IgZDOsiN2I=; b=Dl0XLBh4eaCQc3u1rvbTm1rpOCGbtAUtZ91WenXa+PRe6P/ikspSNa1Chj8GGAUfvPry0IO017h0AVU4AgseQwc9a60K55viEmdx8MrxFII3eyNVTIDtSV1DHXhlR4thk5JqaRu47Jq6Gnqb0MhU+Xr6dvmDlwQcJ5L7bgE+xlg= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0118.namprd21.prod.outlook.com (10.173.189.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Thu, 30 Aug 2018 18:08:43 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1122.009; Thu, 30 Aug 2018 18:08:43 +0000 From: Sasha Levin To: "stable@vger.kernel.org" CC: Masahiro Yamada , Sasha Levin Subject: [PATCH AUTOSEL 4.18 097/113] um: fix parallel building with O= option Thread-Topic: [PATCH AUTOSEL 4.18 097/113] um: fix parallel building with O= option Thread-Index: AQHUQIxqVBzuopzRikiOEfn+HnbosA== Date: Thu, 30 Aug 2018 18:08:13 +0000 Message-ID: <20180830180714.36167-31-alexander.levin@microsoft.com> References: <20180830180714.36167-1-alexander.levin@microsoft.com> In-Reply-To: <20180830180714.36167-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0118; 6:ZuRFkwBgW6HjO7ESOIzIkZonFBlO+ewGOSz0q3gudDq4e9p2PvB80Ub+MCFBDAX+d6YQ7MsaBGZItXRQZ0uucBPtpRL/IiqsD5pCHkaPkmXD4GhYZ04edE9aoueUYqnScS+g93E+c0fJ9WNLIsoCQDTg0NBXFbetv4nBdzXeFCSLwEfrtCaYyRV8HmneVinahze63hbXUZumCURNE5/vcUuMI2P1h+DKrFJ7H4cU4c9803wtvhsKgBVhcz+hzQyDW+N9+YWQz61yLIMU0NWDyl59+Z0OzE8oMj7/n2ngqIB6jWDT1cuCfV7NSwfvZI9K+KAok6ETsMlLwaFOdDKwxoYEWZQcgQ793af9C9NJc7nA7fpASplm3f79jD4DenyH3kYc4w9zwB+Je7cU0/jP3ErP964YD8m3WQZMmrklSVCXuBHUTgMDNr558fndxdbIYJlwGRoCOq7t3qCD8v0LVw==; 5:opcPGpwGvwScdGsMb6kJu0Iy6uZ73Hk5f6Qer2ZF8vRNmRmSeE5RjNQAIZDXsR63Po6RJMa9schB6n9jl+FMCXmddnDM9KVOOWDKOmMKNpDuD2T5Zy7PGNLKoZ/wWgcUU3ypV1rTe6SrThvRMbKbFppSvMfjYbacV3rJVldTPqU=; 7:8S5HlYTKePMZGr4ikbs2ZMWmu/t9hHZLG/MdK033t2m2wpvD3ErEwCaVb7Vk8EdnNdckJ7009DWaSwUgDvd6zzww3Ao6rmGah578xsBDxvxl634IWgBO0xZvTEvdIvFz4EtEBs5OxF8k55icWATLC78D8jEdFLr6xx2H9vSfb9isc5+UMoCOessA4QydRYQsksBUBG+dSY9pGCemLPwDgV0c2VSxUy3WuAEkQAAVzIc0dXp15MNkSLN1thegr26N x-ms-office365-filtering-correlation-id: 65989469-0768-4dd7-55e6-08d60ea39f2a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0118; x-ms-traffictypediagnostic: CY4PR21MB0118: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(20558992708506)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231340)(944501410)(52105095)(2018427008)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0118; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0118; x-forefront-prvs: 07807C55DC x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(346002)(366004)(396003)(376002)(136003)(199004)(189003)(5660300001)(6436002)(10090500001)(107886003)(99286004)(68736007)(105586002)(7736002)(106356001)(305945005)(76176011)(5640700003)(86362001)(25786009)(97736004)(22452003)(217873002)(2906002)(6506007)(5250100002)(102836004)(26005)(2501003)(186003)(4326008)(6486002)(6666003)(256004)(6916009)(316002)(478600001)(6116002)(53936002)(6512007)(86612001)(2900100001)(446003)(486006)(3846002)(2616005)(1076002)(8936002)(11346002)(14454004)(36756003)(81156014)(72206003)(54906003)(1730700003)(2351001)(8676002)(476003)(66066001)(10290500003)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0118; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: tMyATNJTJMyiwjyc+e/lE4KmYLFq7S0Oke7EW/ul+t5ycYRY+Ndqa2KgAayDVWwRrFH+qhnX7fJfnkPwHeailwJbutCEw580h8QHWQ+Ec3lHsHO2KWt88/EvCizq0LRksp9eeHv6qa/IFlsfNj1+orRoO/+hexOVngfSkdIVi1+1ovjKfuG+i+gMpS5XKdGTUNrHcHVNe0/yolDQkw/nmLRGSjp+MJLd6EMsFG5KgDCzHbHqSnHPVDme6ugffpho2LfQ1G9cNC9Kiq/X3xLH6LSZNGQHgyPD5npGpimcYtY0xzgH8qITMpepjSKXmJzMgh97Yz9eBSMYqXThLIjox0Hh7K+8LtzmRgImbgtGNOc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65989469-0768-4dd7-55e6-08d60ea39f2a X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2018 18:08:13.1516 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0118 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masahiro Yamada [ Upstream commit 13d3d01e26b942ada7cfced68ccb6db49597874a ] Randy Dunlap reports UML occasionally fails to build with -j and O= options. make[1]: Entering directory '/home/rdunlap/mmotm-2018-0802-1529/UM64' UPD include/generated/uapi/linux/version.h WRAP arch/x86/include/generated/asm/dma-contiguous.h WRAP arch/x86/include/generated/asm/export.h WRAP arch/x86/include/generated/asm/early_ioremap.h WRAP arch/x86/include/generated/asm/mcs_spinlock.h WRAP arch/x86/include/generated/asm/mm-arch-hooks.h WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h WRAP arch/x86/include/generated/uapi/asm/poll.h GEN ./Makefile make[2]: *** No rule to make target 'archheaders'. Stop. arch/um/Makefile:119: recipe for target 'archheaders' failed make[1]: *** [archheaders] Error 2 make[1]: *** Waiting for unfinished jobs.... UPD include/config/kernel.release make[1]: *** wait: No child processes. Stop. Makefile:146: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 The cause of the problem is the use of '$(MAKE) KBUILD_SRC=', which recurses to the top Makefile via the $(objtree)/Makefile generated by scripts/mkmakefile. When you run "make -j O= ARCH=um", Make can execute 'archheaders' and 'outputmakefile' targets simultaneously because there is no dependency between them. If it happens, $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders ... tries to run $(objtree)/Makefile that is being updated. The correct way for the recursion is $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) archheaders ..., which does not rely on the generated Makefile. Reported-by: Randy Dunlap Signed-off-by: Masahiro Yamada Tested-by: Randy Dunlap Acked-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/um/Makefile b/arch/um/Makefile index e54dda8a0363..de340e41f3b2 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -122,8 +122,7 @@ archheaders: $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ kbuild-file=$(HOST_DIR)/include/uapi/asm/Kbuild \ obj=$(HOST_DIR)/include/generated/uapi/asm - $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders - + $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) archheaders archprepare: include/generated/user_constants.h