--- zzzz-none-000/linux-4.4.271/arch/mips/include/asm/mach-ath79/kernel-entry-init.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/arch/mips/include/asm/mach-ath79/kernel-entry-init.h 2023-04-19 10:22:28.000000000 +0000 @@ -24,6 +24,24 @@ ori t0, CONF_CM_CACHABLE_NONCOHERENT mtc0 t0, CP0_CONFIG nop + /* == AVM/JTR 20181119 Enable ULB and SL Bits in Config7 on Wasp platforms == */ +#if defined(CONFIG_ATH79_MACH_AVM_WASP) && 0 + mfc0 t0, $16, 7 + ori t0, t0, 0x0011 + mtc0 t0, $16, 7 + nop +#endif + /* == AVM/JTR 20181212 Disable Return Branch Prediction, Prefetching and enable SUI on Wasp platforms == */ +#if defined(CONFIG_ATH79_MACH_AVM_WASP) && 1 + mfc0 t0, $16, 7 + li t1, ~(3 << 11) /* Clear prefetch */ + and t0, t0, t1 + ori t0, t0, (1<<2) /* Disable Return Branch Prediction */ + li t1,(1<<21) /* Enable Strict Uncached Instruction */ + or t0,t0,t1 + mtc0 t0, $16, 7 + nop +#endif .endm .macro smp_slave_setup