--- zzzz-none-000/linux-3.10.107/arch/mips/include/asm/mach-ath79/kernel-entry-init.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/mips/include/asm/mach-ath79/kernel-entry-init.h 2021-02-04 17:41:59.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