xen/arm: Move ARCH_PATCH_INSN_SIZE out of the header livepatch.h
authorJulien Grall <julien.grall@arm.com>
Tue, 24 Sep 2019 11:28:51 +0000 (12:28 +0100)
committerJulien Grall <julien.grall@arm.com>
Fri, 1 Nov 2019 14:32:20 +0000 (14:32 +0000)
At the moment, ARCH_PATCH_INSN_SIZE is defined in the header
livepatch.h. However, this is also used in the alternative code.

Rather than including livepatch.h just for using the define, move it in
the header insn.h which seems more suitable.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/arm/alternative.c
xen/include/asm-arm/insn.h
xen/include/asm-arm/livepatch.h

index 52ed7edf6908a2b2439c64625df0f779971bed36..237c4e5642093e28e1c1123ae2f532b8071e9218 100644 (file)
@@ -30,8 +30,6 @@
 #include <asm/byteorder.h>
 #include <asm/cpufeature.h>
 #include <asm/insn.h>
-/* XXX: Move ARCH_PATCH_INSN_SIZE out of livepatch.h */
-#include <asm/livepatch.h>
 #include <asm/page.h>
 
 /* Override macros from asm/page.h to make them work with mfn_t */
index 348917982640b3639028a5c7aaac00c9006c7c47..19277212e1d4b5da837a98cd31ffd2cb4296f863 100644 (file)
@@ -11,6 +11,9 @@
 # error "unknown ARM variant"
 #endif
 
+/* On ARM32,64 instructions are always 4 bytes long. */
+#define ARCH_PATCH_INSN_SIZE 4
+
 #endif /* !__ARCH_ARM_INSN */
 /*
  * Local variables:
index 6bca79deb98c38a0beca55ff6983b1dc2ee36d8c..026af5e7dccf7e67bde4ff7e31a39e79d3d1cbc8 100644 (file)
@@ -7,9 +7,7 @@
 #define __XEN_ARM_LIVEPATCH_H__
 
 #include <xen/sizes.h> /* For SZ_* macros. */
-
-/* On ARM32,64 instructions are always 4 bytes long. */
-#define ARCH_PATCH_INSN_SIZE 4
+#include <asm/insn.h>
 
 /*
  * The va of the hypervisor .text region. We need this as the