]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: Limit the scope of cpregs.h
authorJulien Grall <julien.grall@arm.com>
Thu, 14 Sep 2017 17:08:59 +0000 (18:08 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 14 Sep 2017 22:15:08 +0000 (15:15 -0700)
Currently, cpregs.h is indirectly included every files of the hypervisor even
for arm64. However, the only use for arm64 is when emulating co-processors.

For arm32, all users of processor.h expect cpregs.h to be included in
order to access co-processors. So move the inclusion in
asm-arm/arm32/processor.h.

cpregs.h will also be directly included in the co-processors emulation
to accommodate arm64.

This is drastically reducing the exposure of cpregs.h to any source file
on arm64.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/smp.c
xen/arch/arm/vcpreg.c
xen/arch/arm/vgic-v3.c
xen/arch/arm/vtimer.c
xen/include/asm-arm/arm32/processor.h
xen/include/asm-arm/percpu.h
xen/include/asm-arm/processor.h

index e7df0874d6f32facc04fb8094abe72fc28a6d94c..554f4992e61eceb84d20c935a4cedb80b240a39a 100644 (file)
@@ -1,6 +1,5 @@
 #include <asm/system.h>
 #include <asm/smp.h>
-#include <asm/cpregs.h>
 #include <asm/page.h>
 #include <asm/gic.h>
 #include <asm/flushtlb.h>
index f3b08403fbc23506d027a855a775c5d8c98b86ab..e363183ba80870c4b471d6f44c5a9e5cbeb3a01f 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <xen/sched.h>
 
+#include <asm/cpregs.h>
 #include <asm/current.h>
 #include <asm/regs.h>
 #include <asm/traps.h>
index cbeac28b28d3af6315d4e663d2a43dc68a47a19b..a0cf993d138c89ec4cc2a668e6831741c184cfef 100644 (file)
@@ -26,6 +26,7 @@
 #include <xen/softirq.h>
 #include <xen/sizes.h>
 
+#include <asm/cpregs.h>
 #include <asm/current.h>
 #include <asm/gic_v3_defs.h>
 #include <asm/gic_v3_its.h>
index 9c7e8f441c7d04dc69c0a7b645ba20c93c4b8786..0460962f086bb8606b632d29da73e61d9bbe4588 100644 (file)
@@ -22,6 +22,7 @@
 #include <xen/sched.h>
 #include <xen/timer.h>
 
+#include <asm/cpregs.h>
 #include <asm/div64.h>
 #include <asm/gic.h>
 #include <asm/irq.h>
@@ -29,6 +30,7 @@
 #include <asm/time.h>
 #include <asm/vgic.h>
 #include <asm/vreg.h>
+#include <asm/regs.h>
 
 /*
  * Check if regs is allowed access, user_gate is tail end of a
index 68cc82147e85c45576b8752def2c9ce449471838..fb330812af05e7db30ae0d1ca9364f234e3de17e 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __ASM_ARM_ARM32_PROCESSOR_H
 #define __ASM_ARM_ARM32_PROCESSOR_H
 
+#include <asm/cpregs.h>
+
 #define ACTLR_CAXX_SMP      (1<<6)
 
 #ifndef __ASSEMBLY__
index 7968532462bf94d7ee95677df25f46c83008372f..cdf64e0f772f04f00d0d4b4844fb41aff2dffbc6 100644 (file)
@@ -4,7 +4,6 @@
 #ifndef __ASSEMBLY__
 
 #include <xen/types.h>
-#include <asm/cpregs.h>
 #if defined(CONFIG_ARM_32)
 # include <asm/arm32/processor.h>
 #elif defined(CONFIG_ARM_64)
index d791c12c9c9b80c73b8b49113d339be24da697ba..cd45e5f48f6ad53f904bd14f461bfc2b5326d8a6 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __ASM_ARM_PROCESSOR_H
 #define __ASM_ARM_PROCESSOR_H
 
-#include <asm/cpregs.h>
 #ifndef __ASSEMBLY__
 #include <xen/types.h>
 #endif