[kvm-unit-tests PATCH 3/4] arm64: include esr.h from processor.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <asm/processor.h>
  #ifdef __aarch64__
  #include <asm/esr.h>
  #endif

in every test that runs on both arm and arm64.

Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
---
 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 <asm/esr.h>
 
 /*
  * 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 <asm/ptrace.h>
+#include <asm/esr.h>
 
 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 <libcflat.h>
 #include <asm/ptrace.h>
 #include <asm/processor.h>
-#include <asm/esr.h>
 #include <asm/thread_info.h>
 
 static const char *vector_names[] = {
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux