arm64: Add support for asymmetric AArch32 EL0 configurations
There is a non-negligible chance that we may see asymmetric big.LITTLE configurations where only the LITTLE CPUs have AArch32 support at EL0. While Linux currently handles such configurations by not allowing AArch32 tasks, there is a strong marketing push to investigate the possibility of allowing compat applications. This patch is aimed to facilitate internal testing and NOT FOR UPSTREAM. When the CONFIG_ASYMMETRIC_AARCH32 option is enabled (EXPERT), the type of the ARM64_HAS_32BIT_EL0 capability becomes WEAK_LOCAL_CPU_FEATURE. The kernel will now return true for system_supports_32bit_el0() and 32-bit tasks will be migrated to the capable CPUs during do_notify_resume(). If the last CPU supporting 32-bit is offlined, the kernel will SIGKILL any scheduled 32-bit tasks (the alternative is to prevent offlining through a new .cpu_disable feature entry). In addition to the relaxation of the ARM64_HAS_32BIT_EL0 capability, this patch factors out the 32-bit cpuinfo and features setting into separate functions: __cpuinfo_store_cpu_32bit(), init_cpu_32bit_features(). The cpuinfo of the booting CPU (boot_cpu_data) is now updated on the first 32-bit capable CPU even if it is a secondary one. The ID_AA64PFR0_EL0_64BIT_ONLY feature is relaxed to FTR_NONSTRICT and FTR_HIGHER_SAFE when the asymmetric AArch32 support is enabled. The compat_elf_hwcaps are only verified for the AArch32-capable CPUs to still allow hotplugging AArch64-only CPUs. Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com> Cc: Morten Rasmussen <Morten.Rasmussen@arm.com> Cc: Valentin Schneider <valentin.schneider@arm.com> Cc: Qais Yousef <qais.yousef@arm.com> Signed-off-by:Catalin Marinas <catalin.marinas@arm.com> [Qais: move TIF_SET_32BIT_AFFINITY handling until interrupts are enabled.] Signed-off-by:
Qais Yousef <qais.yousef@arm.com> Change-Id: If4058c1ff451a94f7eec15a0ed9fda94b01ff40b
Loading
Please register or sign in to comment