[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC for-4.13 06/10] xen/arm: Move ARCH_PATCH_INSN_SIZE out of the header livepatch.h



On Thu, 26 Sep 2019, Julien Grall wrote:
> 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@xxxxxxx>

Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>


> ---
>  xen/arch/arm/alternative.c      | 2 --
>  xen/include/asm-arm/insn.h      | 3 +++
>  xen/include/asm-arm/livepatch.h | 4 +---
>  3 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
> index 52ed7edf69..237c4e5642 100644
> --- a/xen/arch/arm/alternative.c
> +++ b/xen/arch/arm/alternative.c
> @@ -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 */
> diff --git a/xen/include/asm-arm/insn.h b/xen/include/asm-arm/insn.h
> index 3489179826..19277212e1 100644
> --- a/xen/include/asm-arm/insn.h
> +++ b/xen/include/asm-arm/insn.h
> @@ -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:
> diff --git a/xen/include/asm-arm/livepatch.h b/xen/include/asm-arm/livepatch.h
> index 6bca79deb9..026af5e7dc 100644
> --- a/xen/include/asm-arm/livepatch.h
> +++ b/xen/include/asm-arm/livepatch.h
> @@ -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
> -- 
> 2.11.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.