Loading...
1/*
2 * Atheros AR71XX/AR724X/AR913X specific kernel entry setup
3 *
4 * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 *
10 */
11#ifndef __ASM_MACH_ATH79_KERNEL_ENTRY_H
12#define __ASM_MACH_ATH79_KERNEL_ENTRY_H
13
14 /*
15 * Some bootloaders set the 'Kseg0 coherency algorithm' to
16 * 'Cacheable, noncoherent, write-through, no write allocate'
17 * and this cause performance issues. Let's go and change it to
18 * 'Cacheable, noncoherent, write-back, write allocate'
19 */
20 .macro kernel_entry_setup
21 mfc0 t0, CP0_CONFIG
22 li t1, ~CONF_CM_CMASK
23 and t0, t1
24 ori t0, CONF_CM_CACHABLE_NONCOHERENT
25 mtc0 t0, CP0_CONFIG
26 nop
27 .endm
28
29 .macro smp_slave_setup
30 .endm
31
32#endif /* __ASM_MACH_ATH79_KERNEL_ENTRY_H */
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Atheros AR71XX/AR724X/AR913X specific kernel entry setup
4 *
5 * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
6 */
7#ifndef __ASM_MACH_ATH79_KERNEL_ENTRY_H
8#define __ASM_MACH_ATH79_KERNEL_ENTRY_H
9
10 /*
11 * Some bootloaders set the 'Kseg0 coherency algorithm' to
12 * 'Cacheable, noncoherent, write-through, no write allocate'
13 * and this cause performance issues. Let's go and change it to
14 * 'Cacheable, noncoherent, write-back, write allocate'
15 */
16 .macro kernel_entry_setup
17 mfc0 t0, CP0_CONFIG
18 li t1, ~CONF_CM_CMASK
19 and t0, t1
20 ori t0, CONF_CM_CACHABLE_NONCOHERENT
21 mtc0 t0, CP0_CONFIG
22 nop
23 .endm
24
25 .macro smp_slave_setup
26 .endm
27
28#endif /* __ASM_MACH_ATH79_KERNEL_ENTRY_H */