x86: clean up include/asm-x86/desc_64.h
White space and coding style clenaup. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
78aa1f66f7
commit
4edc8f5454
@@ -51,9 +51,11 @@ static inline void store_gdt(struct desc_ptr *ptr)
|
||||
asm("sgdt %w0":"=m" (*ptr));
|
||||
}
|
||||
|
||||
static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsigned dpl, unsigned ist)
|
||||
static inline void _set_gate(void *adr, unsigned type, unsigned long func,
|
||||
unsigned dpl, unsigned ist)
|
||||
{
|
||||
struct gate_struct s;
|
||||
|
||||
s.offset_low = PTR_LOW(func);
|
||||
s.segment = __KERNEL_CS;
|
||||
s.ist = ist;
|
||||
@@ -64,7 +66,10 @@ static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsig
|
||||
s.type = type;
|
||||
s.offset_middle = PTR_MIDDLE(func);
|
||||
s.offset_high = PTR_HIGH(func);
|
||||
/* does not need to be atomic because it is only done once at setup time */
|
||||
/*
|
||||
* does not need to be atomic because it is only done once at
|
||||
* setup time
|
||||
*/
|
||||
memcpy(adr, &s, 16);
|
||||
}
|
||||
|
||||
@@ -101,10 +106,11 @@ static inline void store_idt(struct desc_ptr *dtr)
|
||||
asm("sidt %w0":"=m" (*dtr));
|
||||
}
|
||||
|
||||
static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned type,
|
||||
unsigned size)
|
||||
static inline void set_tssldt_descriptor(void *ptr, unsigned long tss,
|
||||
unsigned type, unsigned size)
|
||||
{
|
||||
struct ldttss_desc d;
|
||||
|
||||
memset(&d, 0, sizeof(d));
|
||||
d.limit0 = size & 0xFFFF;
|
||||
d.base0 = PTR_LOW(tss);
|
||||
@@ -193,6 +199,7 @@ static inline void load_LDT_nolock (mm_context_t *pc, int cpu)
|
||||
static inline void load_LDT(mm_context_t *pc)
|
||||
{
|
||||
int cpu = get_cpu();
|
||||
|
||||
load_LDT_nolock(pc, cpu);
|
||||
put_cpu();
|
||||
}
|
||||
|
Reference in New Issue
Block a user