diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2009-03-04 07:05:34 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2009-03-26 13:48:33 -0400 |
commit | dd97d5cb540939602cba9af6f88e883a6fe451f0 (patch) | |
tree | 8425ba5692e3fe9175ed10ce85d02ef4a77dedd8 /arch/ia64/kernel/patch.c | |
parent | ac93925acbf841d70a95ab576b76b15a34d194eb (diff) |
ia64/pv_ops: add hooks to paravirtualize fsyscall implementation.
Add two hooks, paravirt_get_fsyscall_table() and
paravirt_get_fsys_bubble_doen() to paravirtualize fsyscall implementation.
This patch just add the hooks fsyscall and don't paravirtualize it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/patch.c')
-rw-r--r-- | arch/ia64/kernel/patch.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index b83b2c516008..02dd977436fc 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/string.h> | 8 | #include <linux/string.h> |
9 | 9 | ||
10 | #include <asm/paravirt.h> | ||
10 | #include <asm/patch.h> | 11 | #include <asm/patch.h> |
11 | #include <asm/processor.h> | 12 | #include <asm/processor.h> |
12 | #include <asm/sections.h> | 13 | #include <asm/sections.h> |
@@ -169,16 +170,35 @@ ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) | |||
169 | ia64_srlz_i(); | 170 | ia64_srlz_i(); |
170 | } | 171 | } |
171 | 172 | ||
173 | extern unsigned long ia64_native_fsyscall_table[NR_syscalls]; | ||
174 | extern char ia64_native_fsys_bubble_down[]; | ||
175 | struct pv_fsys_data pv_fsys_data __initdata = { | ||
176 | .fsyscall_table = (unsigned long *)ia64_native_fsyscall_table, | ||
177 | .fsys_bubble_down = (void *)ia64_native_fsys_bubble_down, | ||
178 | }; | ||
179 | |||
180 | unsigned long * __init | ||
181 | paravirt_get_fsyscall_table(void) | ||
182 | { | ||
183 | return pv_fsys_data.fsyscall_table; | ||
184 | } | ||
185 | |||
186 | char * __init | ||
187 | paravirt_get_fsys_bubble_down(void) | ||
188 | { | ||
189 | return pv_fsys_data.fsys_bubble_down; | ||
190 | } | ||
191 | |||
172 | static void __init | 192 | static void __init |
173 | patch_fsyscall_table (unsigned long start, unsigned long end) | 193 | patch_fsyscall_table (unsigned long start, unsigned long end) |
174 | { | 194 | { |
175 | extern unsigned long fsyscall_table[NR_syscalls]; | 195 | u64 fsyscall_table = (u64)paravirt_get_fsyscall_table(); |
176 | s32 *offp = (s32 *) start; | 196 | s32 *offp = (s32 *) start; |
177 | u64 ip; | 197 | u64 ip; |
178 | 198 | ||
179 | while (offp < (s32 *) end) { | 199 | while (offp < (s32 *) end) { |
180 | ip = (u64) ia64_imva((char *) offp + *offp); | 200 | ip = (u64) ia64_imva((char *) offp + *offp); |
181 | ia64_patch_imm64(ip, (u64) fsyscall_table); | 201 | ia64_patch_imm64(ip, fsyscall_table); |
182 | ia64_fc((void *) ip); | 202 | ia64_fc((void *) ip); |
183 | ++offp; | 203 | ++offp; |
184 | } | 204 | } |
@@ -189,7 +209,7 @@ patch_fsyscall_table (unsigned long start, unsigned long end) | |||
189 | static void __init | 209 | static void __init |
190 | patch_brl_fsys_bubble_down (unsigned long start, unsigned long end) | 210 | patch_brl_fsys_bubble_down (unsigned long start, unsigned long end) |
191 | { | 211 | { |
192 | extern char fsys_bubble_down[]; | 212 | u64 fsys_bubble_down = (u64)paravirt_get_fsys_bubble_down(); |
193 | s32 *offp = (s32 *) start; | 213 | s32 *offp = (s32 *) start; |
194 | u64 ip; | 214 | u64 ip; |
195 | 215 | ||