diff mbox series

[Xen-devel,v2,09/24] xen/arm: Introduce hsr_xabt to gather common bits between hsr_dabt and

Message ID 20170912100330.2168-10-julien.grall@arm.com
State Accepted
Commit d7216b07e8e7c802801c91a9c0e5a97a59982753
Headers show
Series xen/arm: Memory subsystem clean-up | expand

Commit Message

Julien Grall Sept. 12, 2017, 10:03 a.m. UTC
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>

---
    Changes in v2:
        - Add Andre's reviewed-by
---
 xen/include/asm-arm/processor.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Julien Grall Sept. 12, 2017, 3:01 p.m. UTC | #1
Hmmm, the commit title is truncated. It should be:

"xen/arm: Introduce hsr_xabt to gather common bits between hsr_{d,i}abt"

Cheers,

On 12/09/17 11:03, 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>
> 
> ---
>      Changes in v2:
>          - Add Andre's reviewed-by
> ---
>   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 b6432b6bf4..51e1c92665 100644
> --- a/xen/include/asm-arm/processor.h
> +++ b/xen/include/asm-arm/processor.h
> @@ -615,6 +615,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 */
>
Stefano Stabellini Sept. 16, 2017, 12:04 a.m. UTC | #2
On Tue, 12 Sep 2017, 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>
> 
> ---
>     Changes in v2:
>         - Add Andre's reviewed-by
> ---
>  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 b6432b6bf4..51e1c92665 100644
> --- a/xen/include/asm-arm/processor.h
> +++ b/xen/include/asm-arm/processor.h
> @@ -615,6 +615,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;

Could you please add a comment like: /* Not common */ on the side of
pad1


> +        unsigned long s1ptw:1;  /* Stage 2 fault during stage 1 translation */
> +        unsigned long pad2:1;

same here


> +        unsigned long eat:1;    /* External abort type */
> +        unsigned long fnv:1;    /* FAR not Valid */
> +        unsigned long pad3:14;

same here


> +        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 */
> -- 
> 2.11.0
>
diff mbox series

Patch

diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h
index b6432b6bf4..51e1c92665 100644
--- a/xen/include/asm-arm/processor.h
+++ b/xen/include/asm-arm/processor.h
@@ -615,6 +615,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 */