Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79941
b: refs/heads/master
c: a6b4655
h: refs/heads/master
i:
  79939: bc8d1d9
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Jan 30, 2008
1 parent 783f5bc commit ec9e959
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 43 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d89542229b657bdcce6a6f76168f9098ee3e9344
refs/heads/master: a6b4655258efd39b590e519815ed43bb74cd7188
21 changes: 21 additions & 0 deletions trunk/include/asm-x86/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \
#define set_base(ldt, base) _set_base(((char *)&(ldt)) , (base))
#define set_limit(ldt, limit) _set_limit(((char *)&(ldt)) , ((limit)-1))

/*
* Load a segment. Fall back on loading the zero
* segment if something goes wrong..
*/
#define loadsegment(seg, value) \
asm volatile("\n" \
"1:\t" \
"movl %k0,%%" #seg "\n" \
"2:\n" \
".section .fixup,\"ax\"\n" \
"3:\t" \
"movl %k1, %%" #seg "\n\t" \
"jmp 2b\n" \
".previous\n" \
".section __ex_table,\"a\"\n\t" \
_ASM_ALIGN "\n\t" \
_ASM_PTR " 1b,3b\n" \
".previous" \
: :"r" (value), "r" (0))


/*
* Save a segment register away
*/
Expand Down
22 changes: 0 additions & 22 deletions trunk/include/asm-x86/system_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,6 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc
"2" (prev), "d" (next)); \
} while (0)

/*
* Load a segment. Fall back on loading the zero
* segment if something goes wrong..
*/
#define loadsegment(seg,value) \
asm volatile("\n" \
"1:\t" \
"mov %0,%%" #seg "\n" \
"2:\n" \
".section .fixup,\"ax\"\n" \
"3:\t" \
"pushl $0\n\t" \
"popl %%" #seg "\n\t" \
"jmp 2b\n" \
".previous\n" \
".section __ex_table,\"a\"\n\t" \
".align 4\n\t" \
".long 1b,3b\n" \
".previous" \
: :"rm" (value))


static inline void native_clts(void)
{
asm volatile ("clts");
Expand Down
20 changes: 0 additions & 20 deletions trunk/include/asm-x86/system_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,6 @@

extern void load_gs_index(unsigned);

/*
* Load a segment. Fall back on loading the zero
* segment if something goes wrong..
*/
#define loadsegment(seg,value) \
asm volatile("\n" \
"1:\t" \
"movl %k0,%%" #seg "\n" \
"2:\n" \
".section .fixup,\"ax\"\n" \
"3:\t" \
"movl %1,%%" #seg "\n\t" \
"jmp 2b\n" \
".previous\n" \
".section __ex_table,\"a\"\n\t" \
".align 8\n\t" \
".quad 1b,3b\n" \
".previous" \
: :"r" (value), "r" (0))

/*
* Clear and set 'TS' bit respectively
*/
Expand Down

0 comments on commit ec9e959

Please sign in to comment.