[PATCH] armv8: cpu: Implement allow_unaligned()
Sam Protsenko
semen.protsenko at linaro.org
Wed Nov 6 02:09:03 CET 2024
On Fri, Nov 1, 2024 at 6:46 AM Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
[snip]
> > +void allow_unaligned(void)
> > +{
> > + set_sctlr(get_sctlr() & ~CR_A);
>
> Looking at the ARM documentation SCTLR_EL2 is a 64bit register.
>
> https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/SCTLR-EL2--System-Control-Register--EL2-?lang=en
>
> But get_sctlr() is defined as
>
> arch/arm/include/asm/system.h:174:
> static inline unsigned int get_sctlr(void)
>
> Your code might not work as expected. Should we adjust the definition of
> get_sctlr() to return a long value?
>
Hi Heinrich,
Good catch! I totally overlooked it. And it's already used in a
similar way in a couple of different places. I'll handle that in my v2
soon.
Thanks!
> Best regards
>
> Heinrich
>
> > +}
>
More information about the U-Boot
mailing list