--- zzzz-none-000/linux-4.4.271/arch/arm/mm/proc-v7.S 2021-06-03 06:22:09.000000000 +0000 +++ maple-fsgw-759/linux-4.4.271/arch/arm/mm/proc-v7.S 2023-12-20 10:37:01.000000000 +0000 @@ -536,6 +536,22 @@ #endif define_processor_functions ca8, dabort=v7_early_abort, pabort=v7_pabort, suspend=1, bugs=cpu_v7_ca8_ibe +/* + * Qualcomm Technologies Inc. Krait processors. - need to invalidate Branch prediction + * on switch_mm + */ + globl_equ cpu_krait_proc_init, cpu_v7_proc_init + globl_equ cpu_krait_proc_fin, cpu_v7_proc_fin + globl_equ cpu_krait_reset, cpu_v7_reset + globl_equ cpu_krait_do_idle, cpu_v7_do_idle + globl_equ cpu_krait_dcache_clean_area, cpu_v7_dcache_clean_area + globl_equ cpu_krait_set_pte_ext, cpu_v7_set_pte_ext + globl_equ cpu_krait_suspend_size, cpu_v7_suspend_size +#ifdef CONFIG_ARM_CPU_SUSPEND + globl_equ cpu_krait_do_suspend, cpu_v7_do_suspend + globl_equ cpu_krait_do_resume, cpu_v7_do_resume +#endif + @ Cortex-A9 - needs more registers preserved across suspend/resume @ and bpiall switch_mm for hardening globl_equ cpu_ca9mp_proc_init, cpu_v7_proc_init @@ -571,6 +587,7 @@ #ifdef CONFIG_CPU_PJ4B define_processor_functions pj4b, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 #endif + define_processor_functions krait, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 .section ".rodata" @@ -736,7 +753,7 @@ * do support them. They also don't indicate support for fused multiply * instructions even though they actually do support them. */ - __v7_proc __krait_proc_info, __v7_setup, hwcaps = HWCAP_IDIV | HWCAP_VFPv4 + __v7_proc __krait_proc_info, __v7_setup, hwcaps = HWCAP_IDIV | HWCAP_VFPv4, proc_fns = krait_processor_functions .size __krait_proc_info, . - __krait_proc_info /*