aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/desc.h15
-rw-r--r--include/asm-x86/paravirt.h13
-rw-r--r--include/linux/kernel.h2
3 files changed, 28 insertions, 2 deletions
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index a44c4dc70590..06f786f4b4fb 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -24,6 +24,11 @@ static inline void fill_ldt(struct desc_struct *desc,
24 desc->d = info->seg_32bit; 24 desc->d = info->seg_32bit;
25 desc->g = info->limit_in_pages; 25 desc->g = info->limit_in_pages;
26 desc->base2 = (info->base_addr & 0xff000000) >> 24; 26 desc->base2 = (info->base_addr & 0xff000000) >> 24;
27 /*
28 * Don't allow setting of the lm bit. It is useless anyway
29 * because 64bit system calls require __USER_CS:
30 */
31 desc->l = 0;
27} 32}
28 33
29extern struct desc_ptr idt_descr; 34extern struct desc_ptr idt_descr;
@@ -97,7 +102,15 @@ static inline int desc_empty(const void *ptr)
97 native_write_gdt_entry(dt, entry, desc, type) 102 native_write_gdt_entry(dt, entry, desc, type)
98#define write_idt_entry(dt, entry, g) \ 103#define write_idt_entry(dt, entry, g) \
99 native_write_idt_entry(dt, entry, g) 104 native_write_idt_entry(dt, entry, g)
100#endif 105
106static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
107{
108}
109
110static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
111{
112}
113#endif /* CONFIG_PARAVIRT */
101 114
102static inline void native_write_idt_entry(gate_desc *idt, int entry, 115static inline void native_write_idt_entry(gate_desc *idt, int entry,
103 const gate_desc *gate) 116 const gate_desc *gate)
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index fbbde93f12d6..db9b0647b346 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -124,6 +124,9 @@ struct pv_cpu_ops {
124 int entrynum, const void *desc, int size); 124 int entrynum, const void *desc, int size);
125 void (*write_idt_entry)(gate_desc *, 125 void (*write_idt_entry)(gate_desc *,
126 int entrynum, const gate_desc *gate); 126 int entrynum, const gate_desc *gate);
127 void (*alloc_ldt)(struct desc_struct *ldt, unsigned entries);
128 void (*free_ldt)(struct desc_struct *ldt, unsigned entries);
129
127 void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t); 130 void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t);
128 131
129 void (*set_iopl_mask)(unsigned mask); 132 void (*set_iopl_mask)(unsigned mask);
@@ -824,6 +827,16 @@ do { \
824 (aux) = __aux; \ 827 (aux) = __aux; \
825} while (0) 828} while (0)
826 829
830static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)
831{
832 PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries);
833}
834
835static inline void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries)
836{
837 PVOP_VCALL2(pv_cpu_ops.free_ldt, ldt, entries);
838}
839
827static inline void load_TR_desc(void) 840static inline void load_TR_desc(void)
828{ 841{
829 PVOP_VCALL0(pv_cpu_ops.load_tr_desc); 842 PVOP_VCALL0(pv_cpu_ops.load_tr_desc);
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index fdbbf72ca2eb..7889c2f9b75d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -176,7 +176,7 @@ extern int vsscanf(const char *, const char *, va_list)
176 176
177extern int get_option(char **str, int *pint); 177extern int get_option(char **str, int *pint);
178extern char *get_options(const char *str, int nints, int *ints); 178extern char *get_options(const char *str, int nints, int *ints);
179extern unsigned long long memparse(char *ptr, char **retptr); 179extern unsigned long long memparse(const char *ptr, char **retptr);
180 180
181extern int core_kernel_text(unsigned long addr); 181extern int core_kernel_text(unsigned long addr);
182extern int __kernel_text_address(unsigned long addr); 182extern int __kernel_text_address(unsigned long addr);