diff options
| author | Stephen Rothwell <sfr@canb.auug.org.au> | 2003-01-01 20:26:35 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-01 20:26:35 -0800 |
| commit | e6f0fdf186efa20c2bdf903aeec7d0926e495fca (patch) | |
| tree | 0e1fb7b8f072f7a405421566fa10fbdbb44d8203 /include | |
| parent | bb5f2af5862750ba846c29b83f4abcd547960bfe (diff) | |
[PATCH] x86 savesegment() cleanup
"savesegment()" is declared in multiple places. Clean up and declare
it just once in <asm/system.h>
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") |
