mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
x86: change write_ldt_entry signature
this patch changes the signature of write_ldt_entry. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> CC: Zachary Amsden <zach@vmware.com> CC: Jeremy Fitzhardinge <Jeremy.Fitzhardinge.citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
014b15be30
commit
75b8bb3e56
7 changed files with 30 additions and 16 deletions
|
|
@ -69,12 +69,19 @@ static inline void pack_gate(gate_desc *gate,
|
|||
#define load_TLS(t, cpu) native_load_tls(t, cpu)
|
||||
#define set_ldt native_set_ldt
|
||||
|
||||
#define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
|
||||
#define write_ldt_entry(dt, entry, desc) \
|
||||
native_write_ldt_entry(dt, entry, desc)
|
||||
#define write_gdt_entry(dt, entry, desc, type) \
|
||||
native_write_gdt_entry(dt, entry, desc, type)
|
||||
#define write_idt_entry(dt, entry, g) native_write_idt_entry(dt, entry, g)
|
||||
#endif
|
||||
|
||||
static inline void native_write_ldt_entry(struct desc_struct *ldt, int entry,
|
||||
const void *desc)
|
||||
{
|
||||
memcpy(&ldt[entry], desc, sizeof(struct desc_struct));
|
||||
}
|
||||
|
||||
static inline void native_write_idt_entry(gate_desc *idt, int entry,
|
||||
const gate_desc *gate)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,12 +34,9 @@ extern gate_desc idt_table[];
|
|||
extern struct desc_ptr cpu_gdt_descr[];
|
||||
|
||||
static inline void write_ldt_entry(struct desc_struct *ldt,
|
||||
int entry, u32 entry_low, u32 entry_high)
|
||||
int entry, void *ptr)
|
||||
{
|
||||
__u32 *lp = (__u32 *)((entry << 3) + (char *)ldt);
|
||||
|
||||
lp[0] = entry_low;
|
||||
lp[1] = entry_high;
|
||||
memcpy(&ldt[entry], ptr, 8);
|
||||
}
|
||||
|
||||
/* the cpu gdt accessor */
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ struct pv_cpu_ops {
|
|||
void (*set_ldt)(const void *desc, unsigned entries);
|
||||
unsigned long (*store_tr)(void);
|
||||
void (*load_tls)(struct thread_struct *t, unsigned int cpu);
|
||||
void (*write_ldt_entry)(struct desc_struct *,
|
||||
int entrynum, u32 low, u32 high);
|
||||
void (*write_ldt_entry)(struct desc_struct *ldt, int entrynum,
|
||||
const void *desc);
|
||||
void (*write_gdt_entry)(struct desc_struct *,
|
||||
int entrynum, const void *desc, int size);
|
||||
void (*write_idt_entry)(gate_desc *,
|
||||
|
|
@ -660,9 +660,11 @@ static inline void load_TLS(struct thread_struct *t, unsigned cpu)
|
|||
{
|
||||
PVOP_VCALL2(pv_cpu_ops.load_tls, t, cpu);
|
||||
}
|
||||
static inline void write_ldt_entry(void *dt, int entry, u32 low, u32 high)
|
||||
|
||||
static inline void write_ldt_entry(struct desc_struct *dt, int entry,
|
||||
const void *desc)
|
||||
{
|
||||
PVOP_VCALL4(pv_cpu_ops.write_ldt_entry, dt, entry, low, high);
|
||||
PVOP_VCALL3(pv_cpu_ops.write_ldt_entry, dt, entry, desc);
|
||||
}
|
||||
|
||||
static inline void write_gdt_entry(struct desc_struct *dt, int entry,
|
||||
|
|
|
|||
Loading…
Reference in a new issue