diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2009-07-19 00:11:06 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-19 18:27:52 +0200 |
commit | 57594742a2b545f8f114cda34f15650be8ae976d (patch) | |
tree | 2682b10d68f3fb33aa047fa2a3ff6db2061c0740 /arch/x86/include/asm/system.h | |
parent | fde0312d01b60a3fd5dc56e69a9613defbbc7097 (diff) | |
download | op-kernel-dev-57594742a2b545f8f114cda34f15650be8ae976d.zip op-kernel-dev-57594742a2b545f8f114cda34f15650be8ae976d.tar.gz |
x86: Introduce set_desc_base() and set_desc_limit()
Rename set_base()/set_limit to set_desc_base()/set_desc_limit()
and rewrite them in C. These are naturally introduced by the
idea of get_desc_base()/get_desc_limit().
The conversion actually found the bug in apm_32.c:
bad_bios_desc is written at run-time, but it is defined const
variable.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
LKML-Reference: <20090718151105.GC11294@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/system.h')
-rw-r--r-- | arch/x86/include/asm/system.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h index 643c59b..75c49c7 100644 --- a/arch/x86/include/asm/system.h +++ b/arch/x86/include/asm/system.h @@ -150,33 +150,6 @@ do { \ #endif #ifdef __KERNEL__ -#define _set_base(addr, base) do { unsigned long __pr; \ -__asm__ __volatile__ ("movw %%dx,%1\n\t" \ - "rorl $16,%%edx\n\t" \ - "movb %%dl,%2\n\t" \ - "movb %%dh,%3" \ - :"=&d" (__pr) \ - :"m" (*((addr)+2)), \ - "m" (*((addr)+4)), \ - "m" (*((addr)+7)), \ - "0" (base) \ - ); } while (0) - -#define _set_limit(addr, limit) do { unsigned long __lr; \ -__asm__ __volatile__ ("movw %%dx,%1\n\t" \ - "rorl $16,%%edx\n\t" \ - "movb %2,%%dh\n\t" \ - "andb $0xf0,%%dh\n\t" \ - "orb %%dh,%%dl\n\t" \ - "movb %%dl,%2" \ - :"=&d" (__lr) \ - :"m" (*(addr)), \ - "m" (*((addr)+6)), \ - "0" (limit) \ - ); } while (0) - -#define set_base(ldt, base) _set_base(((char *)&(ldt)) , (base)) -#define set_limit(ldt, limit) _set_limit(((char *)&(ldt)) , ((limit)-1)) extern void native_load_gs_index(unsigned); |