diff mbox series

[Xen-devel,10/27] xen/arm: arm32: Don't define FAR_EL1

Message ID 20170814142418.13267-11-julien.grall@arm.com
State Superseded
Headers show
Series xen/arm: Memory subsystem clean-up | expand

Commit Message

Julien Grall Aug. 14, 2017, 2:24 p.m. UTC
Aliasing FAR_EL1 to IFAR is wrong because on ARMv8 FAR_EL1[31:0] is
architecturally mapped to DFAR and FAR_EL1[63:32] to DFAR.

As FAR_EL1 is not currently used in ARM32 code, remove it.

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

Comments

Andre Przywara Aug. 22, 2017, 2:37 p.m. UTC | #1
Hi,

On 14/08/17 15:24, Julien Grall wrote:
> Aliasing FAR_EL1 to IFAR is wrong because on ARMv8 FAR_EL1[31:0] is
> architecturally mapped to DFAR and FAR_EL1[63:32] to DFAR.
                                                       ^^^^
Should be IFAR, I guess?
Please put a quid into the copy-and-paste piggy bank ;-)

Otherwise it's fine.

> As FAR_EL1 is not currently used in ARM32 code, remove it.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

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

Cheers,
Andre.

> ---
>  xen/include/asm-arm/cpregs.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h
> index 1889d7cbfb..9e138489f0 100644
> --- a/xen/include/asm-arm/cpregs.h
> +++ b/xen/include/asm-arm/cpregs.h
> @@ -306,7 +306,6 @@
>  #define DACR32_EL2              DACR
>  #define ESR_EL1                 DFSR
>  #define ESR_EL2                 HSR
> -#define FAR_EL1                 HIFAR
>  #define HCR_EL2                 HCR
>  #define HPFAR_EL2               HPFAR
>  #define HSTR_EL2                HSTR
>
Julien Grall Aug. 23, 2017, 7:06 p.m. UTC | #2
On 08/22/2017 03:37 PM, Andre Przywara wrote:
> Hi,

Hi Andre,

> On 14/08/17 15:24, Julien Grall wrote:
>> Aliasing FAR_EL1 to IFAR is wrong because on ARMv8 FAR_EL1[31:0] is
>> architecturally mapped to DFAR and FAR_EL1[63:32] to DFAR.
>                                                         ^^^^
> Should be IFAR, I guess?

Yep. I will fix it.

> Please put a quid into the copy-and-paste piggy bank ;-)

2 quite with the copy-paste in patch #9 :).

Cheers,
diff mbox series

Patch

diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/asm-arm/cpregs.h
index 1889d7cbfb..9e138489f0 100644
--- a/xen/include/asm-arm/cpregs.h
+++ b/xen/include/asm-arm/cpregs.h
@@ -306,7 +306,6 @@ 
 #define DACR32_EL2              DACR
 #define ESR_EL1                 DFSR
 #define ESR_EL2                 HSR
-#define FAR_EL1                 HIFAR
 #define HCR_EL2                 HCR
 #define HPFAR_EL2               HPFAR
 #define HSTR_EL2                HSTR