]>
Commit | Line | Data |
---|---|---|
c8fb49aa GKH |
1 | From ca4d24f7954f3746742ba350c2276ff777f21173 Mon Sep 17 00:00:00 2001 |
2 | From: Markos Chandras <markos.chandras@imgtec.com> | |
3 | Date: Mon, 21 Jul 2014 14:35:55 +0100 | |
4 | Subject: MIPS: Malta: EVA: Rename 'eva_entry' to 'platform_eva_init' | |
5 | ||
6 | From: Markos Chandras <markos.chandras@imgtec.com> | |
7 | ||
8 | commit ca4d24f7954f3746742ba350c2276ff777f21173 upstream. | |
9 | ||
10 | Rename 'eva_entry' to 'platform_eva_init' as required by the new | |
11 | 'eva_init' macro in the eva.h header. Since this macro is now used | |
12 | in a platform dependent way, it must not depend on its caller so move | |
13 | the t1 register initialization inside this macro. Also set the .reorder | |
14 | assembler option in case the caller may have previously set .noreorder. | |
15 | This may allow a few assembler optimizations. Finally include missing | |
16 | headers and document the register usage for this macro. | |
17 | ||
18 | Reviewed-by: Paul Burton <paul.burton@imgtec.com> | |
19 | Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> | |
20 | Patchwork: http://patchwork.linux-mips.org/patch/7423/ | |
21 | Signed-off-by: James Hogan <james.hogan@imgtec.com> | |
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
23 | ||
24 | --- | |
25 | arch/mips/include/asm/mach-malta/kernel-entry-init.h | 22 +++++++++++++------ | |
26 | 1 file changed, 16 insertions(+), 6 deletions(-) | |
27 | ||
28 | --- a/arch/mips/include/asm/mach-malta/kernel-entry-init.h | |
29 | +++ b/arch/mips/include/asm/mach-malta/kernel-entry-init.h | |
30 | @@ -10,14 +10,15 @@ | |
31 | #ifndef __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H | |
32 | #define __ASM_MACH_MIPS_KERNEL_ENTRY_INIT_H | |
33 | ||
34 | +#include <asm/regdef.h> | |
35 | +#include <asm/mipsregs.h> | |
36 | + | |
37 | /* | |
38 | * Prepare segments for EVA boot: | |
39 | * | |
40 | * This is in case the processor boots in legacy configuration | |
41 | * (SI_EVAReset is de-asserted and CONFIG5.K == 0) | |
42 | * | |
43 | - * On entry, t1 is loaded with CP0_CONFIG | |
44 | - * | |
45 | * ========================= Mappings ============================= | |
46 | * Virtual memory Physical memory Mapping | |
47 | * 0x00000000 - 0x7fffffff 0x80000000 - 0xfffffffff MUSUK (kuseg) | |
48 | @@ -30,12 +31,20 @@ | |
49 | * | |
50 | * | |
51 | * Lowmem is expanded to 2GB | |
52 | + * | |
53 | + * The following code uses the t0, t1, t2 and ra registers without | |
54 | + * previously preserving them. | |
55 | + * | |
56 | */ | |
57 | - .macro eva_entry | |
58 | + .macro platform_eva_init | |
59 | + | |
60 | + .set push | |
61 | + .set reorder | |
62 | /* | |
63 | * Get Config.K0 value and use it to program | |
64 | * the segmentation registers | |
65 | */ | |
66 | + mfc0 t1, CP0_CONFIG | |
67 | andi t1, 0x7 /* CCA */ | |
68 | move t2, t1 | |
69 | ins t2, t1, 16, 3 | |
70 | @@ -77,6 +86,8 @@ | |
71 | mtc0 t0, $16, 5 | |
72 | sync | |
73 | jal mips_ihb | |
74 | + | |
75 | + .set pop | |
76 | .endm | |
77 | ||
78 | .macro kernel_entry_setup | |
79 | @@ -95,7 +106,7 @@ | |
80 | sll t0, t0, 6 /* SC bit */ | |
81 | bgez t0, 9f | |
82 | ||
83 | - eva_entry | |
84 | + platform_eva_init | |
85 | b 0f | |
86 | 9: | |
87 | /* Assume we came from YAMON... */ | |
88 | @@ -127,8 +138,7 @@ nonsc_processor: | |
89 | #ifdef CONFIG_EVA | |
90 | sync | |
91 | ehb | |
92 | - mfc0 t1, CP0_CONFIG | |
93 | - eva_entry | |
94 | + platform_eva_init | |
95 | #endif | |
96 | .endm | |
97 |