[Xen-devel,10/11] xen/arm: Move sysregs.h in arm64 sub-directory

Message ID 20170811180257.5493-11-julien.grall@arm.com
State Superseded
Headers show
Series
  • xen/arm: Clean-up traps.c
Related show

Commit Message

Julien Grall Aug. 11, 2017, 6:02 p.m.
sysregs.h contains only code protected by #ifdef CONFIG_ARM_64. Move it
in arm64 sub-directory to reflect that and remove the #ifdef.

At the same time, fixup the guards.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/include/asm-arm/arm64/processor.h     |  2 ++
 xen/include/asm-arm/{ => arm64}/sysregs.h | 10 +++-------
 xen/include/asm-arm/processor.h           |  1 -
 3 files changed, 5 insertions(+), 8 deletions(-)
 rename xen/include/asm-arm/{ => arm64}/sysregs.h (98%)

Patch

diff --git a/xen/include/asm-arm/arm64/processor.h b/xen/include/asm-arm/arm64/processor.h
index 24f836b023..c18ab7203d 100644
--- a/xen/include/asm-arm/arm64/processor.h
+++ b/xen/include/asm-arm/arm64/processor.h
@@ -3,6 +3,8 @@ 
 
 #include <xen/stringify.h>
 
+#include <asm/arm64/sysregs.h>
+
 #ifndef __ASSEMBLY__
 
 /* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
diff --git a/xen/include/asm-arm/sysregs.h b/xen/include/asm-arm/arm64/sysregs.h
similarity index 98%
rename from xen/include/asm-arm/sysregs.h
rename to xen/include/asm-arm/arm64/sysregs.h
index 887368e248..084d2a1e5d 100644
--- a/xen/include/asm-arm/sysregs.h
+++ b/xen/include/asm-arm/arm64/sysregs.h
@@ -1,7 +1,5 @@ 
-#ifndef __ASM_ARM_SYSREGS_H
-#define __ASM_ARM_SYSREGS_H
-
-#ifdef CONFIG_ARM_64
+#ifndef __ASM_ARM_ARM64_SYSREGS_H
+#define __ASM_ARM_ARM64_SYSREGS_H
 
 #include <xen/stringify.h>
 
@@ -168,9 +166,7 @@ 
 #define ICH_AP1R2_EL2             __AP1Rx_EL2(2)
 #define ICH_AP1R3_EL2             __AP1Rx_EL2(3)
 
-#endif
-
-#endif
+#endif /* _ASM_ARM_ARM64_SYSREGS_H */
 
 /*
  * Local variables:
diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index 855ded1b07..9eacb1be29 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -2,7 +2,6 @@ 
 #define __ASM_ARM_PROCESSOR_H
 
 #include <asm/cpregs.h>
-#include <asm/sysregs.h>
 #ifndef __ASSEMBLY__
 #include <xen/types.h>
 #endif