
6 Nov
2024
6 Nov
'24
2:09 a.m.
On Fri, Nov 1, 2024 at 6:46 AM Heinrich Schuchardt xypron.glpk@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/SC...
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
+}