Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5996006ybc; Wed, 27 Nov 2019 13:06:32 -0800 (PST) X-Google-Smtp-Source: APXvYqz/SSHVX+b+e44MoJuHZt1fIqZjWQ1ItMyb+DYN0Wlf+ML0BNUKNmtdavzAakJHKI/+ftLO X-Received: by 2002:a17:906:4098:: with SMTP id u24mr50520274ejj.220.1574888792623; Wed, 27 Nov 2019 13:06:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888792; cv=none; d=google.com; s=arc-20160816; b=Rr81ObSJqSvYv7Yf3h9pTbzf9emYI7nsmfanFz1sdBCl+rJlk4IuoK5yKS+ldUEbHU Cqd/zw7lc+6LNwVF+z7XMiGYGJQOqxeZr/m3qrdDr+Tfdid4sj+uoBIrcH6XFZTGOpd6 ZDQk78eiuKiusCXNYbnc3roZgCfCjy26DPVRr/aiPLRuVA7bA67BqMHUzBTTnpJea7+3 ZXMAGQ6QFHnnzCAdt1BtKOv2/yPvb56OZuTy9xP01Z0+QejyRbHFEA57WdnIsS48WONu de9ZIx/HrdymoHFyiCCLVub51SDRIH+eIiaA3s5uK6h6l9Nut0aiUo4o52BEl4N3KlQm hWUw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dyWt7HHJfDTTjHFtIoDV0b/6IIAaxOYTL725DeZkjY8=; b=Kk4//bq2iC6FMZ4TYcqra3hLsynA1rTEpSBPUP5xOTpZ5JAwFZ1XANIpvjfvzGGJeT pqHFilARWSmV06DGFk1q1dXMF32nfGEBo/HfMsfYcGJy6J7knh7B58iCmA2G47VI956p P4fNmvD3EiB6wXxla7JiQh4Fp9gAuWm7M+qH3k5RuPmleYq5sSk4aMxPT+FwhUno4fRq QK6DG4pzJsyXvS7bOz6rtqUHNlpTCKKWspDyjSzBSvu2Xp8u7c7BAjZK5SDd0vlwBUUd oMhDjnKSX255nFwKmqzeTRHszFA43mQsMVz+HQJgjdTg2D8yoZs9Qf2a6BacoxeVYLn3 /jfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QoGFDiNJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s24si11046712edx.223.2019.11.27.13.06.09; Wed, 27 Nov 2019 13:06:32 -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=QoGFDiNJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732242AbfK0VFF (ORCPT + 99 others); Wed, 27 Nov 2019 16:05:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:58666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731932AbfK0VFB (ORCPT ); Wed, 27 Nov 2019 16:05:01 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D49D42178F; Wed, 27 Nov 2019 21:05:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888701; bh=kJetW/Z6Ckzen/8njzEpaOOotsP1WWeBNpmitgi3smI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QoGFDiNJ18iWud2vLUZqSbIkMjyNDTAy2MoBUOHpZdZNyBFEFiMc+VXsSQFXU5qQJ 7TwQXJ3GPPE37u0ppRFtXIAvoPs5BenUYtFO1jpg++ypwZAmbNqI7JHCtTpPpfo0gs jIX1wrgGba2Mm6fvv3YUe3mg7pAIuMy0FueOsGt8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kevin Brodsky , Victor Kamensky , Catalin Marinas , Sasha Levin Subject: [PATCH 4.19 193/306] arm64: makefile fix build of .i file in external module case Date: Wed, 27 Nov 2019 21:30:43 +0100 Message-Id: <20191127203129.314361619@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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