diff mbox series

[Xen-devel,v2,6/7] xen/arm: Move sysregs.h in arm64 sub-directory

Message ID 20170912103622.18562-7-julien.grall@arm.com
State Superseded
Headers show
Series xen/arm: Clean-up traps.c | expand

Commit Message

Julien Grall Sept. 12, 2017, 10:36 a.m. UTC
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%)

Comments

Stefano Stabellini Sept. 12, 2017, 9:49 p.m. UTC | #1
On Tue, 12 Sep 2017, Julien Grall wrote:
> 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>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

> ---
>  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%)
> 
> 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 9f7a42f86b..d791c12c9c 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
> -- 
> 2.11.0
>
diff mbox series

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 9f7a42f86b..d791c12c9c 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