1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Atheros AR71XX/AR724X/AR913X specific kernel entry setup 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org> 6*4882a593Smuzhiyun */ 7*4882a593Smuzhiyun #ifndef __ASM_MACH_ATH79_KERNEL_ENTRY_H 8*4882a593Smuzhiyun #define __ASM_MACH_ATH79_KERNEL_ENTRY_H 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun /* 11*4882a593Smuzhiyun * Some bootloaders set the 'Kseg0 coherency algorithm' to 12*4882a593Smuzhiyun * 'Cacheable, noncoherent, write-through, no write allocate' 13*4882a593Smuzhiyun * and this cause performance issues. Let's go and change it to 14*4882a593Smuzhiyun * 'Cacheable, noncoherent, write-back, write allocate' 15*4882a593Smuzhiyun */ 16*4882a593Smuzhiyun .macro kernel_entry_setup 17*4882a593Smuzhiyun mfc0 t0, CP0_CONFIG 18*4882a593Smuzhiyun li t1, ~CONF_CM_CMASK 19*4882a593Smuzhiyun and t0, t1 20*4882a593Smuzhiyun ori t0, CONF_CM_CACHABLE_NONCOHERENT 21*4882a593Smuzhiyun mtc0 t0, CP0_CONFIG 22*4882a593Smuzhiyun nop 23*4882a593Smuzhiyun .endm 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun .macro smp_slave_setup 26*4882a593Smuzhiyun .endm 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #endif /* __ASM_MACH_ATH79_KERNEL_ENTRY_H */ 29