xen/arm: mm: Rework MAIR* definitions to handle 32-bit compilation environment
authorJulien Grall <julien.grall@linaro.org>
Wed, 11 Oct 2017 14:15:33 +0000 (15:15 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 11 Oct 2017 18:39:10 +0000 (11:39 -0700)
commit8b3231a83483b6e4a27fd54cfad04ed2c168d4bf
tree629fcd8f32d14ea0141f54f177deb20231babc35
parent6f4a9dea06481aec36890f99da592db18758721c
xen/arm: mm: Rework MAIR* definitions to handle 32-bit compilation environment

Commit a0543df403 "xen/arm: page: Clean-up the definition of MAIRVAL"
combined the definition of MAIR0VAL and MAIR1VAL in MAIRVAL. Sadly, when
building in 32-bit environment, the assembler is unable to compute
64-bit constant and will ignore the 32-bit most-significants bits. This
will result of MAIR1 set 0.

Rather than fully reverting the offending commit, the code is reworked
to still avoid hardcoded values but split the definition in 2.

Lastly, a comment is added to avoid trying to blindly combine the both
definition again in the future.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/page.h