[Xen-devel,11/22] xen/arm: Move out of processor.h traps related variable/function

Message ID 20181018132109.31192-12-julien.grall@arm.com
State Superseded
Headers show
Series
  • xen/arm: Bunch of clean-ups
Related show

Commit Message

Julien Grall Oct. 18, 2018, 1:20 p.m.
do_unexpected_traps() is moved to traps.h while init_traps() and
hyp_traps_vectors() are moved to setup.h.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/include/asm-arm/processor.h | 6 ------
 xen/include/asm-arm/setup.h     | 3 +++
 xen/include/asm-arm/traps.h     | 2 ++
 3 files changed, 5 insertions(+), 6 deletions(-)

Comments

Andrii Anisov Oct. 25, 2018, 5:56 p.m. | #1
On 18.10.18 16:20, Julien Grall wrote:
> do_unexpected_traps() is moved to traps.h while init_traps() and
> hyp_traps_vectors() are moved to setup.h.
>
> Signed-off-by: Julien Grall <julien.grall@arm.com>
> ---

Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>

Patch

diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index 3592aa36d8..b05f17f35c 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -453,10 +453,6 @@  extern register_t __cpu_logical_map[];
 #endif
 
 #ifndef __ASSEMBLY__
-extern uint32_t hyp_traps_vector[];
-
-void init_traps(void);
-
 void panic_PAR(uint64_t par);
 
 void show_execution_state(struct cpu_user_regs *regs);
@@ -470,8 +466,6 @@  void show_registers(const struct cpu_user_regs *regs);
 #define cpu_to_core(_cpu)   (0)
 #define cpu_to_socket(_cpu) (0)
 
-void noreturn do_unexpected_trap(const char *msg, struct cpu_user_regs *regs);
-
 struct vcpu;
 void vcpu_regs_hyp_to_user(const struct vcpu *vcpu,
                            struct vcpu_guest_core_regs *regs);
diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
index 5f41ba0cba..11e1b2aacf 100644
--- a/xen/include/asm-arm/setup.h
+++ b/xen/include/asm-arm/setup.h
@@ -83,6 +83,9 @@  struct bootmodule *add_boot_module(bootmodule_kind kind,
 struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind);
 const char *boot_module_kind_as_string(bootmodule_kind kind);
 
+extern uint32_t hyp_traps_vector[];
+void init_traps(void);
+
 #endif
 /*
  * Local variables:
diff --git a/xen/include/asm-arm/traps.h b/xen/include/asm-arm/traps.h
index 8b6f09b6b8..3d60160310 100644
--- a/xen/include/asm-arm/traps.h
+++ b/xen/include/asm-arm/traps.h
@@ -46,6 +46,8 @@  void do_trap_hvc_smccc(struct cpu_user_regs *regs);
 
 int do_bug_frame(struct cpu_user_regs *regs, vaddr_t pc);
 
+void noreturn do_unexpected_trap(const char *msg, struct cpu_user_regs *regs);
+
 /* Functions for pending virtual abort checking window. */
 void abort_guest_exit_start(void);
 void abort_guest_exit_end(void);