From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: [PATCH v2 03/19] arm64: asm-offsets: Remove potential circular dependency Date: Mon, 11 Dec 2017 14:49:21 +0000 Message-ID: <20171211144937.4537-4-marc.zyngier@arm.com> References: <20171211144937.4537-1-marc.zyngier@arm.com> Cc: Christoffer Dall , Mark Rutland , Catalin Marinas , Will Deacon , James Morse , Steve Capper To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Return-path: Received: from foss.arm.com ([217.140.101.70]:58712 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbdLKOtx (ORCPT ); Mon, 11 Dec 2017 09:49:53 -0500 In-Reply-To: <20171211144937.4537-1-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: So far, we've been lucky enough that none of the include files that asm-offsets.c requires do include asm-offsets.h. This is about to change, and would introduce a nasty circular dependency... Let's now guard the inclusion of asm-offsets.h so that it never gets pulled from asm-offsets.c. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/asm-offsets.h | 2 ++ arch/arm64/kernel/asm-offsets.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/asm-offsets.h b/arch/arm64/include/asm/asm-offsets.h index d370ee36a182..ed8df3a9c95a 100644 --- a/arch/arm64/include/asm/asm-offsets.h +++ b/arch/arm64/include/asm/asm-offsets.h @@ -1 +1,3 @@ +#ifndef IN_ASM_OFFSET_GENERATOR #include +#endif diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 742887330101..74b9a26a84b5 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -18,6 +18,8 @@ * along with this program. If not, see . */ +#define IN_ASM_OFFSET_GENERATOR 1 + #include #include #include -- 2.14.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Mon, 11 Dec 2017 14:49:21 +0000 Subject: [PATCH v2 03/19] arm64: asm-offsets: Remove potential circular dependency In-Reply-To: <20171211144937.4537-1-marc.zyngier@arm.com> References: <20171211144937.4537-1-marc.zyngier@arm.com> Message-ID: <20171211144937.4537-4-marc.zyngier@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org So far, we've been lucky enough that none of the include files that asm-offsets.c requires do include asm-offsets.h. This is about to change, and would introduce a nasty circular dependency... Let's now guard the inclusion of asm-offsets.h so that it never gets pulled from asm-offsets.c. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/asm-offsets.h | 2 ++ arch/arm64/kernel/asm-offsets.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/asm-offsets.h b/arch/arm64/include/asm/asm-offsets.h index d370ee36a182..ed8df3a9c95a 100644 --- a/arch/arm64/include/asm/asm-offsets.h +++ b/arch/arm64/include/asm/asm-offsets.h @@ -1 +1,3 @@ +#ifndef IN_ASM_OFFSET_GENERATOR #include +#endif diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 742887330101..74b9a26a84b5 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -18,6 +18,8 @@ * along with this program. If not, see . */ +#define IN_ASM_OFFSET_GENERATOR 1 + #include #include #include -- 2.14.2