Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4edc8f54 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar
Browse files

x86: clean up include/asm-x86/desc_64.h



White space and coding style clenaup.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 78aa1f66
Loading
Loading
Loading
Loading
+52 −45
Original line number Diff line number Diff line
@@ -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();
}