diff options
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/as-layout.h | 14 | ||||
-rw-r--r-- | arch/um/include/line.h | 4 | ||||
-rw-r--r-- | arch/um/include/os.h | 1 | ||||
-rw-r--r-- | arch/um/include/process.h | 20 | ||||
-rw-r--r-- | arch/um/include/skas_ptrace.h | 13 | ||||
-rw-r--r-- | arch/um/include/sysdep-i386/ptrace_user.h | 30 | ||||
-rw-r--r-- | arch/um/include/sysdep-i386/sigcontext.h | 2 | ||||
-rw-r--r-- | arch/um/include/sysdep-x86_64/ptrace_user.h | 17 | ||||
-rw-r--r-- | arch/um/include/um_malloc.h | 9 |
9 files changed, 26 insertions, 84 deletions
diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h index cac542d8ff70..58e852dfb0ce 100644 --- a/arch/um/include/as-layout.h +++ b/arch/um/include/as-layout.h | |||
@@ -23,16 +23,16 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifdef __ASSEMBLY__ | 25 | #ifdef __ASSEMBLY__ |
26 | #define _AC(X, Y) (Y) | 26 | #define _UML_AC(X, Y) (Y) |
27 | #else | 27 | #else |
28 | #define __AC(X, Y) (X (Y)) | 28 | #define __UML_AC(X, Y) (X(Y)) |
29 | #define _AC(X, Y) __AC(X, Y) | 29 | #define _UML_AC(X, Y) __UML_AC(X, Y) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define STUB_START _AC(, 0x100000) | 32 | #define STUB_START _UML_AC(, 0x100000) |
33 | #define STUB_CODE _AC((unsigned long), STUB_START) | 33 | #define STUB_CODE _UML_AC((unsigned long), STUB_START) |
34 | #define STUB_DATA _AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE) | 34 | #define STUB_DATA _UML_AC((unsigned long), STUB_CODE + UM_KERN_PAGE_SIZE) |
35 | #define STUB_END _AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE) | 35 | #define STUB_END _UML_AC((unsigned long), STUB_DATA + UM_KERN_PAGE_SIZE) |
36 | 36 | ||
37 | #ifndef __ASSEMBLY__ | 37 | #ifndef __ASSEMBLY__ |
38 | 38 | ||
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 979b73e6352d..311a0d3d93af 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h | |||
@@ -58,11 +58,11 @@ struct line { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | #define LINE_INIT(str, d) \ | 60 | #define LINE_INIT(str, d) \ |
61 | { .count_lock = SPIN_LOCK_UNLOCKED, \ | 61 | { .count_lock = __SPIN_LOCK_UNLOCKED((str).count_lock), \ |
62 | .init_str = str, \ | 62 | .init_str = str, \ |
63 | .init_pri = INIT_STATIC, \ | 63 | .init_pri = INIT_STATIC, \ |
64 | .valid = 1, \ | 64 | .valid = 1, \ |
65 | .lock = SPIN_LOCK_UNLOCKED, \ | 65 | .lock = __SPIN_LOCK_UNLOCKED((str).lock), \ |
66 | .driver = d } | 66 | .driver = d } |
67 | 67 | ||
68 | extern void line_close(struct tty_struct *tty, struct file * filp); | 68 | extern void line_close(struct tty_struct *tty, struct file * filp); |
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 32c799e3a495..e2716ac8889a 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -290,6 +290,7 @@ extern void os_set_ioignore(void); | |||
290 | extern int add_sigio_fd(int fd); | 290 | extern int add_sigio_fd(int fd); |
291 | extern int ignore_sigio_fd(int fd); | 291 | extern int ignore_sigio_fd(int fd); |
292 | extern void maybe_sigio_broken(int fd, int read); | 292 | extern void maybe_sigio_broken(int fd, int read); |
293 | extern void sigio_broken(int fd, int read); | ||
293 | 294 | ||
294 | /* sys-x86_64/prctl.c */ | 295 | /* sys-x86_64/prctl.c */ |
295 | extern int os_arch_prctl(int pid, int code, unsigned long *addr); | 296 | extern int os_arch_prctl(int pid, int code, unsigned long *addr); |
diff --git a/arch/um/include/process.h b/arch/um/include/process.h index 5af9157ff54f..bb873a51262e 100644 --- a/arch/um/include/process.h +++ b/arch/um/include/process.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2000 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -8,18 +8,10 @@ | |||
8 | 8 | ||
9 | #include <signal.h> | 9 | #include <signal.h> |
10 | 10 | ||
11 | extern void sig_handler(int sig, struct sigcontext sc); | 11 | /* Copied from linux/compiler-gcc.h since we can't include it directly */ |
12 | extern void alarm_handler(int sig, struct sigcontext sc); | 12 | #define barrier() __asm__ __volatile__("": : :"memory") |
13 | 13 | ||
14 | #endif | 14 | extern void sig_handler(int sig, struct sigcontext *sc); |
15 | extern void alarm_handler(int sig, struct sigcontext *sc); | ||
15 | 16 | ||
16 | /* | 17 | #endif |
17 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
18 | * Emacs will notice this stuff at the end of the file and automatically | ||
19 | * adjust the settings for this buffer only. This must remain at the end | ||
20 | * of the file. | ||
21 | * --------------------------------------------------------------------------- | ||
22 | * Local variables: | ||
23 | * c-file-style: "linux" | ||
24 | * End: | ||
25 | */ | ||
diff --git a/arch/um/include/skas_ptrace.h b/arch/um/include/skas_ptrace.h index cd2327d09c8d..3d31bbacd016 100644 --- a/arch/um/include/skas_ptrace.h +++ b/arch/um/include/skas_ptrace.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -12,14 +12,3 @@ | |||
12 | #include "sysdep/skas_ptrace.h" | 12 | #include "sysdep/skas_ptrace.h" |
13 | 13 | ||
14 | #endif | 14 | #endif |
15 | |||
16 | /* | ||
17 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
18 | * Emacs will notice this stuff at the end of the file and automatically | ||
19 | * adjust the settings for this buffer only. This must remain at the end | ||
20 | * of the file. | ||
21 | * --------------------------------------------------------------------------- | ||
22 | * Local variables: | ||
23 | * c-file-style: "linux" | ||
24 | * End: | ||
25 | */ | ||
diff --git a/arch/um/include/sysdep-i386/ptrace_user.h b/arch/um/include/sysdep-i386/ptrace_user.h index 75650723c38f..ef56247e4143 100644 --- a/arch/um/include/sysdep-i386/ptrace_user.h +++ b/arch/um/include/sysdep-i386/ptrace_user.h | |||
@@ -41,38 +41,10 @@ | |||
41 | #define PT_SP_OFFSET PT_OFFSET(UESP) | 41 | #define PT_SP_OFFSET PT_OFFSET(UESP) |
42 | #define PT_SP(regs) ((regs)[UESP]) | 42 | #define PT_SP(regs) ((regs)[UESP]) |
43 | 43 | ||
44 | #define FP_SIZE ((HOST_XFP_SIZE > HOST_FP_SIZE) ? HOST_XFP_SIZE : HOST_FP_SIZE) | 44 | #define FP_SIZE ((HOST_FPX_SIZE > HOST_FP_SIZE) ? HOST_FPX_SIZE : HOST_FP_SIZE) |
45 | 45 | ||
46 | #ifndef FRAME_SIZE | 46 | #ifndef FRAME_SIZE |
47 | #define FRAME_SIZE (17) | 47 | #define FRAME_SIZE (17) |
48 | #endif | 48 | #endif |
49 | #define FRAME_SIZE_OFFSET (FRAME_SIZE * sizeof(unsigned long)) | ||
50 | |||
51 | #define FP_FRAME_SIZE (27) | ||
52 | #define FPX_FRAME_SIZE (128) | ||
53 | |||
54 | #ifdef PTRACE_GETREGS | ||
55 | #define UM_HAVE_GETREGS | ||
56 | #endif | ||
57 | |||
58 | #ifdef PTRACE_SETREGS | ||
59 | #define UM_HAVE_SETREGS | ||
60 | #endif | ||
61 | |||
62 | #ifdef PTRACE_GETFPREGS | ||
63 | #define UM_HAVE_GETFPREGS | ||
64 | #endif | ||
65 | |||
66 | #ifdef PTRACE_SETFPREGS | ||
67 | #define UM_HAVE_SETFPREGS | ||
68 | #endif | ||
69 | |||
70 | #ifdef PTRACE_GETFPXREGS | ||
71 | #define UM_HAVE_GETFPXREGS | ||
72 | #endif | ||
73 | |||
74 | #ifdef PTRACE_SETFPXREGS | ||
75 | #define UM_HAVE_SETFPXREGS | ||
76 | #endif | ||
77 | 49 | ||
78 | #endif | 50 | #endif |
diff --git a/arch/um/include/sysdep-i386/sigcontext.h b/arch/um/include/sysdep-i386/sigcontext.h index 67e77122aa45..f583c87111a0 100644 --- a/arch/um/include/sysdep-i386/sigcontext.h +++ b/arch/um/include/sysdep-i386/sigcontext.h | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #define IP_RESTART_SYSCALL(ip) ((ip) -= 2) | 11 | #define IP_RESTART_SYSCALL(ip) ((ip) -= 2) |
12 | 12 | ||
13 | #define GET_FAULTINFO_FROM_SC(fi,sc) \ | 13 | #define GET_FAULTINFO_FROM_SC(fi, sc) \ |
14 | { \ | 14 | { \ |
15 | (fi).cr2 = SC_CR2(sc); \ | 15 | (fi).cr2 = SC_CR2(sc); \ |
16 | (fi).error_code = SC_ERR(sc); \ | 16 | (fi).error_code = SC_ERR(sc); \ |
diff --git a/arch/um/include/sysdep-x86_64/ptrace_user.h b/arch/um/include/sysdep-x86_64/ptrace_user.h index 45c0bd881cb3..4dbccdb58f48 100644 --- a/arch/um/include/sysdep-x86_64/ptrace_user.h +++ b/arch/um/include/sysdep-x86_64/ptrace_user.h | |||
@@ -48,7 +48,8 @@ | |||
48 | #define PT_ORIG_RAX_OFFSET (ORIG_RAX) | 48 | #define PT_ORIG_RAX_OFFSET (ORIG_RAX) |
49 | #define PT_ORIG_RAX(regs) ((regs)[PT_INDEX(ORIG_RAX)]) | 49 | #define PT_ORIG_RAX(regs) ((regs)[PT_INDEX(ORIG_RAX)]) |
50 | 50 | ||
51 | /* x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though | 51 | /* |
52 | * x86_64 FC3 doesn't define this in /usr/include/linux/ptrace.h even though | ||
52 | * it's defined in the kernel's include/linux/ptrace.h. Additionally, use the | 53 | * it's defined in the kernel's include/linux/ptrace.h. Additionally, use the |
53 | * 2.4 name and value for 2.4 host compatibility. | 54 | * 2.4 name and value for 2.4 host compatibility. |
54 | */ | 55 | */ |
@@ -56,7 +57,8 @@ | |||
56 | #define PTRACE_OLDSETOPTIONS 21 | 57 | #define PTRACE_OLDSETOPTIONS 21 |
57 | #endif | 58 | #endif |
58 | 59 | ||
59 | /* These are before the system call, so the system call number is RAX | 60 | /* |
61 | * These are before the system call, so the system call number is RAX | ||
60 | * rather than ORIG_RAX, and arg4 is R10 rather than RCX | 62 | * rather than ORIG_RAX, and arg4 is R10 rather than RCX |
61 | */ | 63 | */ |
62 | #define REGS_SYSCALL_NR PT_INDEX(RAX) | 64 | #define REGS_SYSCALL_NR PT_INDEX(RAX) |
@@ -73,14 +75,3 @@ | |||
73 | #define FP_SIZE (HOST_FP_SIZE) | 75 | #define FP_SIZE (HOST_FP_SIZE) |
74 | 76 | ||
75 | #endif | 77 | #endif |
76 | |||
77 | /* | ||
78 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
79 | * Emacs will notice this stuff at the end of the file and automatically | ||
80 | * adjust the settings for this buffer only. This must remain at the end | ||
81 | * of the file. | ||
82 | * --------------------------------------------------------------------------- | ||
83 | * Local variables: | ||
84 | * c-file-style: "linux" | ||
85 | * End: | ||
86 | */ | ||
diff --git a/arch/um/include/um_malloc.h b/arch/um/include/um_malloc.h index 0ad17cb83d96..c554d706d106 100644 --- a/arch/um/include/um_malloc.h +++ b/arch/um/include/um_malloc.h | |||
@@ -8,15 +8,12 @@ | |||
8 | 8 | ||
9 | #include "kern_constants.h" | 9 | #include "kern_constants.h" |
10 | 10 | ||
11 | extern void *__kmalloc(int size, int flags); | 11 | extern void *uml_kmalloc(int size, int flags); |
12 | static inline void *kmalloc(int size, int flags) | ||
13 | { | ||
14 | return __kmalloc(size, flags); | ||
15 | } | ||
16 | |||
17 | extern void kfree(const void *ptr); | 12 | extern void kfree(const void *ptr); |
18 | 13 | ||
19 | extern void *vmalloc(unsigned long size); | 14 | extern void *vmalloc(unsigned long size); |
20 | extern void vfree(void *ptr); | 15 | extern void vfree(void *ptr); |
21 | 16 | ||
22 | #endif /* __UM_MALLOC_H__ */ | 17 | #endif /* __UM_MALLOC_H__ */ |
18 | |||
19 | |||