aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-08-13 15:26:23 -0400
committerChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:53:20 -0400
commit43b7f2fb58d42d2b6bc02368f61e14abd002001a (patch)
treeadf5203ad9594ac5d6706f2916337296a3218270 /arch/tile
parent850a45209d44654afb8ee2cad53a67c07c1cef9c (diff)
tile: simplify code referencing hypervisor API addresses
There's no need to make up new ways of computing the addresses of the Tilera hypervisor APIs; just use the standard method of relying on the symbols to provide the addresses. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/kernel/relocate_kernel_32.S25
1 files changed, 8 insertions, 17 deletions
diff --git a/arch/tile/kernel/relocate_kernel_32.S b/arch/tile/kernel/relocate_kernel_32.S
index 010b418515f8..f7fd37b64a78 100644
--- a/arch/tile/kernel/relocate_kernel_32.S
+++ b/arch/tile/kernel/relocate_kernel_32.S
@@ -20,15 +20,6 @@
20#include <asm/page.h> 20#include <asm/page.h>
21#include <hv/hypervisor.h> 21#include <hv/hypervisor.h>
22 22
23#define ___hvb MEM_SV_INTRPT + HV_GLUE_START_CPA
24
25#define ___hv_dispatch(f) (___hvb + (HV_DISPATCH_ENTRY_SIZE * f))
26
27#define ___hv_console_putc ___hv_dispatch(HV_DISPATCH_CONSOLE_PUTC)
28#define ___hv_halt ___hv_dispatch(HV_DISPATCH_HALT)
29#define ___hv_reexec ___hv_dispatch(HV_DISPATCH_REEXEC)
30#define ___hv_flush_remote ___hv_dispatch(HV_DISPATCH_FLUSH_REMOTE)
31
32#undef RELOCATE_NEW_KERNEL_VERBOSE 23#undef RELOCATE_NEW_KERNEL_VERBOSE
33 24
34STD_ENTRY(relocate_new_kernel) 25STD_ENTRY(relocate_new_kernel)
@@ -43,8 +34,8 @@ STD_ENTRY(relocate_new_kernel)
43 addi sp, sp, -8 34 addi sp, sp, -8
44 /* we now have a stack (whether we need one or not) */ 35 /* we now have a stack (whether we need one or not) */
45 36
46 moveli r40, lo16(___hv_console_putc) 37 moveli r40, lo16(hv_console_putc)
47 auli r40, r40, ha16(___hv_console_putc) 38 auli r40, r40, ha16(hv_console_putc)
48 39
49#ifdef RELOCATE_NEW_KERNEL_VERBOSE 40#ifdef RELOCATE_NEW_KERNEL_VERBOSE
50 moveli r0, 'r' 41 moveli r0, 'r'
@@ -114,11 +105,11 @@ STD_ENTRY(relocate_new_kernel)
114 } 105 }
115 { 106 {
116 move r8, zero /* asids */ 107 move r8, zero /* asids */
117 moveli r20, lo16(___hv_flush_remote) 108 moveli r20, lo16(hv_flush_remote)
118 } 109 }
119 { 110 {
120 move r9, zero /* asidcount */ 111 move r9, zero /* asidcount */
121 auli r20, r20, ha16(___hv_flush_remote) 112 auli r20, r20, ha16(hv_flush_remote)
122 } 113 }
123 114
124 jalr r20 115 jalr r20
@@ -175,8 +166,8 @@ STD_ENTRY(relocate_new_kernel)
175 move r0, r32 166 move r0, r32
176 moveli r1, 0 /* arg to hv_reexec is 64 bits */ 167 moveli r1, 0 /* arg to hv_reexec is 64 bits */
177 168
178 moveli r41, lo16(___hv_reexec) 169 moveli r41, lo16(hv_reexec)
179 auli r41, r41, ha16(___hv_reexec) 170 auli r41, r41, ha16(hv_reexec)
180 171
181 jalr r41 172 jalr r41
182 173
@@ -267,8 +258,8 @@ STD_ENTRY(relocate_new_kernel)
267 moveli r0, '\n' 258 moveli r0, '\n'
268 jalr r40 259 jalr r40
269.Lhalt: 260.Lhalt:
270 moveli r41, lo16(___hv_halt) 261 moveli r41, lo16(hv_halt)
271 auli r41, r41, ha16(___hv_halt) 262 auli r41, r41, ha16(hv_halt)
272 263
273 jalr r41 264 jalr r41
274 STD_ENDPROC(relocate_new_kernel) 265 STD_ENDPROC(relocate_new_kernel)