diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-05 01:30:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:28 -0500 |
commit | 8192ab42bf60e1e9b7efa046990e9cc5e4a95cf4 (patch) | |
tree | f61fee85b0eccbc055ec8c5a98932b20eca64bf1 /include/asm-um/elf-i386.h | |
parent | 9157f90f08f7db3188cd06971f41cb2ba5646e57 (diff) |
uml: header untangling
Untangle UML headers somewhat and add some includes where they were
needed explicitly, but gotten accidentally via some other header.
arch/um/include/um_uaccess.h loses asm/fixmap.h because it uses no
fixmap stuff and gains elf.h, because it needs FIXADDR_USER_*, and
archsetjmp.h, because it needs jmp_buf.
pmd_alloc_one is uninlined because it needs mm_struct, and that's
inconvenient to provide in asm-um/pgtable-3level.h.
elf_core_copy_fpregs is also uninlined from elf-i386.h and
elf-x86_64.h, which duplicated the code anyway, to
arch/um/kernel/process.c, so that the reference to current_thread
doesn't pull sched.h or anything related into asm/elf.h.
arch/um/sys-i386/ldt.c, arch/um/kernel/tlb.c and
arch/um/kernel/skas/uaccess.c got sched.h because they dereference
task_structs. Its includes of linux and asm headers got turned from
"" to <>.
arch/um/sys-i386/bug.c gets asm/errno.h because it needs errno
constants.
asm/elf-i386 gets asm/user.h because it needs user_regs_struct.
asm/fixmap.h gets page.h because it needs PAGE_SIZE and PAGE_MASK and
system.h for BUG_ON.
asm/pgtable doesn't need sched.h.
asm/processor-generic.h defined mm_segment_t, but didn't use it. So,
that definition is moved to uaccess.h, which defines a bunch of
mm_segment_t-related stuff. thread_info.h uses mm_segment_t, and
includes uaccess.h, which causes a recursion. So, the definition is
placed above the include of thread_info. in uaccess.h. thread_info.h
also gets page.h because it needs PAGE_SIZE.
ObCheckpatchViolationJustification - I'm not adding a typedef; I'm
moving mm_segment_t from one place to another.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um/elf-i386.h')
-rw-r--r-- | include/asm-um/elf-i386.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/asm-um/elf-i386.h b/include/asm-um/elf-i386.h index ca94a136dfe8..22bbb755ee51 100644 --- a/include/asm-um/elf-i386.h +++ b/include/asm-um/elf-i386.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #ifndef __UM_ELF_I386_H | 5 | #ifndef __UM_ELF_I386_H |
6 | #define __UM_ELF_I386_H | 6 | #define __UM_ELF_I386_H |
7 | 7 | ||
8 | #include <linux/sched.h> | 8 | #include <asm/user.h> |
9 | #include "skas.h" | 9 | #include "skas.h" |
10 | 10 | ||
11 | #define R_386_NONE 0 | 11 | #define R_386_NONE 0 |
@@ -76,12 +76,7 @@ typedef struct user_i387_struct elf_fpregset_t; | |||
76 | pr_reg[16] = PT_REGS_SS(regs); \ | 76 | pr_reg[16] = PT_REGS_SS(regs); \ |
77 | } while(0); | 77 | } while(0); |
78 | 78 | ||
79 | static inline int elf_core_copy_fpregs(struct task_struct *t, | 79 | extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); |
80 | elf_fpregset_t *fpu) | ||
81 | { | ||
82 | int cpu = ((struct thread_info *) t->stack)->cpu; | ||
83 | return save_fp_registers(userspace_pid[cpu], (unsigned long *) fpu); | ||
84 | } | ||
85 | 80 | ||
86 | #define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu) | 81 | #define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu) |
87 | 82 | ||