Skip to content

Commit ca4d24f

Browse files
Markos Chandrasralfbaechle
authored andcommitted
MIPS: Malta: EVA: Rename 'eva_entry' to 'platform_eva_init'
Rename 'eva_entry' to 'platform_eva_init' as required by the new 'eva_init' macro in the eva.h header. Since this macro is now used in a platform dependent way, it must not depend on its caller so move the t1 register initialization inside this macro. Also set the .reorder assembler option in case the caller may have previously set .noreorder. This may allow a few assembler optimizations. Finally include missing headers and document the register usage for this macro. Reviewed-by: Paul Burton <[email protected]> Signed-off-by: Markos Chandras <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/7423/ Signed-off-by: James Hogan <[email protected]>
1 parent f85b71c commit ca4d24f

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

arch/mips/include/asm/mach-malta/kernel-entry-init.h

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
#ifndef __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H
1111
#define __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H
1212

13+
#include <asm/regdef.h>
14+
#include <asm/mipsregs.h>
15+
1316
/*
1417
* Prepare segments for EVA boot:
1518
*
1619
* This is in case the processor boots in legacy configuration
1720
* (SI_EVAReset is de-asserted and CONFIG5.K == 0)
1821
*
19-
* On entry, t1 is loaded with CP0_CONFIG
20-
*
2122
* ========================= Mappings =============================
2223
* Virtual memory Physical memory Mapping
2324
* 0x00000000 - 0x7fffffff 0x80000000 - 0xfffffffff MUSUK (kuseg)
@@ -30,12 +31,20 @@
3031
*
3132
*
3233
* Lowmem is expanded to 2GB
34+
*
35+
* The following code uses the t0, t1, t2 and ra registers without
36+
* previously preserving them.
37+
*
3338
*/
34-
.macro eva_entry
39+
.macro platform_eva_init
40+
41+
.set push
42+
.set reorder
3543
/*
3644
* Get Config.K0 value and use it to program
3745
* the segmentation registers
3846
*/
47+
mfc0 t1, CP0_CONFIG
3948
andi t1, 0x7 /* CCA */
4049
move t2, t1
4150
ins t2, t1, 16, 3
@@ -77,6 +86,8 @@
7786
mtc0 t0, $16, 5
7887
sync
7988
jal mips_ihb
89+
90+
.set pop
8091
.endm
8192

8293
.macro kernel_entry_setup
@@ -95,7 +106,7 @@
95106
sll t0, t0, 6 /* SC bit */
96107
bgez t0, 9f
97108

98-
eva_entry
109+
platform_eva_init
99110
b 0f
100111
9:
101112
/* Assume we came from YAMON... */
@@ -127,8 +138,7 @@
127138
#ifdef CONFIG_EVA
128139
sync
129140
ehb
130-
mfc0 t1, CP0_CONFIG
131-
eva_entry
141+
platform_eva_init
132142
#endif
133143
.endm
134144

0 commit comments

Comments
 (0)