diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/elf.h | 6 | ||||
| -rw-r--r-- | include/asm-i386/system.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index f7ad699487b4..73f4067e3995 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h @@ -8,6 +8,7 @@ #include <asm/ptrace.h> #include <asm/user.h> #include <asm/processor.h> +#include <asm/system.h> /* for savesegment */ #include <linux/utsname.h> @@ -58,11 +59,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t; #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) -/* Wow, the "main" arch needs arch dependent functions too.. :) */ - -#define savesegment(seg,value) \ - asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value))) - /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is now struct_user_regs, they are different) */ diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index e085e51e9d25..bdc4da98612c 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h @@ -95,6 +95,12 @@ static inline unsigned long _get_base(char * addr) : :"m" (*(unsigned int *)&(value))) /* + * Save a segment register away + */ +#define savesegment(seg, value) \ + asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value))) + +/* * Clear and set 'TS' bit respectively */ #define clts() __asm__ __volatile__ ("clts") |
