diff options
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/common-offsets.h | 11 | ||||
-rw-r--r-- | arch/um/include/irq_kern.h | 5 | ||||
-rw-r--r-- | arch/um/include/kern_util.h | 1 | ||||
-rw-r--r-- | arch/um/include/longjmp.h | 3 | ||||
-rw-r--r-- | arch/um/include/mconsole_kern.h | 1 | ||||
-rw-r--r-- | arch/um/include/mode_kern.h | 2 | ||||
-rw-r--r-- | arch/um/include/os.h | 1 | ||||
-rw-r--r-- | arch/um/include/skas/mmu-skas.h | 1 | ||||
-rw-r--r-- | arch/um/include/sysdep-i386/kernel-offsets.h | 5 | ||||
-rw-r--r-- | arch/um/include/sysdep-ppc/ptrace.h | 1 | ||||
-rw-r--r-- | arch/um/include/sysdep-x86_64/kernel-offsets.h | 5 | ||||
-rw-r--r-- | arch/um/include/um_malloc.h | 17 | ||||
-rw-r--r-- | arch/um/include/um_uaccess.h | 1 | ||||
-rw-r--r-- | arch/um/include/user.h | 6 | ||||
-rw-r--r-- | arch/um/include/user_util.h | 1 |
15 files changed, 35 insertions, 26 deletions
diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h index 356390d..461175f 100644 --- a/arch/um/include/common-offsets.h +++ b/arch/um/include/common-offsets.h @@ -1,9 +1,16 @@ /* for use by sys-$SUBARCH/kernel-offsets.c */ +DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); +#ifdef CONFIG_MODE_TT +OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid); +#endif + OFFSET(HOST_TASK_REGS, task_struct, thread.regs); OFFSET(HOST_TASK_PID, task_struct, pid); + DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); + DEFINE_STR(UM_KERN_EMERG, KERN_EMERG); DEFINE_STR(UM_KERN_ALERT, KERN_ALERT); DEFINE_STR(UM_KERN_CRIT, KERN_CRIT); @@ -12,6 +19,10 @@ DEFINE_STR(UM_KERN_WARNING, KERN_WARNING); DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE); DEFINE_STR(UM_KERN_INFO, KERN_INFO); DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG); + DEFINE(UM_ELF_CLASS, ELF_CLASS); DEFINE(UM_ELFCLASS32, ELFCLASS32); DEFINE(UM_ELFCLASS64, ELFCLASS64); + +/* For crypto assembler code. */ +DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h index c222d56..4f77559 100644 --- a/arch/um/include/irq_kern.h +++ b/arch/um/include/irq_kern.h @@ -10,12 +10,11 @@ #include "asm/ptrace.h" extern int um_request_irq(unsigned int irq, int fd, int type, - irqreturn_t (*handler)(int, void *, - struct pt_regs *), + irq_handler_t handler, unsigned long irqflags, const char * devname, void *dev_id); extern int init_aio_irq(int irq, char *name, - irqreturn_t (*handler)(int, void *, struct pt_regs *)); + irq_handler_t handler); #endif diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 59cfa9e..cec9fcc 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h @@ -6,7 +6,6 @@ #ifndef __KERN_UTIL_H__ #define __KERN_UTIL_H__ -#include "linux/threads.h" #include "sysdep/ptrace.h" #include "sysdep/faultinfo.h" diff --git a/arch/um/include/longjmp.h b/arch/um/include/longjmp.h index e93c6d3..e860bc584 100644 --- a/arch/um/include/longjmp.h +++ b/arch/um/include/longjmp.h @@ -12,7 +12,8 @@ extern void longjmp(jmp_buf, int); } while(0) #define UML_SETJMP(buf) ({ \ - int n, enable; \ + int n; \ + volatile int enable; \ enable = get_signals(); \ n = setjmp(*buf); \ if(n != 0) \ diff --git a/arch/um/include/mconsole_kern.h b/arch/um/include/mconsole_kern.h index d86ee14..d0b6901 100644 --- a/arch/um/include/mconsole_kern.h +++ b/arch/um/include/mconsole_kern.h @@ -6,7 +6,6 @@ #ifndef __MCONSOLE_KERN_H__ #define __MCONSOLE_KERN_H__ -#include "linux/config.h" #include "linux/list.h" #include "mconsole.h" diff --git a/arch/um/include/mode_kern.h b/arch/um/include/mode_kern.h index e7539a8..88e5e77 100644 --- a/arch/um/include/mode_kern.h +++ b/arch/um/include/mode_kern.h @@ -6,8 +6,6 @@ #ifndef __MODE_KERN_H__ #define __MODE_KERN_H__ -#include "linux/config.h" - #ifdef CONFIG_MODE_TT #include "mode_kern_tt.h" #endif diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 120ca21..6516f6d 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h @@ -201,6 +201,7 @@ extern int os_getpgrp(void); #ifdef UML_CONFIG_MODE_TT extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); +extern void stop(void); #endif extern void init_new_thread_signals(void); extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); diff --git a/arch/um/include/skas/mmu-skas.h b/arch/um/include/skas/mmu-skas.h index d8869a6..b26986c 100644 --- a/arch/um/include/skas/mmu-skas.h +++ b/arch/um/include/skas/mmu-skas.h @@ -6,7 +6,6 @@ #ifndef __SKAS_MMU_H #define __SKAS_MMU_H -#include "linux/config.h" #include "mm_id.h" #include "asm/ldt.h" diff --git a/arch/um/include/sysdep-i386/kernel-offsets.h b/arch/um/include/sysdep-i386/kernel-offsets.h index 2c13de3..97ec9d8 100644 --- a/arch/um/include/sysdep-i386/kernel-offsets.h +++ b/arch/um/include/sysdep-i386/kernel-offsets.h @@ -1,6 +1,7 @@ #include <linux/stddef.h> #include <linux/sched.h> #include <linux/elf.h> +#include <linux/crypto.h> #include <asm/mman.h> #define DEFINE(sym, val) \ @@ -17,9 +18,5 @@ void foo(void) { OFFSET(HOST_TASK_DEBUGREGS, task_struct, thread.arch.debugregs); - DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); -#ifdef CONFIG_MODE_TT - OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid); -#endif #include <common-offsets.h> } diff --git a/arch/um/include/sysdep-ppc/ptrace.h b/arch/um/include/sysdep-ppc/ptrace.h index 8a27353..df2397d 100644 --- a/arch/um/include/sysdep-ppc/ptrace.h +++ b/arch/um/include/sysdep-ppc/ptrace.h @@ -5,7 +5,6 @@ #ifndef __SYS_PTRACE_PPC_H #define __SYS_PTRACE_PPC_H -#include "linux/config.h" #include "linux/types.h" /* the following taken from <asm-ppc/ptrace.h> */ diff --git a/arch/um/include/sysdep-x86_64/kernel-offsets.h b/arch/um/include/sysdep-x86_64/kernel-offsets.h index 91d129f..a307237 100644 --- a/arch/um/include/sysdep-x86_64/kernel-offsets.h +++ b/arch/um/include/sysdep-x86_64/kernel-offsets.h @@ -2,6 +2,7 @@ #include <linux/sched.h> #include <linux/time.h> #include <linux/elf.h> +#include <linux/crypto.h> #include <asm/page.h> #include <asm/mman.h> @@ -18,9 +19,5 @@ void foo(void) { - DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); -#ifdef CONFIG_MODE_TT - OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid); -#endif #include <common-offsets.h> } diff --git a/arch/um/include/um_malloc.h b/arch/um/include/um_malloc.h new file mode 100644 index 0000000..0363a9b --- /dev/null +++ b/arch/um/include/um_malloc.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2005 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> + * Licensed under the GPL + */ + +#ifndef __UM_MALLOC_H__ +#define __UM_MALLOC_H__ + +extern void *um_kmalloc(int size); +extern void *um_kmalloc_atomic(int size); +extern void kfree(const void *ptr); + +extern void *um_vmalloc(int size); +extern void *um_vmalloc_atomic(int size); +extern void vfree(void *ptr); + +#endif /* __UM_MALLOC_H__ */ diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h index 4567f1e..5126a99 100644 --- a/arch/um/include/um_uaccess.h +++ b/arch/um/include/um_uaccess.h @@ -6,7 +6,6 @@ #ifndef __ARCH_UM_UACCESS_H #define __ARCH_UM_UACCESS_H -#include "linux/config.h" #include "choose-mode.h" #ifdef CONFIG_MODE_TT diff --git a/arch/um/include/user.h b/arch/um/include/user.h index 39f8c88..acadce3 100644 --- a/arch/um/include/user.h +++ b/arch/um/include/user.h @@ -11,17 +11,11 @@ extern void panic(const char *fmt, ...) extern int printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); extern void schedule(void); -extern void *um_kmalloc(int size); -extern void *um_kmalloc_atomic(int size); -extern void kfree(void *ptr); extern int in_aton(char *str); extern int open_gdb_chan(void); /* These use size_t, however unsigned long is correct on both i386 and x86_64. */ extern unsigned long strlcpy(char *, const char *, unsigned long); extern unsigned long strlcat(char *, const char *, unsigned long); -extern void *um_vmalloc(int size); -extern void *um_vmalloc_atomic(int size); -extern void vfree(void *ptr); #endif diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index 802d784..06625fe 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h @@ -52,7 +52,6 @@ extern int linux_main(int argc, char **argv); extern void set_cmdline(char *cmd); extern void input_cb(void (*proc)(void *), void *arg, int arg_len); extern int get_pty(void); -extern void *um_kmalloc(int size); extern int switcheroo(int fd, int prot, void *from, void *to, int size); extern void do_exec(int old_pid, int new_pid); extern void tracer_panic(char *msg, ...) |