diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 7 | ||||
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 2 | ||||
-rw-r--r-- | arch/c6x/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/c6x/include/asm/barrier.h | 27 | ||||
-rw-r--r-- | arch/tile/include/gxio/iorpc_trio.h | 24 | ||||
-rw-r--r-- | arch/um/include/asm/processor-generic.h | 9 | ||||
-rw-r--r-- | arch/um/include/shared/common-offsets.h | 10 | ||||
-rw-r--r-- | arch/um/include/shared/user.h | 11 | ||||
-rw-r--r-- | arch/um/kernel/exec.c | 25 | ||||
-rw-r--r-- | arch/um/kernel/process.c | 8 | ||||
-rw-r--r-- | arch/um/kernel/signal.c | 6 | ||||
-rw-r--r-- | arch/um/kernel/syscall.c | 24 | ||||
-rw-r--r-- | arch/um/scripts/Makefile.rules | 2 | ||||
-rw-r--r-- | arch/x86/um/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/um/shared/sysdep/kernel-offsets.h | 3 | ||||
-rw-r--r-- | arch/x86/um/shared/sysdep/syscalls.h | 2 | ||||
-rw-r--r-- | arch/x86/um/signal.c | 6 | ||||
-rw-r--r-- | arch/x86/um/sys_call_table_32.c | 2 | ||||
-rw-r--r-- | arch/x86/um/syscalls_32.c | 27 | ||||
-rw-r--r-- | arch/x86/um/syscalls_64.c | 23 | ||||
-rw-r--r-- | arch/x86/xen/setup.c | 4 |
22 files changed, 81 insertions, 145 deletions
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 8dabfe81d07c..ff886e01a0b0 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -261,7 +261,7 @@ static void __init apx4devkit_init(void) | |||
261 | enable_clk_enet_out(); | 261 | enable_clk_enet_out(); |
262 | 262 | ||
263 | if (IS_BUILTIN(CONFIG_PHYLIB)) | 263 | if (IS_BUILTIN(CONFIG_PHYLIB)) |
264 | phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK, | 264 | phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK, |
265 | apx4devkit_phy_fixup); | 265 | apx4devkit_phy_fixup); |
266 | 266 | ||
267 | mxsfb_pdata.mode_list = apx4devkit_video_modes; | 267 | mxsfb_pdata.mode_list = apx4devkit_video_modes; |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 410291c67666..a6cd14ab1e4e 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -204,6 +204,13 @@ void __init orion5x_wdt_init(void) | |||
204 | void __init orion5x_init_early(void) | 204 | void __init orion5x_init_early(void) |
205 | { | 205 | { |
206 | orion_time_set_base(TIMER_VIRT_BASE); | 206 | orion_time_set_base(TIMER_VIRT_BASE); |
207 | |||
208 | /* | ||
209 | * Some Orion5x devices allocate their coherent buffers from atomic | ||
210 | * context. Increase size of atomic coherent pool to make sure such | ||
211 | * the allocations won't fail. | ||
212 | */ | ||
213 | init_dma_coherent_pool_size(SZ_1M); | ||
207 | } | 214 | } |
208 | 215 | ||
209 | int orion5x_tclk; | 216 | int orion5x_tclk; |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index e59c4ab71bcb..13f555d62491 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -346,6 +346,8 @@ static int __init atomic_pool_init(void) | |||
346 | (unsigned)pool->size / 1024); | 346 | (unsigned)pool->size / 1024); |
347 | return 0; | 347 | return 0; |
348 | } | 348 | } |
349 | |||
350 | kfree(pages); | ||
349 | no_pages: | 351 | no_pages: |
350 | kfree(bitmap); | 352 | kfree(bitmap); |
351 | no_bitmap: | 353 | no_bitmap: |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 3af601e31e66..f08e89183cda 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
@@ -2,6 +2,7 @@ include include/asm-generic/Kbuild.asm | |||
2 | 2 | ||
3 | generic-y += atomic.h | 3 | generic-y += atomic.h |
4 | generic-y += auxvec.h | 4 | generic-y += auxvec.h |
5 | generic-y += barrier.h | ||
5 | generic-y += bitsperlong.h | 6 | generic-y += bitsperlong.h |
6 | generic-y += bugs.h | 7 | generic-y += bugs.h |
7 | generic-y += cputime.h | 8 | generic-y += cputime.h |
diff --git a/arch/c6x/include/asm/barrier.h b/arch/c6x/include/asm/barrier.h deleted file mode 100644 index 538240e85909..000000000000 --- a/arch/c6x/include/asm/barrier.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * Port on Texas Instruments TMS320C6x architecture | ||
3 | * | ||
4 | * Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated | ||
5 | * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _ASM_C6X_BARRIER_H | ||
12 | #define _ASM_C6X_BARRIER_H | ||
13 | |||
14 | #define nop() asm("NOP\n"); | ||
15 | |||
16 | #define mb() barrier() | ||
17 | #define rmb() barrier() | ||
18 | #define wmb() barrier() | ||
19 | #define set_mb(var, value) do { var = value; mb(); } while (0) | ||
20 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | ||
21 | |||
22 | #define smp_mb() barrier() | ||
23 | #define smp_rmb() barrier() | ||
24 | #define smp_wmb() barrier() | ||
25 | #define smp_read_barrier_depends() do { } while (0) | ||
26 | |||
27 | #endif /* _ASM_C6X_BARRIER_H */ | ||
diff --git a/arch/tile/include/gxio/iorpc_trio.h b/arch/tile/include/gxio/iorpc_trio.h index 15fb77992083..58105c31228b 100644 --- a/arch/tile/include/gxio/iorpc_trio.h +++ b/arch/tile/include/gxio/iorpc_trio.h | |||
@@ -25,21 +25,23 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
27 | 27 | ||
28 | #define GXIO_TRIO_OP_ALLOC_ASIDS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1400) | 28 | #define GXIO_TRIO_OP_DEALLOC_ASID IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1400) |
29 | #define GXIO_TRIO_OP_ALLOC_ASIDS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1401) | ||
29 | 30 | ||
30 | #define GXIO_TRIO_OP_ALLOC_MEMORY_MAPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1402) | 31 | #define GXIO_TRIO_OP_ALLOC_MEMORY_MAPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1404) |
31 | 32 | ||
32 | #define GXIO_TRIO_OP_ALLOC_PIO_REGIONS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140e) | 33 | #define GXIO_TRIO_OP_ALLOC_PIO_REGIONS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1412) |
33 | #define GXIO_TRIO_OP_INIT_PIO_REGION_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140f) | ||
34 | 34 | ||
35 | #define GXIO_TRIO_OP_INIT_MEMORY_MAP_MMU_AUX IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1417) | 35 | #define GXIO_TRIO_OP_INIT_PIO_REGION_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1414) |
36 | #define GXIO_TRIO_OP_GET_PORT_PROPERTY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1418) | ||
37 | #define GXIO_TRIO_OP_CONFIG_LEGACY_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1419) | ||
38 | #define GXIO_TRIO_OP_CONFIG_MSI_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x141a) | ||
39 | 36 | ||
40 | #define GXIO_TRIO_OP_SET_MPS_MRS IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141c) | 37 | #define GXIO_TRIO_OP_INIT_MEMORY_MAP_MMU_AUX IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141e) |
41 | #define GXIO_TRIO_OP_FORCE_RC_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141d) | 38 | #define GXIO_TRIO_OP_GET_PORT_PROPERTY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141f) |
42 | #define GXIO_TRIO_OP_FORCE_EP_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141e) | 39 | #define GXIO_TRIO_OP_CONFIG_LEGACY_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1420) |
40 | #define GXIO_TRIO_OP_CONFIG_MSI_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1421) | ||
41 | |||
42 | #define GXIO_TRIO_OP_SET_MPS_MRS IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1423) | ||
43 | #define GXIO_TRIO_OP_FORCE_RC_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1424) | ||
44 | #define GXIO_TRIO_OP_FORCE_EP_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1425) | ||
43 | #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) | 45 | #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) |
44 | #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) | 46 | #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) |
45 | 47 | ||
diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index 69f1c57a8d0d..33a6a2423bd2 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h | |||
@@ -20,14 +20,6 @@ struct mm_struct; | |||
20 | 20 | ||
21 | struct thread_struct { | 21 | struct thread_struct { |
22 | struct task_struct *saved_task; | 22 | struct task_struct *saved_task; |
23 | /* | ||
24 | * This flag is set to 1 before calling do_fork (and analyzed in | ||
25 | * copy_thread) to mark that we are begin called from userspace (fork / | ||
26 | * vfork / clone), and reset to 0 after. It is left to 0 when called | ||
27 | * from kernelspace (i.e. kernel_thread() or fork_idle(), | ||
28 | * as of 2.6.11). | ||
29 | */ | ||
30 | int forking; | ||
31 | struct pt_regs regs; | 23 | struct pt_regs regs; |
32 | int singlestep_syscall; | 24 | int singlestep_syscall; |
33 | void *fault_addr; | 25 | void *fault_addr; |
@@ -58,7 +50,6 @@ struct thread_struct { | |||
58 | 50 | ||
59 | #define INIT_THREAD \ | 51 | #define INIT_THREAD \ |
60 | { \ | 52 | { \ |
61 | .forking = 0, \ | ||
62 | .regs = EMPTY_REGS, \ | 53 | .regs = EMPTY_REGS, \ |
63 | .fault_addr = NULL, \ | 54 | .fault_addr = NULL, \ |
64 | .prev_sched = NULL, \ | 55 | .prev_sched = NULL, \ |
diff --git a/arch/um/include/shared/common-offsets.h b/arch/um/include/shared/common-offsets.h index 40db8f71deae..2df313b6a586 100644 --- a/arch/um/include/shared/common-offsets.h +++ b/arch/um/include/shared/common-offsets.h | |||
@@ -7,16 +7,6 @@ DEFINE(UM_KERN_PAGE_MASK, PAGE_MASK); | |||
7 | DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT); | 7 | DEFINE(UM_KERN_PAGE_SHIFT, PAGE_SHIFT); |
8 | DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); | 8 | DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); |
9 | 9 | ||
10 | DEFINE_STR(UM_KERN_EMERG, KERN_EMERG); | ||
11 | DEFINE_STR(UM_KERN_ALERT, KERN_ALERT); | ||
12 | DEFINE_STR(UM_KERN_CRIT, KERN_CRIT); | ||
13 | DEFINE_STR(UM_KERN_ERR, KERN_ERR); | ||
14 | DEFINE_STR(UM_KERN_WARNING, KERN_WARNING); | ||
15 | DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE); | ||
16 | DEFINE_STR(UM_KERN_INFO, KERN_INFO); | ||
17 | DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG); | ||
18 | DEFINE_STR(UM_KERN_CONT, KERN_CONT); | ||
19 | |||
20 | DEFINE(UM_ELF_CLASS, ELF_CLASS); | 10 | DEFINE(UM_ELF_CLASS, ELF_CLASS); |
21 | DEFINE(UM_ELFCLASS32, ELFCLASS32); | 11 | DEFINE(UM_ELFCLASS32, ELFCLASS32); |
22 | DEFINE(UM_ELFCLASS64, ELFCLASS64); | 12 | DEFINE(UM_ELFCLASS64, ELFCLASS64); |
diff --git a/arch/um/include/shared/user.h b/arch/um/include/shared/user.h index 4fa82c055aab..cef068563336 100644 --- a/arch/um/include/shared/user.h +++ b/arch/um/include/shared/user.h | |||
@@ -26,6 +26,17 @@ | |||
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 | |||
29 | #ifdef UML_CONFIG_PRINTK | 40 | #ifdef UML_CONFIG_PRINTK |
30 | extern int printk(const char *fmt, ...) | 41 | extern int printk(const char *fmt, ...) |
31 | __attribute__ ((format (printf, 1, 2))); | 42 | __attribute__ ((format (printf, 1, 2))); |
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 6cade9366364..8c82786da823 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -39,34 +39,21 @@ void flush_thread(void) | |||
39 | 39 | ||
40 | void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) | 40 | void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) |
41 | { | 41 | { |
42 | get_safe_registers(regs->regs.gp, regs->regs.fp); | ||
42 | PT_REGS_IP(regs) = eip; | 43 | PT_REGS_IP(regs) = eip; |
43 | PT_REGS_SP(regs) = esp; | 44 | PT_REGS_SP(regs) = esp; |
44 | } | 45 | current->ptrace &= ~PT_DTRACE; |
45 | EXPORT_SYMBOL(start_thread); | ||
46 | |||
47 | static long execve1(const char *file, | ||
48 | const char __user *const __user *argv, | ||
49 | const char __user *const __user *env) | ||
50 | { | ||
51 | long error; | ||
52 | |||
53 | error = do_execve(file, argv, env, ¤t->thread.regs); | ||
54 | if (error == 0) { | ||
55 | task_lock(current); | ||
56 | current->ptrace &= ~PT_DTRACE; | ||
57 | #ifdef SUBARCH_EXECVE1 | 46 | #ifdef SUBARCH_EXECVE1 |
58 | SUBARCH_EXECVE1(¤t->thread.regs.regs); | 47 | SUBARCH_EXECVE1(regs->regs); |
59 | #endif | 48 | #endif |
60 | task_unlock(current); | ||
61 | } | ||
62 | return error; | ||
63 | } | 49 | } |
50 | EXPORT_SYMBOL(start_thread); | ||
64 | 51 | ||
65 | long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env) | 52 | long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env) |
66 | { | 53 | { |
67 | long err; | 54 | long err; |
68 | 55 | ||
69 | err = execve1(file, argv, env); | 56 | err = do_execve(file, argv, env, ¤t->thread.regs); |
70 | if (!err) | 57 | if (!err) |
71 | UML_LONGJMP(current->thread.exec_buf, 1); | 58 | UML_LONGJMP(current->thread.exec_buf, 1); |
72 | return err; | 59 | return err; |
@@ -81,7 +68,7 @@ long sys_execve(const char __user *file, const char __user *const __user *argv, | |||
81 | filename = getname(file); | 68 | filename = getname(file); |
82 | error = PTR_ERR(filename); | 69 | error = PTR_ERR(filename); |
83 | if (IS_ERR(filename)) goto out; | 70 | if (IS_ERR(filename)) goto out; |
84 | error = execve1(filename, argv, env); | 71 | error = do_execve(filename, argv, env, ¤t->thread.regs); |
85 | putname(filename); | 72 | putname(filename); |
86 | out: | 73 | out: |
87 | return error; | 74 | return error; |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 57fc7028714a..c5f5afa50745 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -181,11 +181,12 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
181 | struct pt_regs *regs) | 181 | struct pt_regs *regs) |
182 | { | 182 | { |
183 | void (*handler)(void); | 183 | void (*handler)(void); |
184 | int kthread = current->flags & PF_KTHREAD; | ||
184 | int ret = 0; | 185 | int ret = 0; |
185 | 186 | ||
186 | p->thread = (struct thread_struct) INIT_THREAD; | 187 | p->thread = (struct thread_struct) INIT_THREAD; |
187 | 188 | ||
188 | if (current->thread.forking) { | 189 | if (!kthread) { |
189 | memcpy(&p->thread.regs.regs, ®s->regs, | 190 | memcpy(&p->thread.regs.regs, ®s->regs, |
190 | sizeof(p->thread.regs.regs)); | 191 | sizeof(p->thread.regs.regs)); |
191 | PT_REGS_SET_SYSCALL_RETURN(&p->thread.regs, 0); | 192 | PT_REGS_SET_SYSCALL_RETURN(&p->thread.regs, 0); |
@@ -195,8 +196,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
195 | handler = fork_handler; | 196 | handler = fork_handler; |
196 | 197 | ||
197 | arch_copy_thread(¤t->thread.arch, &p->thread.arch); | 198 | arch_copy_thread(¤t->thread.arch, &p->thread.arch); |
198 | } | 199 | } else { |
199 | else { | ||
200 | get_safe_registers(p->thread.regs.regs.gp, p->thread.regs.regs.fp); | 200 | get_safe_registers(p->thread.regs.regs.gp, p->thread.regs.regs.fp); |
201 | p->thread.request.u.thread = current->thread.request.u.thread; | 201 | p->thread.request.u.thread = current->thread.request.u.thread; |
202 | handler = new_thread_handler; | 202 | handler = new_thread_handler; |
@@ -204,7 +204,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
204 | 204 | ||
205 | new_thread(task_stack_page(p), &p->thread.switch_buf, handler); | 205 | new_thread(task_stack_page(p), &p->thread.switch_buf, handler); |
206 | 206 | ||
207 | if (current->thread.forking) { | 207 | if (!kthread) { |
208 | clear_flushed_tls(p); | 208 | clear_flushed_tls(p); |
209 | 209 | ||
210 | /* | 210 | /* |
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index 7362d58efc29..cc9c2350e417 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c | |||
@@ -22,9 +22,13 @@ static void handle_signal(struct pt_regs *regs, unsigned long signr, | |||
22 | struct k_sigaction *ka, siginfo_t *info) | 22 | struct k_sigaction *ka, siginfo_t *info) |
23 | { | 23 | { |
24 | sigset_t *oldset = sigmask_to_save(); | 24 | sigset_t *oldset = sigmask_to_save(); |
25 | int singlestep = 0; | ||
25 | unsigned long sp; | 26 | unsigned long sp; |
26 | int err; | 27 | int err; |
27 | 28 | ||
29 | if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) | ||
30 | singlestep = 1; | ||
31 | |||
28 | /* Did we come from a system call? */ | 32 | /* Did we come from a system call? */ |
29 | if (PT_REGS_SYSCALL_NR(regs) >= 0) { | 33 | if (PT_REGS_SYSCALL_NR(regs) >= 0) { |
30 | /* If so, check system call restarting.. */ | 34 | /* If so, check system call restarting.. */ |
@@ -61,7 +65,7 @@ static void handle_signal(struct pt_regs *regs, unsigned long signr, | |||
61 | if (err) | 65 | if (err) |
62 | force_sigsegv(signr, current); | 66 | force_sigsegv(signr, current); |
63 | else | 67 | else |
64 | signal_delivered(signr, info, ka, regs, 0); | 68 | signal_delivered(signr, info, ka, regs, singlestep); |
65 | } | 69 | } |
66 | 70 | ||
67 | static int kern_do_signal(struct pt_regs *regs) | 71 | static int kern_do_signal(struct pt_regs *regs) |
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index f958cb876ee3..a4c6d8eee74c 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c | |||
@@ -17,25 +17,25 @@ | |||
17 | 17 | ||
18 | long sys_fork(void) | 18 | long sys_fork(void) |
19 | { | 19 | { |
20 | long ret; | 20 | return do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), |
21 | |||
22 | current->thread.forking = 1; | ||
23 | ret = do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), | ||
24 | ¤t->thread.regs, 0, NULL, NULL); | 21 | ¤t->thread.regs, 0, NULL, NULL); |
25 | current->thread.forking = 0; | ||
26 | return ret; | ||
27 | } | 22 | } |
28 | 23 | ||
29 | long sys_vfork(void) | 24 | long sys_vfork(void) |
30 | { | 25 | { |
31 | long ret; | 26 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, |
32 | |||
33 | current->thread.forking = 1; | ||
34 | ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, | ||
35 | UPT_SP(¤t->thread.regs.regs), | 27 | UPT_SP(¤t->thread.regs.regs), |
36 | ¤t->thread.regs, 0, NULL, NULL); | 28 | ¤t->thread.regs, 0, NULL, NULL); |
37 | current->thread.forking = 0; | 29 | } |
38 | return ret; | 30 | |
31 | long sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
32 | void __user *parent_tid, void __user *child_tid) | ||
33 | { | ||
34 | if (!newsp) | ||
35 | newsp = UPT_SP(¤t->thread.regs.regs); | ||
36 | |||
37 | return do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, | ||
38 | child_tid); | ||
39 | } | 39 | } |
40 | 40 | ||
41 | long old_mmap(unsigned long addr, unsigned long len, | 41 | long old_mmap(unsigned long addr, unsigned long len, |
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index d50270d26b42..15889df9b466 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -8,7 +8,7 @@ USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) | |||
8 | USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | 8 | USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) |
9 | 9 | ||
10 | $(USER_OBJS:.o=.%): \ | 10 | $(USER_OBJS:.o=.%): \ |
11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h $(CFLAGS_$(basetarget).o) | 11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include $(srctree)/include/linux/kern_levels.h -include user.h $(CFLAGS_$(basetarget).o) |
12 | 12 | ||
13 | # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of | 13 | # These are like USER_OBJS but filter USER_CFLAGS through unprofile instead of |
14 | # using it directly. | 14 | # using it directly. |
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig index 9926e11a772d..aeaff8bef2f1 100644 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig | |||
@@ -21,6 +21,7 @@ config 64BIT | |||
21 | config X86_32 | 21 | config X86_32 |
22 | def_bool !64BIT | 22 | def_bool !64BIT |
23 | select HAVE_AOUT | 23 | select HAVE_AOUT |
24 | select ARCH_WANT_IPC_PARSE_VERSION | ||
24 | 25 | ||
25 | config X86_64 | 26 | config X86_64 |
26 | def_bool 64BIT | 27 | def_bool 64BIT |
diff --git a/arch/x86/um/shared/sysdep/kernel-offsets.h b/arch/x86/um/shared/sysdep/kernel-offsets.h index 5868526b5eef..46a9df99f3c5 100644 --- a/arch/x86/um/shared/sysdep/kernel-offsets.h +++ b/arch/x86/um/shared/sysdep/kernel-offsets.h | |||
@@ -7,9 +7,6 @@ | |||
7 | #define DEFINE(sym, val) \ | 7 | #define DEFINE(sym, val) \ |
8 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | 8 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) |
9 | 9 | ||
10 | #define STR(x) #x | ||
11 | #define DEFINE_STR(sym, val) asm volatile("\n->" #sym " " STR(val) " " #val: : ) | ||
12 | |||
13 | #define BLANK() asm volatile("\n->" : : ) | 10 | #define BLANK() asm volatile("\n->" : : ) |
14 | 11 | ||
15 | #define OFFSET(sym, str, mem) \ | 12 | #define OFFSET(sym, str, mem) \ |
diff --git a/arch/x86/um/shared/sysdep/syscalls.h b/arch/x86/um/shared/sysdep/syscalls.h index bd9a89b67e41..ca255a805ed9 100644 --- a/arch/x86/um/shared/sysdep/syscalls.h +++ b/arch/x86/um/shared/sysdep/syscalls.h | |||
@@ -1,3 +1,5 @@ | |||
1 | extern long sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
2 | void __user *parent_tid, void __user *child_tid); | ||
1 | #ifdef __i386__ | 3 | #ifdef __i386__ |
2 | #include "syscalls_32.h" | 4 | #include "syscalls_32.h" |
3 | #else | 5 | #else |
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c index a508cea13503..ba7363ecf896 100644 --- a/arch/x86/um/signal.c +++ b/arch/x86/um/signal.c | |||
@@ -416,9 +416,6 @@ int setup_signal_stack_sc(unsigned long stack_top, int sig, | |||
416 | PT_REGS_AX(regs) = (unsigned long) sig; | 416 | PT_REGS_AX(regs) = (unsigned long) sig; |
417 | PT_REGS_DX(regs) = (unsigned long) 0; | 417 | PT_REGS_DX(regs) = (unsigned long) 0; |
418 | PT_REGS_CX(regs) = (unsigned long) 0; | 418 | PT_REGS_CX(regs) = (unsigned long) 0; |
419 | |||
420 | if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) | ||
421 | ptrace_notify(SIGTRAP); | ||
422 | return 0; | 419 | return 0; |
423 | } | 420 | } |
424 | 421 | ||
@@ -466,9 +463,6 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
466 | PT_REGS_AX(regs) = (unsigned long) sig; | 463 | PT_REGS_AX(regs) = (unsigned long) sig; |
467 | PT_REGS_DX(regs) = (unsigned long) &frame->info; | 464 | PT_REGS_DX(regs) = (unsigned long) &frame->info; |
468 | PT_REGS_CX(regs) = (unsigned long) &frame->uc; | 465 | PT_REGS_CX(regs) = (unsigned long) &frame->uc; |
469 | |||
470 | if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED)) | ||
471 | ptrace_notify(SIGTRAP); | ||
472 | return 0; | 466 | return 0; |
473 | } | 467 | } |
474 | 468 | ||
diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index 68d1dc91b37b..b5408cecac6c 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #define ptregs_execve sys_execve | 28 | #define ptregs_execve sys_execve |
29 | #define ptregs_iopl sys_iopl | 29 | #define ptregs_iopl sys_iopl |
30 | #define ptregs_vm86old sys_vm86old | 30 | #define ptregs_vm86old sys_vm86old |
31 | #define ptregs_clone sys_clone | 31 | #define ptregs_clone i386_clone |
32 | #define ptregs_vm86 sys_vm86 | 32 | #define ptregs_vm86 sys_vm86 |
33 | #define ptregs_sigaltstack sys_sigaltstack | 33 | #define ptregs_sigaltstack sys_sigaltstack |
34 | #define ptregs_vfork sys_vfork | 34 | #define ptregs_vfork sys_vfork |
diff --git a/arch/x86/um/syscalls_32.c b/arch/x86/um/syscalls_32.c index b853e8600b9d..db444c7218fe 100644 --- a/arch/x86/um/syscalls_32.c +++ b/arch/x86/um/syscalls_32.c | |||
@@ -3,37 +3,24 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/sched.h" | 6 | #include <linux/syscalls.h> |
7 | #include "linux/shm.h" | 7 | #include <sysdep/syscalls.h> |
8 | #include "linux/ipc.h" | ||
9 | #include "linux/syscalls.h" | ||
10 | #include "asm/mman.h" | ||
11 | #include "asm/uaccess.h" | ||
12 | #include "asm/unistd.h" | ||
13 | 8 | ||
14 | /* | 9 | /* |
15 | * The prototype on i386 is: | 10 | * The prototype on i386 is: |
16 | * | 11 | * |
17 | * int clone(int flags, void * child_stack, int * parent_tidptr, struct user_desc * newtls, int * child_tidptr) | 12 | * int clone(int flags, void * child_stack, int * parent_tidptr, struct user_desc * newtls |
18 | * | 13 | * |
19 | * and the "newtls" arg. on i386 is read by copy_thread directly from the | 14 | * and the "newtls" arg. on i386 is read by copy_thread directly from the |
20 | * register saved on the stack. | 15 | * register saved on the stack. |
21 | */ | 16 | */ |
22 | long sys_clone(unsigned long clone_flags, unsigned long newsp, | 17 | long i386_clone(unsigned long clone_flags, unsigned long newsp, |
23 | int __user *parent_tid, void *newtls, int __user *child_tid) | 18 | int __user *parent_tid, void *newtls, int __user *child_tid) |
24 | { | 19 | { |
25 | long ret; | 20 | return sys_clone(clone_flags, newsp, parent_tid, child_tid); |
26 | |||
27 | if (!newsp) | ||
28 | newsp = UPT_SP(¤t->thread.regs.regs); | ||
29 | |||
30 | current->thread.forking = 1; | ||
31 | ret = do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, | ||
32 | child_tid); | ||
33 | current->thread.forking = 0; | ||
34 | return ret; | ||
35 | } | 21 | } |
36 | 22 | ||
23 | |||
37 | long sys_sigaction(int sig, const struct old_sigaction __user *act, | 24 | long sys_sigaction(int sig, const struct old_sigaction __user *act, |
38 | struct old_sigaction __user *oact) | 25 | struct old_sigaction __user *oact) |
39 | { | 26 | { |
diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c index f3d82bb6e15a..adb08eb5c22a 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c | |||
@@ -5,12 +5,9 @@ | |||
5 | * Licensed under the GPL | 5 | * Licensed under the GPL |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include "linux/linkage.h" | 8 | #include <linux/sched.h> |
9 | #include "linux/personality.h" | 9 | #include <asm/prctl.h> /* XXX This should get the constants from libc */ |
10 | #include "linux/utsname.h" | 10 | #include <os.h> |
11 | #include "asm/prctl.h" /* XXX This should get the constants from libc */ | ||
12 | #include "asm/uaccess.h" | ||
13 | #include "os.h" | ||
14 | 11 | ||
15 | long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) | 12 | long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) |
16 | { | 13 | { |
@@ -79,20 +76,6 @@ long sys_arch_prctl(int code, unsigned long addr) | |||
79 | return arch_prctl(current, code, (unsigned long __user *) addr); | 76 | return arch_prctl(current, code, (unsigned long __user *) addr); |
80 | } | 77 | } |
81 | 78 | ||
82 | long sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
83 | void __user *parent_tid, void __user *child_tid) | ||
84 | { | ||
85 | long ret; | ||
86 | |||
87 | if (!newsp) | ||
88 | newsp = UPT_SP(¤t->thread.regs.regs); | ||
89 | current->thread.forking = 1; | ||
90 | ret = do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, | ||
91 | child_tid); | ||
92 | current->thread.forking = 0; | ||
93 | return ret; | ||
94 | } | ||
95 | |||
96 | void arch_switch_to(struct task_struct *to) | 79 | void arch_switch_to(struct task_struct *to) |
97 | { | 80 | { |
98 | if ((to->thread.arch.fs == 0) || (to->mm == NULL)) | 81 | if ((to->thread.arch.fs == 0) || (to->mm == NULL)) |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index d11ca11d14fc..e2d62d697b5d 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/e820.h> | 17 | #include <asm/e820.h> |
18 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
19 | #include <asm/acpi.h> | 19 | #include <asm/acpi.h> |
20 | #include <asm/numa.h> | ||
20 | #include <asm/xen/hypervisor.h> | 21 | #include <asm/xen/hypervisor.h> |
21 | #include <asm/xen/hypercall.h> | 22 | #include <asm/xen/hypercall.h> |
22 | 23 | ||
@@ -544,4 +545,7 @@ void __init xen_arch_setup(void) | |||
544 | disable_cpufreq(); | 545 | disable_cpufreq(); |
545 | WARN_ON(set_pm_idle_to_default()); | 546 | WARN_ON(set_pm_idle_to_default()); |
546 | fiddle_vdso(); | 547 | fiddle_vdso(); |
548 | #ifdef CONFIG_NUMA | ||
549 | numa_off = 1; | ||
550 | #endif | ||
547 | } | 551 | } |