Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp771379ybc; Sat, 16 Nov 2019 08:24:20 -0800 (PST) X-Google-Smtp-Source: APXvYqy+5iodps7dI3EB5pThld06TS0TcFrOQOBgu0EAI4V7ugzxYFrIj1FAobJCG0W4KqseVnFQ X-Received: by 2002:a17:906:52c3:: with SMTP id w3mr11188352ejn.122.1573921460666; Sat, 16 Nov 2019 08:24:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921460; cv=none; d=google.com; s=arc-20160816; b=I/xHFnrjqFZb+NDPtDWNqhylw44l28WEMpPF3al4Miq9OMIJMhtPJjvKTTr1Gs1zBw dX2iW5uqSDMuAP2HD+cFjIviAwQd90HVA69343xGV0kCO4WRv2d7GKVpAgkx2UzJtK3x D2vR/MbV9Utg0D/a0TgSltcYijI18ymj2+DOvAdbY/+4dqoQOpB8GI5OTndjAD12Cpc9 OtcBwIYcL5Jmt9mZmqDKwLvNSQli0rDrOIXj4lbMBbY9N9Io4GKPPm298a5cm5jG/0EK Z2TvjpTcxiluJ0Ooh2jT2dMJ2ryux1b2NQJoyjeD5FYPM2BwzWe0oLM1dEF+DJ4+WNlH Oh3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dyWt7HHJfDTTjHFtIoDV0b/6IIAaxOYTL725DeZkjY8=; b=CAZS8ufTmiRBAp3hXaWLRIA1JH1yKg1qqFOBiB4ZPN0dHlmE/v6DCN1jdw0pjTm2AL Q8AsKWeHz4hJmbcOWYtAhp05PSnjWffyM/ut0AjQ7yPXj68UJc0ex29bMSUWGlycGINL mBKnt2vzqJk0OcJxFRDHg1omdzHvl5g1dAe35ubVdF0xi+2IME0gcI1bqAUutNgC62Ao 39OnDjOyzFUcGhe5qUSO351ZrYPUEhypcJdgUXrYsiG2JXzLISkDHAt6ybZG4jPjTDeJ nyCa5Q6arC0d4UfqYkZbxyyh7D2Xgx5UohWk51gzHuNFx3AA0TRGgVyCorQSgWHPTzTz XhUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LjNB+hvQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 35si4240617edj.185.2019.11.16.08.23.56; Sat, 16 Nov 2019 08:24:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=LjNB+hvQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729391AbfKPPq1 (ORCPT + 99 others); Sat, 16 Nov 2019 10:46:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:52232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729280AbfKPPqH (ORCPT ); Sat, 16 Nov 2019 10:46:07 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CDB0D20869; Sat, 16 Nov 2019 15:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919167; bh=kJetW/Z6Ckzen/8njzEpaOOotsP1WWeBNpmitgi3smI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LjNB+hvQ5fDLzIaRzEyarAQI0ab6lS/UbEQn6CBChKGooS2KsJz503vSx2DiAvCxP cdWVEz6vosLOxz41IjLM+uqzdyih5lySvPltU2UVFjAJEe6TfylQmGsY+w7I/VgBUU sEtZFbSkbuwqEIc4T68ldvxn51nXEx6sP9P6DZvY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Victor Kamensky , Kevin Brodsky , Catalin Marinas , Sasha Levin Subject: [PATCH AUTOSEL 4.19 176/237] arm64: makefile fix build of .i file in external module case Date: Sat, 16 Nov 2019 10:40:11 -0500 Message-Id: <20191116154113.7417-176-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Victor Kamensky [ Upstream commit 98356eb0ae499c63e78073ccedd9a5fc5c563288 ] After 'a66649dab350 arm64: fix vdso-offsets.h dependency' if one will try to build .i file in case of external kernel module, build fails complaining that prepare0 target is missing. This issue came up with SystemTap when it tries to build variety of .i files for its own generated kernel modules trying to figure given kernel features/capabilities. The issue is that prepare0 is defined in top level Makefile only if KBUILD_EXTMOD is not defined. .i file rule depends on prepare and in case KBUILD_EXTMOD defined top level Makefile contains empty rule for prepare. But after mentioned commit arch/arm64/Makefile would introduce dependency on prepare0 through its own prepare target. Fix it to put proper ifdef KBUILD_EXTMOD around code introduced by mentioned commit. It matches what top level Makefile does. Acked-by: Kevin Brodsky Signed-off-by: Victor Kamensky Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- arch/arm64/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 5d8787f0ca5f9..9a5e281412116 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -148,6 +148,7 @@ archclean: $(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)/dts +ifeq ($(KBUILD_EXTMOD),) # We need to generate vdso-offsets.h before compiling certain files in kernel/. # In order to do that, we should use the archprepare target, but we can't since # asm-offsets.h is included in some files used to generate vdso-offsets.h, and @@ -157,6 +158,7 @@ archclean: prepare: vdso_prepare vdso_prepare: prepare0 $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso include/generated/vdso-offsets.h +endif define archhelp echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)' -- 2.20.1