diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/um/include/shared | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'arch/um/include/shared')
-rw-r--r-- | arch/um/include/shared/arch.h | 2 | ||||
-rw-r--r-- | arch/um/include/shared/as-layout.h | 7 | ||||
-rw-r--r-- | arch/um/include/shared/common-offsets.h | 13 | ||||
-rw-r--r-- | arch/um/include/shared/frame_kern.h | 3 | ||||
-rw-r--r-- | arch/um/include/shared/irq_kern.h | 6 | ||||
-rw-r--r-- | arch/um/include/shared/irq_user.h | 5 | ||||
-rw-r--r-- | arch/um/include/shared/kern.h | 18 | ||||
-rw-r--r-- | arch/um/include/shared/kern_util.h | 20 | ||||
-rw-r--r-- | arch/um/include/shared/longjmp.h | 4 | ||||
-rw-r--r-- | arch/um/include/shared/os.h | 20 | ||||
-rw-r--r-- | arch/um/include/shared/ptrace_user.h | 3 | ||||
-rw-r--r-- | arch/um/include/shared/registers.h | 4 | ||||
-rw-r--r-- | arch/um/include/shared/skas/skas.h | 2 | ||||
-rw-r--r-- | arch/um/include/shared/skas_ptrace.h | 2 | ||||
-rw-r--r-- | arch/um/include/shared/um_malloc.h | 2 | ||||
-rw-r--r-- | arch/um/include/shared/user.h | 18 |
16 files changed, 80 insertions, 49 deletions
diff --git a/arch/um/include/shared/arch.h b/arch/um/include/shared/arch.h index 4f46abda060..2de92a08a76 100644 --- a/arch/um/include/shared/arch.h +++ b/arch/um/include/shared/arch.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __ARCH_H__ | 6 | #ifndef __ARCH_H__ |
7 | #define __ARCH_H__ | 7 | #define __ARCH_H__ |
8 | 8 | ||
9 | #include <sysdep/ptrace.h> | 9 | #include "sysdep/ptrace.h" |
10 | 10 | ||
11 | extern void arch_check_bugs(void); | 11 | extern void arch_check_bugs(void); |
12 | extern int arch_fixup(unsigned long address, struct uml_pt_regs *regs); | 12 | extern int arch_fixup(unsigned long address, struct uml_pt_regs *regs); |
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h index 694c792bab4..a92b678503c 100644 --- a/arch/um/include/shared/as-layout.h +++ b/arch/um/include/shared/as-layout.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __START_H__ | 6 | #ifndef __START_H__ |
7 | #define __START_H__ | 7 | #define __START_H__ |
8 | 8 | ||
9 | #include <generated/asm-offsets.h> | 9 | #include "kern_constants.h" |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * Stolen from linux/const.h, which can't be directly included since | 12 | * Stolen from linux/const.h, which can't be directly included since |
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #ifndef __ASSEMBLY__ | 36 | #ifndef __ASSEMBLY__ |
37 | 37 | ||
38 | #include <sysdep/ptrace.h> | 38 | #include "sysdep/ptrace.h" |
39 | 39 | ||
40 | struct cpu_task { | 40 | struct cpu_task { |
41 | int pid; | 41 | int pid; |
@@ -60,8 +60,7 @@ extern unsigned long host_task_size; | |||
60 | 60 | ||
61 | extern int linux_main(int argc, char **argv); | 61 | extern int linux_main(int argc, char **argv); |
62 | 62 | ||
63 | struct siginfo; | 63 | extern void (*sig_info[])(int, struct uml_pt_regs *); |
64 | extern void (*sig_info[])(int, struct siginfo *si, struct uml_pt_regs *); | ||
65 | 64 | ||
66 | #endif | 65 | #endif |
67 | 66 | ||
diff --git a/arch/um/include/shared/common-offsets.h b/arch/um/include/shared/common-offsets.h index 2df313b6a58..72009c7e321 100644 --- a/arch/um/include/shared/common-offsets.h +++ b/arch/um/include/shared/common-offsets.h | |||
@@ -2,11 +2,24 @@ | |||
2 | 2 | ||
3 | DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); | 3 | DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); |
4 | 4 | ||
5 | OFFSET(HOST_TASK_REGS, task_struct, thread.regs); | ||
6 | OFFSET(HOST_TASK_PID, task_struct, pid); | ||
7 | |||
5 | DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); | 8 | DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); |
6 | DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK); | 9 | DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK); |
7 | DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT); | 10 | DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT); |
8 | DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); | 11 | DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); |
9 | 12 | ||
13 | DEFINE_STR(UM_KERN_EMERG, KERN_EMERG); | ||
14 | DEFINE_STR(UM_KERN_ALERT, KERN_ALERT); | ||
15 | DEFINE_STR(UM_KERN_CRIT, KERN_CRIT); | ||
16 | DEFINE_STR(UM_KERN_ERR, KERN_ERR); | ||
17 | DEFINE_STR(UM_KERN_WARNING, KERN_WARNING); | ||
18 | DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE); | ||
19 | DEFINE_STR(UM_KERN_INFO, KERN_INFO); | ||
20 | DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG); | ||
21 | DEFINE_STR(UM_KERN_CONT, KERN_CONT); | ||
22 | |||
10 | DEFINE(UM_ELF_CLASS, ELF_CLASS); | 23 | DEFINE(UM_ELF_CLASS, ELF_CLASS); |
11 | DEFINE(UM_ELFCLASS32, ELFCLASS32); | 24 | DEFINE(UM_ELFCLASS32, ELFCLASS32); |
12 | DEFINE(UM_ELFCLASS64, ELFCLASS64); | 25 | DEFINE(UM_ELFCLASS64, ELFCLASS64); |
diff --git a/arch/um/include/shared/frame_kern.h b/arch/um/include/shared/frame_kern.h index e584e40ee83..76078490c25 100644 --- a/arch/um/include/shared/frame_kern.h +++ b/arch/um/include/shared/frame_kern.h | |||
@@ -6,6 +6,9 @@ | |||
6 | #ifndef __FRAME_KERN_H_ | 6 | #ifndef __FRAME_KERN_H_ |
7 | #define __FRAME_KERN_H_ | 7 | #define __FRAME_KERN_H_ |
8 | 8 | ||
9 | #define _S(nr) (1<<((nr)-1)) | ||
10 | #define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP))) | ||
11 | |||
9 | extern int setup_signal_stack_sc(unsigned long stack_top, int sig, | 12 | extern int setup_signal_stack_sc(unsigned long stack_top, int sig, |
10 | struct k_sigaction *ka, | 13 | struct k_sigaction *ka, |
11 | struct pt_regs *regs, | 14 | struct pt_regs *regs, |
diff --git a/arch/um/include/shared/irq_kern.h b/arch/um/include/shared/irq_kern.h index e05bd667de1..b05d22f3d84 100644 --- a/arch/um/include/shared/irq_kern.h +++ b/arch/um/include/shared/irq_kern.h | |||
@@ -6,13 +6,13 @@ | |||
6 | #ifndef __IRQ_KERN_H__ | 6 | #ifndef __IRQ_KERN_H__ |
7 | #define __IRQ_KERN_H__ | 7 | #define __IRQ_KERN_H__ |
8 | 8 | ||
9 | #include <linux/interrupt.h> | 9 | #include "linux/interrupt.h" |
10 | #include <asm/ptrace.h> | 10 | #include "asm/ptrace.h" |
11 | 11 | ||
12 | extern int um_request_irq(unsigned int irq, int fd, int type, | 12 | extern int um_request_irq(unsigned int irq, int fd, int type, |
13 | irq_handler_t handler, | 13 | irq_handler_t handler, |
14 | unsigned long irqflags, const char * devname, | 14 | unsigned long irqflags, const char * devname, |
15 | void *dev_id); | 15 | void *dev_id); |
16 | void um_free_irq(unsigned int irq, void *dev); | 16 | |
17 | #endif | 17 | #endif |
18 | 18 | ||
diff --git a/arch/um/include/shared/irq_user.h b/arch/um/include/shared/irq_user.h index df563305395..c6c784df267 100644 --- a/arch/um/include/shared/irq_user.h +++ b/arch/um/include/shared/irq_user.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __IRQ_USER_H__ | 6 | #ifndef __IRQ_USER_H__ |
7 | #define __IRQ_USER_H__ | 7 | #define __IRQ_USER_H__ |
8 | 8 | ||
9 | #include <sysdep/ptrace.h> | 9 | #include "sysdep/ptrace.h" |
10 | 10 | ||
11 | struct irq_fd { | 11 | struct irq_fd { |
12 | struct irq_fd *next; | 12 | struct irq_fd *next; |
@@ -20,8 +20,7 @@ struct irq_fd { | |||
20 | 20 | ||
21 | enum { IRQ_READ, IRQ_WRITE }; | 21 | enum { IRQ_READ, IRQ_WRITE }; |
22 | 22 | ||
23 | struct siginfo; | 23 | extern void sigio_handler(int sig, struct uml_pt_regs *regs); |
24 | extern void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); | ||
25 | extern void free_irq_by_fd(int fd); | 24 | extern void free_irq_by_fd(int fd); |
26 | extern void reactivate_fd(int fd, int irqnum); | 25 | extern void reactivate_fd(int fd, int irqnum); |
27 | extern void deactivate_fd(int fd, int irqnum); | 26 | extern void deactivate_fd(int fd, int irqnum); |
diff --git a/arch/um/include/shared/kern.h b/arch/um/include/shared/kern.h index 6cd01240bbf..4ce3fc650e5 100644 --- a/arch/um/include/shared/kern.h +++ b/arch/um/include/shared/kern.h | |||
@@ -13,10 +13,28 @@ | |||
13 | * includes. | 13 | * includes. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | extern int errno; | ||
17 | |||
18 | extern int clone(int (*proc)(void *), void *sp, int flags, void *data); | ||
19 | extern int sleep(int); | ||
16 | extern int printf(const char *fmt, ...); | 20 | extern int printf(const char *fmt, ...); |
21 | extern char *strerror(int errnum); | ||
22 | extern char *ptsname(int __fd); | ||
23 | extern int munmap(void *, int); | ||
17 | extern void *sbrk(int increment); | 24 | extern void *sbrk(int increment); |
25 | extern void *malloc(int size); | ||
26 | extern void perror(char *err); | ||
27 | extern int kill(int pid, int sig); | ||
28 | extern int getuid(void); | ||
29 | extern int getgid(void); | ||
18 | extern int pause(void); | 30 | extern int pause(void); |
31 | extern int write(int, const void *, int); | ||
19 | extern void exit(int); | 32 | extern void exit(int); |
33 | extern int close(int); | ||
34 | extern int read(unsigned int, char *, int); | ||
35 | extern int pipe(int *); | ||
36 | extern int sched_yield(void); | ||
37 | extern int ptrace(int op, int pid, long addr, long data); | ||
20 | 38 | ||
21 | #endif | 39 | #endif |
22 | 40 | ||
diff --git a/arch/um/include/shared/kern_util.h b/arch/um/include/shared/kern_util.h index 83a91f97633..3c341222d25 100644 --- a/arch/um/include/shared/kern_util.h +++ b/arch/um/include/shared/kern_util.h | |||
@@ -6,10 +6,8 @@ | |||
6 | #ifndef __KERN_UTIL_H__ | 6 | #ifndef __KERN_UTIL_H__ |
7 | #define __KERN_UTIL_H__ | 7 | #define __KERN_UTIL_H__ |
8 | 8 | ||
9 | #include <sysdep/ptrace.h> | 9 | #include "sysdep/ptrace.h" |
10 | #include <sysdep/faultinfo.h> | 10 | #include "sysdep/faultinfo.h" |
11 | |||
12 | struct siginfo; | ||
13 | 11 | ||
14 | extern int uml_exitcode; | 12 | extern int uml_exitcode; |
15 | 13 | ||
@@ -23,8 +21,9 @@ extern unsigned long alloc_stack(int order, int atomic); | |||
23 | extern void free_stack(unsigned long stack, int order); | 21 | extern void free_stack(unsigned long stack, int order); |
24 | 22 | ||
25 | extern int do_signal(void); | 23 | extern int do_signal(void); |
24 | extern void copy_sc(struct uml_pt_regs *regs, void *from); | ||
26 | extern void interrupt_end(void); | 25 | extern void interrupt_end(void); |
27 | extern void relay_signal(int sig, struct siginfo *si, struct uml_pt_regs *regs); | 26 | extern void relay_signal(int sig, struct uml_pt_regs *regs); |
28 | 27 | ||
29 | extern unsigned long segv(struct faultinfo fi, unsigned long ip, | 28 | extern unsigned long segv(struct faultinfo fi, unsigned long ip, |
30 | int is_user, struct uml_pt_regs *regs); | 29 | int is_user, struct uml_pt_regs *regs); |
@@ -35,8 +34,9 @@ extern unsigned int do_IRQ(int irq, struct uml_pt_regs *regs); | |||
35 | extern int smp_sigio_handler(void); | 34 | extern int smp_sigio_handler(void); |
36 | extern void initial_thread_cb(void (*proc)(void *), void *arg); | 35 | extern void initial_thread_cb(void (*proc)(void *), void *arg); |
37 | extern int is_syscall(unsigned long addr); | 36 | extern int is_syscall(unsigned long addr); |
37 | extern void timer_handler(int sig, struct uml_pt_regs *regs); | ||
38 | 38 | ||
39 | extern void timer_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); | 39 | extern void timer_handler(int sig, struct uml_pt_regs *regs); |
40 | 40 | ||
41 | extern int start_uml(void); | 41 | extern int start_uml(void); |
42 | extern void paging_init(void); | 42 | extern void paging_init(void); |
@@ -49,7 +49,7 @@ extern void do_uml_exitcalls(void); | |||
49 | * GFP_ATOMIC. | 49 | * GFP_ATOMIC. |
50 | */ | 50 | */ |
51 | extern int __cant_sleep(void); | 51 | extern int __cant_sleep(void); |
52 | extern int get_current_pid(void); | 52 | extern void *get_current(void); |
53 | extern int copy_from_user_proc(void *to, void *from, int size); | 53 | extern int copy_from_user_proc(void *to, void *from, int size); |
54 | extern int cpu(void); | 54 | extern int cpu(void); |
55 | extern char *uml_strdup(const char *string); | 55 | extern char *uml_strdup(const char *string); |
@@ -60,9 +60,9 @@ extern unsigned long from_irq_stack(int nested); | |||
60 | extern void syscall_trace(struct uml_pt_regs *regs, int entryexit); | 60 | extern void syscall_trace(struct uml_pt_regs *regs, int entryexit); |
61 | extern int singlestepping(void *t); | 61 | extern int singlestepping(void *t); |
62 | 62 | ||
63 | extern void segv_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); | 63 | extern void segv_handler(int sig, struct uml_pt_regs *regs); |
64 | extern void bus_handler(int sig, struct siginfo *si, struct uml_pt_regs *regs); | 64 | extern void bus_handler(int sig, struct uml_pt_regs *regs); |
65 | extern void winch(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); | 65 | extern void winch(int sig, struct uml_pt_regs *regs); |
66 | extern void fatal_sigsegv(void) __attribute__ ((noreturn)); | 66 | extern void fatal_sigsegv(void) __attribute__ ((noreturn)); |
67 | 67 | ||
68 | 68 | ||
diff --git a/arch/um/include/shared/longjmp.h b/arch/um/include/shared/longjmp.h index 9bdddf4c405..e860bc5848e 100644 --- a/arch/um/include/shared/longjmp.h +++ b/arch/um/include/shared/longjmp.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef __UML_LONGJMP_H | 1 | #ifndef __UML_LONGJMP_H |
2 | #define __UML_LONGJMP_H | 2 | #define __UML_LONGJMP_H |
3 | 3 | ||
4 | #include <sysdep/archsetjmp.h> | 4 | #include "sysdep/archsetjmp.h" |
5 | #include <os.h> | 5 | #include "os.h" |
6 | 6 | ||
7 | extern int setjmp(jmp_buf); | 7 | extern int setjmp(jmp_buf); |
8 | extern void longjmp(jmp_buf, int); | 8 | extern void longjmp(jmp_buf, int); |
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index 95feaa47a2f..83c7c2ecd61 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h | |||
@@ -7,9 +7,10 @@ | |||
7 | #define __OS_H__ | 7 | #define __OS_H__ |
8 | 8 | ||
9 | #include <stdarg.h> | 9 | #include <stdarg.h> |
10 | #include <irq_user.h> | 10 | #include "irq_user.h" |
11 | #include <longjmp.h> | 11 | #include "longjmp.h" |
12 | #include <mm_id.h> | 12 | #include "mm_id.h" |
13 | #include "sysdep/tls.h" | ||
13 | 14 | ||
14 | #define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) | 15 | #define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) |
15 | 16 | ||
@@ -191,6 +192,7 @@ extern int os_getpid(void); | |||
191 | extern int os_getpgrp(void); | 192 | extern int os_getpgrp(void); |
192 | 193 | ||
193 | extern void init_new_thread_signals(void); | 194 | extern void init_new_thread_signals(void); |
195 | extern int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr); | ||
194 | 196 | ||
195 | extern int os_map_memory(void *virt, int fd, unsigned long long off, | 197 | extern int os_map_memory(void *virt, int fd, unsigned long long off, |
196 | unsigned long len, int r, int w, int x); | 198 | unsigned long len, int r, int w, int x); |
@@ -201,6 +203,12 @@ extern int os_drop_memory(void *addr, int length); | |||
201 | extern int can_drop_memory(void); | 203 | extern int can_drop_memory(void); |
202 | extern void os_flush_stdout(void); | 204 | extern void os_flush_stdout(void); |
203 | 205 | ||
206 | /* uaccess.c */ | ||
207 | extern unsigned long __do_user_copy(void *to, const void *from, int n, | ||
208 | void **fault_addr, jmp_buf **fault_catcher, | ||
209 | void (*op)(void *to, const void *from, | ||
210 | int n), int *faulted_out); | ||
211 | |||
204 | /* execvp.c */ | 212 | /* execvp.c */ |
205 | extern int execvp_noalloc(char *buf, const char *file, char *const argv[]); | 213 | extern int execvp_noalloc(char *buf, const char *file, char *const argv[]); |
206 | /* helper.c */ | 214 | /* helper.c */ |
@@ -210,6 +218,10 @@ extern int run_helper_thread(int (*proc)(void *), void *arg, | |||
210 | extern int helper_wait(int pid); | 218 | extern int helper_wait(int pid); |
211 | 219 | ||
212 | 220 | ||
221 | /* tls.c */ | ||
222 | extern int os_set_thread_area(user_desc_t *info, int pid); | ||
223 | extern int os_get_thread_area(user_desc_t *info, int pid); | ||
224 | |||
213 | /* umid.c */ | 225 | /* umid.c */ |
214 | extern int umid_file_name(char *name, char *buf, int len); | 226 | extern int umid_file_name(char *name, char *buf, int len); |
215 | extern int set_umid(char *name); | 227 | extern int set_umid(char *name); |
@@ -219,7 +231,7 @@ extern char *get_umid(void); | |||
219 | extern void timer_init(void); | 231 | extern void timer_init(void); |
220 | extern void set_sigstack(void *sig_stack, int size); | 232 | extern void set_sigstack(void *sig_stack, int size); |
221 | extern void remove_sigstack(void); | 233 | extern void remove_sigstack(void); |
222 | extern void set_handler(int sig); | 234 | extern void set_handler(int sig, void (*handler)(int), int flags, ...); |
223 | extern int change_sig(int signal, int on); | 235 | extern int change_sig(int signal, int on); |
224 | extern void block_signals(void); | 236 | extern void block_signals(void); |
225 | extern void unblock_signals(void); | 237 | extern void unblock_signals(void); |
diff --git a/arch/um/include/shared/ptrace_user.h b/arch/um/include/shared/ptrace_user.h index 56b2f284b10..7fd8539bc19 100644 --- a/arch/um/include/shared/ptrace_user.h +++ b/arch/um/include/shared/ptrace_user.h | |||
@@ -6,8 +6,7 @@ | |||
6 | #ifndef __PTRACE_USER_H__ | 6 | #ifndef __PTRACE_USER_H__ |
7 | #define __PTRACE_USER_H__ | 7 | #define __PTRACE_USER_H__ |
8 | 8 | ||
9 | #include <sys/ptrace.h> | 9 | #include "sysdep/ptrace_user.h" |
10 | #include <sysdep/ptrace_user.h> | ||
11 | 10 | ||
12 | extern int ptrace_getregs(long pid, unsigned long *regs_out); | 11 | extern int ptrace_getregs(long pid, unsigned long *regs_out); |
13 | extern int ptrace_setregs(long pid, unsigned long *regs_in); | 12 | extern int ptrace_setregs(long pid, unsigned long *regs_in); |
diff --git a/arch/um/include/shared/registers.h b/arch/um/include/shared/registers.h index f5b76355ad7..f1e0aa56c52 100644 --- a/arch/um/include/shared/registers.h +++ b/arch/um/include/shared/registers.h | |||
@@ -6,8 +6,8 @@ | |||
6 | #ifndef __REGISTERS_H | 6 | #ifndef __REGISTERS_H |
7 | #define __REGISTERS_H | 7 | #define __REGISTERS_H |
8 | 8 | ||
9 | #include <sysdep/ptrace.h> | 9 | #include "sysdep/ptrace.h" |
10 | #include <sysdep/archsetjmp.h> | 10 | #include "sysdep/archsetjmp.h" |
11 | 11 | ||
12 | extern int save_fp_registers(int pid, unsigned long *fp_regs); | 12 | extern int save_fp_registers(int pid, unsigned long *fp_regs); |
13 | extern int restore_fp_registers(int pid, unsigned long *fp_regs); | 13 | extern int restore_fp_registers(int pid, unsigned long *fp_regs); |
diff --git a/arch/um/include/shared/skas/skas.h b/arch/um/include/shared/skas/skas.h index c45df961c87..64d2c744330 100644 --- a/arch/um/include/shared/skas/skas.h +++ b/arch/um/include/shared/skas/skas.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __SKAS_H | 6 | #ifndef __SKAS_H |
7 | #define __SKAS_H | 7 | #define __SKAS_H |
8 | 8 | ||
9 | #include <sysdep/ptrace.h> | 9 | #include "sysdep/ptrace.h" |
10 | 10 | ||
11 | extern int userspace_pid[]; | 11 | extern int userspace_pid[]; |
12 | extern int proc_mm, ptrace_faultinfo, ptrace_ldt; | 12 | extern int proc_mm, ptrace_faultinfo, ptrace_ldt; |
diff --git a/arch/um/include/shared/skas_ptrace.h b/arch/um/include/shared/skas_ptrace.h index 630a9c92b93..3d31bbacd01 100644 --- a/arch/um/include/shared/skas_ptrace.h +++ b/arch/um/include/shared/skas_ptrace.h | |||
@@ -9,6 +9,6 @@ | |||
9 | #define PTRACE_FAULTINFO 52 | 9 | #define PTRACE_FAULTINFO 52 |
10 | #define PTRACE_SWITCH_MM 55 | 10 | #define PTRACE_SWITCH_MM 55 |
11 | 11 | ||
12 | #include <sysdep/skas_ptrace.h> | 12 | #include "sysdep/skas_ptrace.h" |
13 | 13 | ||
14 | #endif | 14 | #endif |
diff --git a/arch/um/include/shared/um_malloc.h b/arch/um/include/shared/um_malloc.h index 6395fef6b69..c554d706d10 100644 --- a/arch/um/include/shared/um_malloc.h +++ b/arch/um/include/shared/um_malloc.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __UM_MALLOC_H__ | 6 | #ifndef __UM_MALLOC_H__ |
7 | #define __UM_MALLOC_H__ | 7 | #define __UM_MALLOC_H__ |
8 | 8 | ||
9 | #include <generated/asm-offsets.h> | 9 | #include "kern_constants.h" |
10 | 10 | ||
11 | extern void *uml_kmalloc(int size, int flags); | 11 | extern void *uml_kmalloc(int size, int flags); |
12 | extern void kfree(const void *ptr); | 12 | extern void kfree(const void *ptr); |
diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h index cef06856333..293f7c794fa 100644 --- a/arch/um/include/shared/user.h +++ b/arch/um/include/shared/user.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __USER_H__ | 6 | #ifndef __USER_H__ |
7 | #define __USER_H__ | 7 | #define __USER_H__ |
8 | 8 | ||
9 | #include <generated/asm-offsets.h> | 9 | #include "kern_constants.h" |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * The usual definition - copied here because the kernel provides its own, | 12 | * The usual definition - copied here because the kernel provides its own, |
@@ -26,17 +26,6 @@ | |||
26 | extern void panic(const char *fmt, ...) | 26 | extern void panic(const char *fmt, ...) |
27 | __attribute__ ((format (printf, 1, 2))); | 27 | __attribute__ ((format (printf, 1, 2))); |
28 | 28 | ||
29 | /* Requires preincluding include/linux/kern_levels.h */ | ||
30 | #define UM_KERN_EMERG KERN_EMERG | ||
31 | #define UM_KERN_ALERT KERN_ALERT | ||
32 | #define UM_KERN_CRIT KERN_CRIT | ||
33 | #define UM_KERN_ERR KERN_ERR | ||
34 | #define UM_KERN_WARNING KERN_WARNING | ||
35 | #define UM_KERN_NOTICE KERN_NOTICE | ||
36 | #define UM_KERN_INFO KERN_INFO | ||
37 | #define UM_KERN_DEBUG KERN_DEBUG | ||
38 | #define UM_KERN_CONT KERN_CONT | ||
39 | |||
40 | #ifdef UML_CONFIG_PRINTK | 29 | #ifdef UML_CONFIG_PRINTK |
41 | extern int printk(const char *fmt, ...) | 30 | extern int printk(const char *fmt, ...) |
42 | __attribute__ ((format (printf, 1, 2))); | 31 | __attribute__ ((format (printf, 1, 2))); |
@@ -47,11 +36,10 @@ static inline int printk(const char *fmt, ...) | |||
47 | } | 36 | } |
48 | #endif | 37 | #endif |
49 | 38 | ||
39 | extern void schedule(void); | ||
50 | extern int in_aton(char *str); | 40 | extern int in_aton(char *str); |
41 | extern int open_gdb_chan(void); | ||
51 | extern size_t strlcpy(char *, const char *, size_t); | 42 | extern size_t strlcpy(char *, const char *, size_t); |
52 | extern size_t strlcat(char *, const char *, size_t); | 43 | extern size_t strlcat(char *, const char *, size_t); |
53 | 44 | ||
54 | /* Copied from linux/compiler-gcc.h since we can't include it directly */ | ||
55 | #define barrier() __asm__ __volatile__("": : :"memory") | ||
56 | |||
57 | #endif | 45 | #endif |