[Xen-devel,12/27] xen/arm: Introduce hsr_xabt to gather common bits between hsr_dabt and

Message ID 20170814142418.13267-13-julien.grall@arm.com
State Superseded
Headers show
Series
  • xen/arm: Memory subsystem clean-up
Related show

Commit Message

Julien Grall Aug. 14, 2017, 2:24 p.m.
This will allow to consolidate some part of the data abort and prefetch
abort handling in a single function later on.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/include/asm-arm/processor.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Andre Przywara Aug. 22, 2017, 4:19 p.m. | #1
Hi,

On 14/08/17 15:24, Julien Grall wrote:
> This will allow to consolidate some part of the data abort and prefetch
> abort handling in a single function later on.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre.

> ---
>  xen/include/asm-arm/processor.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
> index 3ef606c554..9964348189 100644
> --- a/xen/include/asm-arm/processor.h
> +++ b/xen/include/asm-arm/processor.h
> @@ -537,6 +537,19 @@ union hsr {
>          unsigned long ec:6;    /* Exception Class */
>      } dabt; /* HSR_EC_DATA_ABORT_* */
>  
> +    /* Contain the common bits between DABT and IABT */
> +    struct hsr_xabt {
> +        unsigned long fsc:6;    /* Fault status code */
> +        unsigned long pad1:1;
> +        unsigned long s1ptw:1;  /* Stage 2 fault during stage 1 translation */
> +        unsigned long pad2:1;
> +        unsigned long eat:1;    /* External abort type */
> +        unsigned long fnv:1;    /* FAR not Valid */
> +        unsigned long pad3:14;
> +        unsigned long len:1;    /* Instruction length */
> +        unsigned long ec:6;     /* Exception Class */
> +    } xabt;
> +
>  #ifdef CONFIG_ARM_64
>      struct hsr_brk {
>          unsigned long comment:16;   /* Comment */
>

Patch

diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index 3ef606c554..9964348189 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -537,6 +537,19 @@  union hsr {
         unsigned long ec:6;    /* Exception Class */
     } dabt; /* HSR_EC_DATA_ABORT_* */
 
+    /* Contain the common bits between DABT and IABT */
+    struct hsr_xabt {
+        unsigned long fsc:6;    /* Fault status code */
+        unsigned long pad1:1;
+        unsigned long s1ptw:1;  /* Stage 2 fault during stage 1 translation */
+        unsigned long pad2:1;
+        unsigned long eat:1;    /* External abort type */
+        unsigned long fnv:1;    /* FAR not Valid */
+        unsigned long pad3:14;
+        unsigned long len:1;    /* Instruction length */
+        unsigned long ec:6;     /* Exception Class */
+    } xabt;
+
 #ifdef CONFIG_ARM_64
     struct hsr_brk {
         unsigned long comment:16;   /* Comment */