From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: [kvm-unit-tests PATCH 3/4] arm64: include esr.h from processor.h Date: Fri, 15 Jan 2016 18:41:29 +0100 Message-ID: <1452879690-14493-4-git-send-email-drjones@redhat.com> References: <1452879690-14493-1-git-send-email-drjones@redhat.com> Cc: pbonzini@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37916 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754702AbcAORlk (ORCPT ); Fri, 15 Jan 2016 12:41:40 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 70983C076606 for ; Fri, 15 Jan 2016 17:41:40 +0000 (UTC) In-Reply-To: <1452879690-14493-1-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: We prefer to require explicitly including headers in each file that need them, rather than creating headers that include everything, and then just always including those. But, we can make an exception for esr.h, as includers of processor.h will frequently need esr.h, and by embedding that inclusion we avoid requiring something like #include #ifdef __aarch64__ #include #endif in every test that runs on both arm and arm64. Signed-off-by: Andrew Jones --- arm/selftest.c | 1 - lib/arm64/asm/processor.h | 1 + lib/arm64/processor.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arm/selftest.c b/arm/selftest.c index f4a503079e464..3e13296410fc1 100644 --- a/arm/selftest.c +++ b/arm/selftest.c @@ -177,7 +177,6 @@ static bool check_svc(void) return svc_works; } #elif defined(__aarch64__) -#include /* * Capture the current register state and execute an instruction diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h index 30615c5946011..84d5c7ce752b0 100644 --- a/lib/arm64/asm/processor.h +++ b/lib/arm64/asm/processor.h @@ -18,6 +18,7 @@ #ifndef __ASSEMBLY__ #include +#include enum vector { EL1T_SYNC, diff --git a/lib/arm64/processor.c b/lib/arm64/processor.c index 7f84fe3a09fb1..c553390c969ea 100644 --- a/lib/arm64/processor.c +++ b/lib/arm64/processor.c @@ -8,7 +8,6 @@ #include #include #include -#include #include static const char *vector_names[] = { -- 2.4.3