aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/paravirt_privop.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2008-05-27 18:08:01 -0400
committerTony Luck <tony.luck@intel.com>2008-05-27 18:08:01 -0400
commit4df8d22bbbb16ccfa4e10cc068135183c9e5e006 (patch)
tree6c989c6c493b9487311831218810e5e84886190d /include/asm-ia64/paravirt_privop.h
parent498c5170472ff0c03a29d22dbd33225a0be038f4 (diff)
[IA64] pvops: paravirtualize entry.S
paravirtualize ia64_swtich_to, ia64_leave_syscall and ia64_leave_kernel. They include sensitive or performance critical privileged instructions so that they need paravirtualization. To paravirtualize them by single source and multi compile they are converted into indirect jump. And define each pv instances. Cc: Keith Owens <kaos@ocs.com.au> Cc: "Dong, Eddie" <eddie.dong@intel.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/paravirt_privop.h')
-rw-r--r--include/asm-ia64/paravirt_privop.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/asm-ia64/paravirt_privop.h b/include/asm-ia64/paravirt_privop.h
index 7b133ae86df0..52482e6940ac 100644
--- a/include/asm-ia64/paravirt_privop.h
+++ b/include/asm-ia64/paravirt_privop.h
@@ -80,12 +80,35 @@ extern unsigned long ia64_native_getreg_func(int regnum);
80 ia64_native_rsm(mask); \ 80 ia64_native_rsm(mask); \
81 } while (0) 81 } while (0)
82 82
83/******************************************************************************
84 * replacement of hand written assembly codes.
85 */
86struct pv_cpu_asm_switch {
87 unsigned long switch_to;
88 unsigned long leave_syscall;
89 unsigned long work_processed_syscall;
90 unsigned long leave_kernel;
91};
92void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
93
83#endif /* __ASSEMBLY__ */ 94#endif /* __ASSEMBLY__ */
84 95
96#define IA64_PARAVIRT_ASM_FUNC(name) paravirt_ ## name
97
85#else 98#else
86 99
87/* fallback for native case */ 100/* fallback for native case */
101#define IA64_PARAVIRT_ASM_FUNC(name) ia64_native_ ## name
88 102
89#endif /* CONFIG_PARAVIRT */ 103#endif /* CONFIG_PARAVIRT */
90 104
105/* these routines utilize privilege-sensitive or performance-sensitive
106 * privileged instructions so the code must be replaced with
107 * paravirtualized versions */
108#define ia64_switch_to IA64_PARAVIRT_ASM_FUNC(switch_to)
109#define ia64_leave_syscall IA64_PARAVIRT_ASM_FUNC(leave_syscall)
110#define ia64_work_processed_syscall \
111 IA64_PARAVIRT_ASM_FUNC(work_processed_syscall)
112#define ia64_leave_kernel IA64_PARAVIRT_ASM_FUNC(leave_kernel)
113
91#endif /* _ASM_IA64_PARAVIRT_PRIVOP_H */ 114#endif /* _ASM_IA64_PARAVIRT_PRIVOP_H */