From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B109C432C0 for ; Wed, 27 Nov 2019 20:51:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1152321871 for ; Wed, 27 Nov 2019 20:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887869; bh=EXrFZR95aAwcDSeymXCCjFEvcW5PY/VBzSqJopYtqCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zaU5zyO+MmO/r8SJ3PVw1X3ooBvl2bWNp5wWKqGqjKA7zslw2Qt/zTdqBgm1w82wL tjcetljpyGH0ZbaxMbSsK+AeaNLMEBsoV8YWdJJf1k+TAKYYGZZFCLeenJFNuRtBkV DS9PB49ctXTSf/Uqh/O8vvwMtOkGYUgaONBEIe6s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730440AbfK0UvH (ORCPT ); Wed, 27 Nov 2019 15:51:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:37534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730432AbfK0UvF (ORCPT ); Wed, 27 Nov 2019 15:51:05 -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 27EFF21847; Wed, 27 Nov 2019 20:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887864; bh=EXrFZR95aAwcDSeymXCCjFEvcW5PY/VBzSqJopYtqCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NpCHdrCWEybn90SsmPvCZlgtRPQA62xBuQ25sdWyxpzSdiP1MEwEr44RbF7wXWSRY 50YcZX00121d5sjTSzQFgYjJwiZvpqWYaxTAN1BAOQ4Eovj2S7fg+jXIU2GO+1KpB7 7E/qZ7byaeVzMzG4DVlnm9Fzd6Zcbc/QkmYYQik0= 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.14 123/211] arm64: makefile fix build of .i file in external module case Date: Wed, 27 Nov 2019 21:30:56 +0100 Message-Id: <20191127203105.792275916@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203049.431810767@linuxfoundation.org> References: <20191127203049.431810767@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 0c5f70e6d5cfa..8c4bc5a2c61f4 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -149,6 +149,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 @@ -158,6 +159,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