aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/tile/Kconfig.debug8
-rw-r--r--arch/tile/kernel/Makefile3
-rw-r--r--arch/tile/kernel/head_32.S8
-rw-r--r--arch/tile/kernel/head_64.S8
-rw-r--r--arch/tile/kernel/hvglue.S74
-rw-r--r--arch/tile/kernel/hvglue.lds60
-rw-r--r--arch/tile/kernel/hvglue_trace.c266
-rw-r--r--arch/tile/kernel/intvec_32.S2
-rw-r--r--arch/tile/kernel/intvec_64.S2
-rw-r--r--arch/tile/kernel/vmlinux.lds.S5
-rw-r--r--arch/tile/mm/migrate_32.S4
-rw-r--r--arch/tile/mm/migrate_64.S4
12 files changed, 368 insertions, 76 deletions
diff --git a/arch/tile/Kconfig.debug b/arch/tile/Kconfig.debug
index 9165ea979e85..b8d69f2757a1 100644
--- a/arch/tile/Kconfig.debug
+++ b/arch/tile/Kconfig.debug
@@ -24,4 +24,12 @@ config DEBUG_EXTRA_FLAGS
24 size and build time noticeably. Such flags are often 24 size and build time noticeably. Such flags are often
25 helpful if the main use of debug info is line number info. 25 helpful if the main use of debug info is line number info.
26 26
27config TILE_HVGLUE_TRACE
28 bool "Provide wrapper functions for hypervisor ABI calls"
29 default n
30 help
31 Provide wrapper functions for the hypervisor ABI calls
32 defined in arch/tile/kernel/hvglue.S. This allows tracing
33 mechanisms, etc., to have visibility into those calls.
34
27endmenu 35endmenu
diff --git a/arch/tile/kernel/Makefile b/arch/tile/kernel/Makefile
index 5157d1c4b4ed..c4a957aad26a 100644
--- a/arch/tile/kernel/Makefile
+++ b/arch/tile/kernel/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5extra-y := vmlinux.lds head_$(BITS).o 5extra-y := vmlinux.lds head_$(BITS).o
6obj-y := backtrace.o entry.o irq.o messaging.o \ 6obj-y := backtrace.o entry.o hvglue.o irq.o messaging.o \
7 pci-dma.o proc.o process.o ptrace.o reboot.o \ 7 pci-dma.o proc.o process.o ptrace.o reboot.o \
8 setup.o signal.o single_step.o stack.o sys.o \ 8 setup.o signal.o single_step.o stack.o sys.o \
9 sysfs.o time.o traps.o unaligned.o vdso.o \ 9 sysfs.o time.o traps.o unaligned.o vdso.o \
@@ -21,5 +21,6 @@ else
21obj-$(CONFIG_PCI) += pci.o 21obj-$(CONFIG_PCI) += pci.o
22endif 22endif
23obj-$(CONFIG_TILE_USB) += usb.o 23obj-$(CONFIG_TILE_USB) += usb.o
24obj-$(CONFIG_TILE_HVGLUE_TRACE) += hvglue_trace.o
24 25
25obj-y += vdso/ 26obj-y += vdso/
diff --git a/arch/tile/kernel/head_32.S b/arch/tile/kernel/head_32.S
index 80cd407925cd..d1527fce2861 100644
--- a/arch/tile/kernel/head_32.S
+++ b/arch/tile/kernel/head_32.S
@@ -39,12 +39,12 @@ ENTRY(_start)
39 } 39 }
40 { 40 {
41 moveli r0, _HV_VERSION_OLD_HV_INIT 41 moveli r0, _HV_VERSION_OLD_HV_INIT
42 jal hv_init 42 jal _hv_init
43 } 43 }
44 /* Get a reasonable default ASID in r0 */ 44 /* Get a reasonable default ASID in r0 */
45 { 45 {
46 move r0, zero 46 move r0, zero
47 jal hv_inquire_asid 47 jal _hv_inquire_asid
48 } 48 }
49 /* Install the default page table */ 49 /* Install the default page table */
50 { 50 {
@@ -73,12 +73,12 @@ ENTRY(_start)
73 } 73 }
74 { 74 {
75 auli lr, lr, ha16(1f) 75 auli lr, lr, ha16(1f)
76 j hv_install_context 76 j _hv_install_context
77 } 77 }
781: 781:
79 79
80 /* Get our processor number and save it away in SAVE_K_0. */ 80 /* Get our processor number and save it away in SAVE_K_0. */
81 jal hv_inquire_topology 81 jal _hv_inquire_topology
82 mulll_uu r4, r1, r2 /* r1 == y, r2 == width */ 82 mulll_uu r4, r1, r2 /* r1 == y, r2 == width */
83 add r4, r4, r0 /* r0 == x, so r4 == cpu == y*width + x */ 83 add r4, r4, r0 /* r0 == x, so r4 == cpu == y*width + x */
84 84
diff --git a/arch/tile/kernel/head_64.S b/arch/tile/kernel/head_64.S
index ed51320847ce..969e4f81f3b3 100644
--- a/arch/tile/kernel/head_64.S
+++ b/arch/tile/kernel/head_64.S
@@ -55,11 +55,11 @@ ENTRY(_start)
55 movei r2, TILE_CHIP_REV 55 movei r2, TILE_CHIP_REV
56 movei r3, KERNEL_PL 56 movei r3, KERNEL_PL
57 } 57 }
58 jal hv_init 58 jal _hv_init
59 /* Get a reasonable default ASID in r0 */ 59 /* Get a reasonable default ASID in r0 */
60 { 60 {
61 move r0, zero 61 move r0, zero
62 jal hv_inquire_asid 62 jal _hv_inquire_asid
63 } 63 }
64 64
65 /* 65 /*
@@ -130,7 +130,7 @@ ENTRY(_start)
130 } 130 }
131 { 131 {
132 moveli r3, CTX_PAGE_FLAG 132 moveli r3, CTX_PAGE_FLAG
133 j hv_install_context 133 j _hv_install_context
134 } 134 }
1351: 1351:
136 136
@@ -141,7 +141,7 @@ ENTRY(_start)
141 mtspr SPR_INTERRUPT_VECTOR_BASE_K, r0 141 mtspr SPR_INTERRUPT_VECTOR_BASE_K, r0
142 142
143 /* Get our processor number and save it away in SAVE_K_0. */ 143 /* Get our processor number and save it away in SAVE_K_0. */
144 jal hv_inquire_topology 144 jal _hv_inquire_topology
145 { 145 {
146 GET_FIRST_INT(r5, r1) /* r5 = width */ 146 GET_FIRST_INT(r5, r1) /* r5 = width */
147 GET_SECOND_INT(r4, r0) /* r4 = y */ 147 GET_SECOND_INT(r4, r0) /* r4 = y */
diff --git a/arch/tile/kernel/hvglue.S b/arch/tile/kernel/hvglue.S
new file mode 100644
index 000000000000..2ab456622391
--- /dev/null
+++ b/arch/tile/kernel/hvglue.S
@@ -0,0 +1,74 @@
1/* Hypervisor call vector addresses; see <hv/hypervisor.h> */
2.macro gensym sym, val, size
3.org \val
4.global _\sym
5.type _\sym,function
6_\sym:
7.size _\sym,\size
8#ifndef CONFIG_TILE_HVGLUE_TRACE
9.globl \sym
10.set \sym,_\sym
11#endif
12.endm
13
14.section .hvglue,"x",@nobits
15.align 8
16gensym hv_init, 0x20, 32
17gensym hv_install_context, 0x40, 32
18gensym hv_sysconf, 0x60, 32
19gensym hv_get_rtc, 0x80, 32
20gensym hv_set_rtc, 0xa0, 32
21gensym hv_flush_asid, 0xc0, 32
22gensym hv_flush_page, 0xe0, 32
23gensym hv_flush_pages, 0x100, 32
24gensym hv_restart, 0x120, 32
25gensym hv_halt, 0x140, 32
26gensym hv_power_off, 0x160, 32
27gensym hv_inquire_physical, 0x180, 32
28gensym hv_inquire_memory_controller, 0x1a0, 32
29gensym hv_inquire_virtual, 0x1c0, 32
30gensym hv_inquire_asid, 0x1e0, 32
31gensym hv_nanosleep, 0x200, 32
32gensym hv_console_read_if_ready, 0x220, 32
33gensym hv_console_write, 0x240, 32
34gensym hv_downcall_dispatch, 0x260, 32
35gensym hv_inquire_topology, 0x280, 32
36gensym hv_fs_findfile, 0x2a0, 32
37gensym hv_fs_fstat, 0x2c0, 32
38gensym hv_fs_pread, 0x2e0, 32
39gensym hv_physaddr_read64, 0x300, 32
40gensym hv_physaddr_write64, 0x320, 32
41gensym hv_get_command_line, 0x340, 32
42gensym hv_set_caching, 0x360, 32
43gensym hv_bzero_page, 0x380, 32
44gensym hv_register_message_state, 0x3a0, 32
45gensym hv_send_message, 0x3c0, 32
46gensym hv_receive_message, 0x3e0, 32
47gensym hv_inquire_context, 0x400, 32
48gensym hv_start_all_tiles, 0x420, 32
49gensym hv_dev_open, 0x440, 32
50gensym hv_dev_close, 0x460, 32
51gensym hv_dev_pread, 0x480, 32
52gensym hv_dev_pwrite, 0x4a0, 32
53gensym hv_dev_poll, 0x4c0, 32
54gensym hv_dev_poll_cancel, 0x4e0, 32
55gensym hv_dev_preada, 0x500, 32
56gensym hv_dev_pwritea, 0x520, 32
57gensym hv_flush_remote, 0x540, 32
58gensym hv_console_putc, 0x560, 32
59gensym hv_inquire_tiles, 0x580, 32
60gensym hv_confstr, 0x5a0, 32
61gensym hv_reexec, 0x5c0, 32
62gensym hv_set_command_line, 0x5e0, 32
63gensym hv_clear_intr, 0x600, 32
64gensym hv_enable_intr, 0x620, 32
65gensym hv_disable_intr, 0x640, 32
66gensym hv_raise_intr, 0x660, 32
67gensym hv_trigger_ipi, 0x680, 32
68gensym hv_store_mapping, 0x6a0, 32
69gensym hv_inquire_realpa, 0x6c0, 32
70gensym hv_flush_all, 0x6e0, 32
71gensym hv_get_ipi_pte, 0x700, 32
72gensym hv_set_pte_super_shift, 0x720, 32
73gensym hv_console_set_ipi, 0x7e0, 32
74gensym hv_glue_internals, 0x800, 30720
diff --git a/arch/tile/kernel/hvglue.lds b/arch/tile/kernel/hvglue.lds
deleted file mode 100644
index ef522900633a..000000000000
--- a/arch/tile/kernel/hvglue.lds
+++ /dev/null
@@ -1,60 +0,0 @@
1/* Hypervisor call vector addresses; see <hv/hypervisor.h> */
2hv_init = TEXT_OFFSET + 0x10020;
3hv_install_context = TEXT_OFFSET + 0x10040;
4hv_sysconf = TEXT_OFFSET + 0x10060;
5hv_get_rtc = TEXT_OFFSET + 0x10080;
6hv_set_rtc = TEXT_OFFSET + 0x100a0;
7hv_flush_asid = TEXT_OFFSET + 0x100c0;
8hv_flush_page = TEXT_OFFSET + 0x100e0;
9hv_flush_pages = TEXT_OFFSET + 0x10100;
10hv_restart = TEXT_OFFSET + 0x10120;
11hv_halt = TEXT_OFFSET + 0x10140;
12hv_power_off = TEXT_OFFSET + 0x10160;
13hv_inquire_physical = TEXT_OFFSET + 0x10180;
14hv_inquire_memory_controller = TEXT_OFFSET + 0x101a0;
15hv_inquire_virtual = TEXT_OFFSET + 0x101c0;
16hv_inquire_asid = TEXT_OFFSET + 0x101e0;
17hv_nanosleep = TEXT_OFFSET + 0x10200;
18hv_console_read_if_ready = TEXT_OFFSET + 0x10220;
19hv_console_write = TEXT_OFFSET + 0x10240;
20hv_downcall_dispatch = TEXT_OFFSET + 0x10260;
21hv_inquire_topology = TEXT_OFFSET + 0x10280;
22hv_fs_findfile = TEXT_OFFSET + 0x102a0;
23hv_fs_fstat = TEXT_OFFSET + 0x102c0;
24hv_fs_pread = TEXT_OFFSET + 0x102e0;
25hv_physaddr_read64 = TEXT_OFFSET + 0x10300;
26hv_physaddr_write64 = TEXT_OFFSET + 0x10320;
27hv_get_command_line = TEXT_OFFSET + 0x10340;
28hv_set_caching = TEXT_OFFSET + 0x10360;
29hv_bzero_page = TEXT_OFFSET + 0x10380;
30hv_register_message_state = TEXT_OFFSET + 0x103a0;
31hv_send_message = TEXT_OFFSET + 0x103c0;
32hv_receive_message = TEXT_OFFSET + 0x103e0;
33hv_inquire_context = TEXT_OFFSET + 0x10400;
34hv_start_all_tiles = TEXT_OFFSET + 0x10420;
35hv_dev_open = TEXT_OFFSET + 0x10440;
36hv_dev_close = TEXT_OFFSET + 0x10460;
37hv_dev_pread = TEXT_OFFSET + 0x10480;
38hv_dev_pwrite = TEXT_OFFSET + 0x104a0;
39hv_dev_poll = TEXT_OFFSET + 0x104c0;
40hv_dev_poll_cancel = TEXT_OFFSET + 0x104e0;
41hv_dev_preada = TEXT_OFFSET + 0x10500;
42hv_dev_pwritea = TEXT_OFFSET + 0x10520;
43hv_flush_remote = TEXT_OFFSET + 0x10540;
44hv_console_putc = TEXT_OFFSET + 0x10560;
45hv_inquire_tiles = TEXT_OFFSET + 0x10580;
46hv_confstr = TEXT_OFFSET + 0x105a0;
47hv_reexec = TEXT_OFFSET + 0x105c0;
48hv_set_command_line = TEXT_OFFSET + 0x105e0;
49hv_clear_intr = TEXT_OFFSET + 0x10600;
50hv_enable_intr = TEXT_OFFSET + 0x10620;
51hv_disable_intr = TEXT_OFFSET + 0x10640;
52hv_raise_intr = TEXT_OFFSET + 0x10660;
53hv_trigger_ipi = TEXT_OFFSET + 0x10680;
54hv_store_mapping = TEXT_OFFSET + 0x106a0;
55hv_inquire_realpa = TEXT_OFFSET + 0x106c0;
56hv_flush_all = TEXT_OFFSET + 0x106e0;
57hv_get_ipi_pte = TEXT_OFFSET + 0x10700;
58hv_set_pte_super_shift = TEXT_OFFSET + 0x10720;
59hv_console_set_ipi = TEXT_OFFSET + 0x107e0;
60hv_glue_internals = TEXT_OFFSET + 0x10800;
diff --git a/arch/tile/kernel/hvglue_trace.c b/arch/tile/kernel/hvglue_trace.c
new file mode 100644
index 000000000000..85c74ad29312
--- /dev/null
+++ b/arch/tile/kernel/hvglue_trace.c
@@ -0,0 +1,266 @@
1/*
2 * Copyright 2013 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15/*
16 * Pull in the hypervisor header so we declare all the ABI functions
17 * with the underscore versions, then undef the names so that we can
18 * provide our own wrapper versions.
19 */
20#define hv_init _hv_init
21#define hv_install_context _hv_install_context
22#define hv_sysconf _hv_sysconf
23#define hv_get_rtc _hv_get_rtc
24#define hv_set_rtc _hv_set_rtc
25#define hv_flush_asid _hv_flush_asid
26#define hv_flush_page _hv_flush_page
27#define hv_flush_pages _hv_flush_pages
28#define hv_restart _hv_restart
29#define hv_halt _hv_halt
30#define hv_power_off _hv_power_off
31#define hv_inquire_physical _hv_inquire_physical
32#define hv_inquire_memory_controller _hv_inquire_memory_controller
33#define hv_inquire_virtual _hv_inquire_virtual
34#define hv_inquire_asid _hv_inquire_asid
35#define hv_nanosleep _hv_nanosleep
36#define hv_console_read_if_ready _hv_console_read_if_ready
37#define hv_console_write _hv_console_write
38#define hv_downcall_dispatch _hv_downcall_dispatch
39#define hv_inquire_topology _hv_inquire_topology
40#define hv_fs_findfile _hv_fs_findfile
41#define hv_fs_fstat _hv_fs_fstat
42#define hv_fs_pread _hv_fs_pread
43#define hv_physaddr_read64 _hv_physaddr_read64
44#define hv_physaddr_write64 _hv_physaddr_write64
45#define hv_get_command_line _hv_get_command_line
46#define hv_set_caching _hv_set_caching
47#define hv_bzero_page _hv_bzero_page
48#define hv_register_message_state _hv_register_message_state
49#define hv_send_message _hv_send_message
50#define hv_receive_message _hv_receive_message
51#define hv_inquire_context _hv_inquire_context
52#define hv_start_all_tiles _hv_start_all_tiles
53#define hv_dev_open _hv_dev_open
54#define hv_dev_close _hv_dev_close
55#define hv_dev_pread _hv_dev_pread
56#define hv_dev_pwrite _hv_dev_pwrite
57#define hv_dev_poll _hv_dev_poll
58#define hv_dev_poll_cancel _hv_dev_poll_cancel
59#define hv_dev_preada _hv_dev_preada
60#define hv_dev_pwritea _hv_dev_pwritea
61#define hv_flush_remote _hv_flush_remote
62#define hv_console_putc _hv_console_putc
63#define hv_inquire_tiles _hv_inquire_tiles
64#define hv_confstr _hv_confstr
65#define hv_reexec _hv_reexec
66#define hv_set_command_line _hv_set_command_line
67#define hv_clear_intr _hv_clear_intr
68#define hv_enable_intr _hv_enable_intr
69#define hv_disable_intr _hv_disable_intr
70#define hv_raise_intr _hv_raise_intr
71#define hv_trigger_ipi _hv_trigger_ipi
72#define hv_store_mapping _hv_store_mapping
73#define hv_inquire_realpa _hv_inquire_realpa
74#define hv_flush_all _hv_flush_all
75#define hv_get_ipi_pte _hv_get_ipi_pte
76#define hv_set_pte_super_shift _hv_set_pte_super_shift
77#define hv_console_set_ipi _hv_console_set_ipi
78#include <hv/hypervisor.h>
79#undef hv_init
80#undef hv_install_context
81#undef hv_sysconf
82#undef hv_get_rtc
83#undef hv_set_rtc
84#undef hv_flush_asid
85#undef hv_flush_page
86#undef hv_flush_pages
87#undef hv_restart
88#undef hv_halt
89#undef hv_power_off
90#undef hv_inquire_physical
91#undef hv_inquire_memory_controller
92#undef hv_inquire_virtual
93#undef hv_inquire_asid
94#undef hv_nanosleep
95#undef hv_console_read_if_ready
96#undef hv_console_write
97#undef hv_downcall_dispatch
98#undef hv_inquire_topology
99#undef hv_fs_findfile
100#undef hv_fs_fstat
101#undef hv_fs_pread
102#undef hv_physaddr_read64
103#undef hv_physaddr_write64
104#undef hv_get_command_line
105#undef hv_set_caching
106#undef hv_bzero_page
107#undef hv_register_message_state
108#undef hv_send_message
109#undef hv_receive_message
110#undef hv_inquire_context
111#undef hv_start_all_tiles
112#undef hv_dev_open
113#undef hv_dev_close
114#undef hv_dev_pread
115#undef hv_dev_pwrite
116#undef hv_dev_poll
117#undef hv_dev_poll_cancel
118#undef hv_dev_preada
119#undef hv_dev_pwritea
120#undef hv_flush_remote
121#undef hv_console_putc
122#undef hv_inquire_tiles
123#undef hv_confstr
124#undef hv_reexec
125#undef hv_set_command_line
126#undef hv_clear_intr
127#undef hv_enable_intr
128#undef hv_disable_intr
129#undef hv_raise_intr
130#undef hv_trigger_ipi
131#undef hv_store_mapping
132#undef hv_inquire_realpa
133#undef hv_flush_all
134#undef hv_get_ipi_pte
135#undef hv_set_pte_super_shift
136#undef hv_console_set_ipi
137
138/*
139 * Provide macros based on <linux/syscalls.h> to provide a wrapper
140 * function that invokes the same function with an underscore prefix.
141 * We can't use the existing __SC_xxx macros because we need to
142 * support up to nine arguments rather than up to six, and also this
143 * way the file stands alone from possible changes in the
144 * implementation of <linux/syscalls.h>.
145 */
146#define HV_WRAP0(type, name) \
147 type name(void); \
148 type name(void) \
149 { \
150 return _##name(); \
151 }
152#define __HV_DECL1(t1, a1) t1 a1
153#define __HV_DECL2(t2, a2, ...) t2 a2, __HV_DECL1(__VA_ARGS__)
154#define __HV_DECL3(t3, a3, ...) t3 a3, __HV_DECL2(__VA_ARGS__)
155#define __HV_DECL4(t4, a4, ...) t4 a4, __HV_DECL3(__VA_ARGS__)
156#define __HV_DECL5(t5, a5, ...) t5 a5, __HV_DECL4(__VA_ARGS__)
157#define __HV_DECL6(t6, a6, ...) t6 a6, __HV_DECL5(__VA_ARGS__)
158#define __HV_DECL7(t7, a7, ...) t7 a7, __HV_DECL6(__VA_ARGS__)
159#define __HV_DECL8(t8, a8, ...) t8 a8, __HV_DECL7(__VA_ARGS__)
160#define __HV_DECL9(t9, a9, ...) t9 a9, __HV_DECL8(__VA_ARGS__)
161#define __HV_PASS1(t1, a1) a1
162#define __HV_PASS2(t2, a2, ...) a2, __HV_PASS1(__VA_ARGS__)
163#define __HV_PASS3(t3, a3, ...) a3, __HV_PASS2(__VA_ARGS__)
164#define __HV_PASS4(t4, a4, ...) a4, __HV_PASS3(__VA_ARGS__)
165#define __HV_PASS5(t5, a5, ...) a5, __HV_PASS4(__VA_ARGS__)
166#define __HV_PASS6(t6, a6, ...) a6, __HV_PASS5(__VA_ARGS__)
167#define __HV_PASS7(t7, a7, ...) a7, __HV_PASS6(__VA_ARGS__)
168#define __HV_PASS8(t8, a8, ...) a8, __HV_PASS7(__VA_ARGS__)
169#define __HV_PASS9(t9, a9, ...) a9, __HV_PASS8(__VA_ARGS__)
170#define HV_WRAPx(x, type, name, ...) \
171 type name(__HV_DECL##x(__VA_ARGS__)); \
172 type name(__HV_DECL##x(__VA_ARGS__)) \
173 { \
174 return _##name(__HV_PASS##x(__VA_ARGS__)); \
175 }
176#define HV_WRAP1(type, name, ...) HV_WRAPx(1, type, name, __VA_ARGS__)
177#define HV_WRAP2(type, name, ...) HV_WRAPx(2, type, name, __VA_ARGS__)
178#define HV_WRAP3(type, name, ...) HV_WRAPx(3, type, name, __VA_ARGS__)
179#define HV_WRAP4(type, name, ...) HV_WRAPx(4, type, name, __VA_ARGS__)
180#define HV_WRAP5(type, name, ...) HV_WRAPx(5, type, name, __VA_ARGS__)
181#define HV_WRAP6(type, name, ...) HV_WRAPx(6, type, name, __VA_ARGS__)
182#define HV_WRAP7(type, name, ...) HV_WRAPx(7, type, name, __VA_ARGS__)
183#define HV_WRAP8(type, name, ...) HV_WRAPx(8, type, name, __VA_ARGS__)
184#define HV_WRAP9(type, name, ...) HV_WRAPx(9, type, name, __VA_ARGS__)
185
186/* List all the hypervisor API functions. */
187HV_WRAP4(void, hv_init, HV_VersionNumber, interface_version_number,
188 int, chip_num, int, chip_rev_num, int, client_pl)
189HV_WRAP1(long, hv_sysconf, HV_SysconfQuery, query)
190HV_WRAP3(int, hv_confstr, HV_ConfstrQuery, query, HV_VirtAddr, buf, int, len)
191#if CHIP_HAS_IPI()
192HV_WRAP3(int, hv_get_ipi_pte, HV_Coord, tile, int, pl, HV_PTE*, pte)
193HV_WRAP3(int, hv_console_set_ipi, int, ipi, int, event, HV_Coord, coord);
194#else
195HV_WRAP1(void, hv_enable_intr, HV_IntrMask, enab_mask)
196HV_WRAP1(void, hv_disable_intr, HV_IntrMask, disab_mask)
197HV_WRAP1(void, hv_clear_intr, HV_IntrMask, clear_mask)
198HV_WRAP1(void, hv_raise_intr, HV_IntrMask, raise_mask)
199HV_WRAP2(HV_Errno, hv_trigger_ipi, HV_Coord, tile, int, interrupt)
200#endif /* !CHIP_HAS_IPI() */
201HV_WRAP3(int, hv_store_mapping, HV_VirtAddr, va, unsigned int, len,
202 HV_PhysAddr, pa)
203HV_WRAP2(HV_PhysAddr, hv_inquire_realpa, HV_PhysAddr, cpa, unsigned int, len)
204HV_WRAP0(HV_RTCTime, hv_get_rtc)
205HV_WRAP1(void, hv_set_rtc, HV_RTCTime, time)
206HV_WRAP4(int, hv_install_context, HV_PhysAddr, page_table, HV_PTE, access,
207 HV_ASID, asid, __hv32, flags)
208HV_WRAP2(int, hv_set_pte_super_shift, int, level, int, log2_count)
209HV_WRAP0(HV_Context, hv_inquire_context)
210HV_WRAP1(int, hv_flush_asid, HV_ASID, asid)
211HV_WRAP2(int, hv_flush_page, HV_VirtAddr, address, HV_PageSize, page_size)
212HV_WRAP3(int, hv_flush_pages, HV_VirtAddr, start, HV_PageSize, page_size,
213 unsigned long, size)
214HV_WRAP1(int, hv_flush_all, int, preserve_global)
215HV_WRAP2(void, hv_restart, HV_VirtAddr, cmd, HV_VirtAddr, args)
216HV_WRAP0(void, hv_halt)
217HV_WRAP0(void, hv_power_off)
218HV_WRAP1(int, hv_reexec, HV_PhysAddr, entry)
219HV_WRAP0(HV_Topology, hv_inquire_topology)
220HV_WRAP3(HV_Errno, hv_inquire_tiles, HV_InqTileSet, set, HV_VirtAddr, cpumask,
221 int, length)
222HV_WRAP1(HV_PhysAddrRange, hv_inquire_physical, int, idx)
223HV_WRAP2(HV_MemoryControllerInfo, hv_inquire_memory_controller, HV_Coord, coord,
224 int, controller)
225HV_WRAP1(HV_VirtAddrRange, hv_inquire_virtual, int, idx)
226HV_WRAP1(HV_ASIDRange, hv_inquire_asid, int, idx)
227HV_WRAP1(void, hv_nanosleep, int, nanosecs)
228HV_WRAP0(int, hv_console_read_if_ready)
229HV_WRAP1(void, hv_console_putc, int, byte)
230HV_WRAP2(int, hv_console_write, HV_VirtAddr, bytes, int, len)
231HV_WRAP0(void, hv_downcall_dispatch)
232HV_WRAP1(int, hv_fs_findfile, HV_VirtAddr, filename)
233HV_WRAP1(HV_FS_StatInfo, hv_fs_fstat, int, inode)
234HV_WRAP4(int, hv_fs_pread, int, inode, HV_VirtAddr, buf,
235 int, length, int, offset)
236HV_WRAP2(unsigned long long, hv_physaddr_read64, HV_PhysAddr, addr,
237 HV_PTE, access)
238HV_WRAP3(void, hv_physaddr_write64, HV_PhysAddr, addr, HV_PTE, access,
239 unsigned long long, val)
240HV_WRAP2(int, hv_get_command_line, HV_VirtAddr, buf, int, length)
241HV_WRAP2(HV_Errno, hv_set_command_line, HV_VirtAddr, buf, int, length)
242HV_WRAP1(void, hv_set_caching, unsigned long, bitmask)
243HV_WRAP2(void, hv_bzero_page, HV_VirtAddr, va, unsigned int, size)
244HV_WRAP1(HV_Errno, hv_register_message_state, HV_MsgState*, msgstate)
245HV_WRAP4(int, hv_send_message, HV_Recipient *, recips, int, nrecip,
246 HV_VirtAddr, buf, int, buflen)
247HV_WRAP3(HV_RcvMsgInfo, hv_receive_message, HV_MsgState, msgstate,
248 HV_VirtAddr, buf, int, buflen)
249HV_WRAP0(void, hv_start_all_tiles)
250HV_WRAP2(int, hv_dev_open, HV_VirtAddr, name, __hv32, flags)
251HV_WRAP1(int, hv_dev_close, int, devhdl)
252HV_WRAP5(int, hv_dev_pread, int, devhdl, __hv32, flags, HV_VirtAddr, va,
253 __hv32, len, __hv64, offset)
254HV_WRAP5(int, hv_dev_pwrite, int, devhdl, __hv32, flags, HV_VirtAddr, va,
255 __hv32, len, __hv64, offset)
256HV_WRAP3(int, hv_dev_poll, int, devhdl, __hv32, events, HV_IntArg, intarg)
257HV_WRAP1(int, hv_dev_poll_cancel, int, devhdl)
258HV_WRAP6(int, hv_dev_preada, int, devhdl, __hv32, flags, __hv32, sgl_len,
259 HV_SGL *, sglp, __hv64, offset, HV_IntArg, intarg)
260HV_WRAP6(int, hv_dev_pwritea, int, devhdl, __hv32, flags, __hv32, sgl_len,
261 HV_SGL *, sglp, __hv64, offset, HV_IntArg, intarg)
262HV_WRAP9(int, hv_flush_remote, HV_PhysAddr, cache_pa,
263 unsigned long, cache_control, unsigned long*, cache_cpumask,
264 HV_VirtAddr, tlb_va, unsigned long, tlb_length,
265 unsigned long, tlb_pgsize, unsigned long*, tlb_cpumask,
266 HV_Remote_ASID*, asids, int, asidcount)
diff --git a/arch/tile/kernel/intvec_32.S b/arch/tile/kernel/intvec_32.S
index 10767655689e..9c0c3cb6aab0 100644
--- a/arch/tile/kernel/intvec_32.S
+++ b/arch/tile/kernel/intvec_32.S
@@ -758,7 +758,7 @@ intvec_\vecname:
758 .macro dc_dispatch vecnum, vecname 758 .macro dc_dispatch vecnum, vecname
759 .org (\vecnum << 8) 759 .org (\vecnum << 8)
760intvec_\vecname: 760intvec_\vecname:
761 j hv_downcall_dispatch 761 j _hv_downcall_dispatch
762 ENDPROC(intvec_\vecname) 762 ENDPROC(intvec_\vecname)
763 .endm 763 .endm
764 764
diff --git a/arch/tile/kernel/intvec_64.S b/arch/tile/kernel/intvec_64.S
index 562886db780b..df19d4f3946e 100644
--- a/arch/tile/kernel/intvec_64.S
+++ b/arch/tile/kernel/intvec_64.S
@@ -772,7 +772,7 @@ intvec_\vecname:
772 .macro dc_dispatch vecnum, vecname 772 .macro dc_dispatch vecnum, vecname
773 .org (\vecnum << 8) 773 .org (\vecnum << 8)
774intvec_\vecname: 774intvec_\vecname:
775 j hv_downcall_dispatch 775 j _hv_downcall_dispatch
776 ENDPROC(intvec_\vecname) 776 ENDPROC(intvec_\vecname)
777 .endm 777 .endm
778 778
diff --git a/arch/tile/kernel/vmlinux.lds.S b/arch/tile/kernel/vmlinux.lds.S
index a13ed902afbb..0f0edaf68f94 100644
--- a/arch/tile/kernel/vmlinux.lds.S
+++ b/arch/tile/kernel/vmlinux.lds.S
@@ -31,7 +31,10 @@ SECTIONS
31 } :intrpt1 =0 31 } :intrpt1 =0
32 32
33 /* Hypervisor call vectors */ 33 /* Hypervisor call vectors */
34 #include "hvglue.lds" 34 . = ALIGN(0x10000);
35 .hvglue : AT (ADDR(.hvglue) - LOAD_OFFSET) {
36 *(.hvglue)
37 } :NONE
35 38
36 /* Now the real code */ 39 /* Now the real code */
37 . = ALIGN(0x20000); 40 . = ALIGN(0x20000);
diff --git a/arch/tile/mm/migrate_32.S b/arch/tile/mm/migrate_32.S
index 5305814bf187..772085491bf9 100644
--- a/arch/tile/mm/migrate_32.S
+++ b/arch/tile/mm/migrate_32.S
@@ -136,7 +136,7 @@ STD_ENTRY(flush_and_install_context)
136 move r8, zero /* asids */ 136 move r8, zero /* asids */
137 move r9, zero /* asidcount */ 137 move r9, zero /* asidcount */
138 } 138 }
139 jal hv_flush_remote 139 jal _hv_flush_remote
140 bnz r0, .Ldone 140 bnz r0, .Ldone
141 141
142 /* Now install the new page table. */ 142 /* Now install the new page table. */
@@ -152,7 +152,7 @@ STD_ENTRY(flush_and_install_context)
152 move r4, r_asid 152 move r4, r_asid
153 moveli r5, HV_CTX_DIRECTIO | CTX_PAGE_FLAG 153 moveli r5, HV_CTX_DIRECTIO | CTX_PAGE_FLAG
154 } 154 }
155 jal hv_install_context 155 jal _hv_install_context
156 bnz r0, .Ldone 156 bnz r0, .Ldone
157 157
158 /* Finally, flush the TLB. */ 158 /* Finally, flush the TLB. */
diff --git a/arch/tile/mm/migrate_64.S b/arch/tile/mm/migrate_64.S
index 1d15b10833d1..a49eee38f872 100644
--- a/arch/tile/mm/migrate_64.S
+++ b/arch/tile/mm/migrate_64.S
@@ -123,7 +123,7 @@ STD_ENTRY(flush_and_install_context)
123 } 123 }
124 { 124 {
125 move r8, zero /* asidcount */ 125 move r8, zero /* asidcount */
126 jal hv_flush_remote 126 jal _hv_flush_remote
127 } 127 }
128 bnez r0, 1f 128 bnez r0, 1f
129 129
@@ -136,7 +136,7 @@ STD_ENTRY(flush_and_install_context)
136 move r2, r_asid 136 move r2, r_asid
137 moveli r3, HV_CTX_DIRECTIO | CTX_PAGE_FLAG 137 moveli r3, HV_CTX_DIRECTIO | CTX_PAGE_FLAG
138 } 138 }
139 jal hv_install_context 139 jal _hv_install_context
140 bnez r0, 1f 140 bnez r0, 1f
141 141
142 /* Finally, flush the TLB. */ 142 /* Finally, flush the TLB. */