diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/configs/badge4_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/thread_info.h | 3 | ||||
-rw-r--r-- | arch/arm/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/kernel/arthur.c | 94 | ||||
-rw-r--r-- | arch/arm/kernel/asm-offsets.c | 1 | ||||
-rw-r--r-- | arch/arm/kernel/signal.c | 13 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 6 |
8 files changed, 3 insertions, 126 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7cbf4ef5c6fd..392e7ae69452 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -2133,16 +2133,6 @@ menu "Userspace binary formats" | |||
2133 | 2133 | ||
2134 | source "fs/Kconfig.binfmt" | 2134 | source "fs/Kconfig.binfmt" |
2135 | 2135 | ||
2136 | config ARTHUR | ||
2137 | tristate "RISC OS personality" | ||
2138 | depends on !AEABI | ||
2139 | help | ||
2140 | Say Y here to include the kernel code necessary if you want to run | ||
2141 | Acorn RISC OS/Arthur binaries under Linux. This code is still very | ||
2142 | experimental; if this sounds frightening, say N and sleep in peace. | ||
2143 | You can also say M here to compile this support as a module (which | ||
2144 | will be called arthur). | ||
2145 | |||
2146 | endmenu | 2136 | endmenu |
2147 | 2137 | ||
2148 | menu "Power management options" | 2138 | menu "Power management options" |
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig index 0494c8f229a2..d59009878312 100644 --- a/arch/arm/configs/badge4_defconfig +++ b/arch/arm/configs/badge4_defconfig | |||
@@ -12,7 +12,6 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | |||
12 | CONFIG_FPE_NWFPE=y | 12 | CONFIG_FPE_NWFPE=y |
13 | CONFIG_BINFMT_AOUT=m | 13 | CONFIG_BINFMT_AOUT=m |
14 | CONFIG_BINFMT_MISC=m | 14 | CONFIG_BINFMT_MISC=m |
15 | CONFIG_ARTHUR=m | ||
16 | CONFIG_NET=y | 15 | CONFIG_NET=y |
17 | CONFIG_PACKET=y | 16 | CONFIG_PACKET=y |
18 | CONFIG_UNIX=y | 17 | CONFIG_UNIX=y |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 72812a1f3d1c..bd32eded3e50 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
24 | 24 | ||
25 | struct task_struct; | 25 | struct task_struct; |
26 | struct exec_domain; | ||
27 | 26 | ||
28 | #include <asm/types.h> | 27 | #include <asm/types.h> |
29 | #include <asm/domain.h> | 28 | #include <asm/domain.h> |
@@ -53,7 +52,6 @@ struct thread_info { | |||
53 | int preempt_count; /* 0 => preemptable, <0 => bug */ | 52 | int preempt_count; /* 0 => preemptable, <0 => bug */ |
54 | mm_segment_t addr_limit; /* address limit */ | 53 | mm_segment_t addr_limit; /* address limit */ |
55 | struct task_struct *task; /* main task structure */ | 54 | struct task_struct *task; /* main task structure */ |
56 | struct exec_domain *exec_domain; /* execution domain */ | ||
57 | __u32 cpu; /* cpu */ | 55 | __u32 cpu; /* cpu */ |
58 | __u32 cpu_domain; /* cpu domain */ | 56 | __u32 cpu_domain; /* cpu domain */ |
59 | struct cpu_context_save cpu_context; /* cpu context */ | 57 | struct cpu_context_save cpu_context; /* cpu context */ |
@@ -73,7 +71,6 @@ struct thread_info { | |||
73 | #define INIT_THREAD_INFO(tsk) \ | 71 | #define INIT_THREAD_INFO(tsk) \ |
74 | { \ | 72 | { \ |
75 | .task = &tsk, \ | 73 | .task = &tsk, \ |
76 | .exec_domain = &default_exec_domain, \ | ||
77 | .flags = 0, \ | 74 | .flags = 0, \ |
78 | .preempt_count = INIT_PREEMPT_COUNT, \ | 75 | .preempt_count = INIT_PREEMPT_COUNT, \ |
79 | .addr_limit = KERNEL_DS, \ | 76 | .addr_limit = KERNEL_DS, \ |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index ba5f83226011..752725dcbf42 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -34,7 +34,6 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o | |||
34 | obj-$(CONFIG_ISA_DMA_API) += dma.o | 34 | obj-$(CONFIG_ISA_DMA_API) += dma.o |
35 | obj-$(CONFIG_FIQ) += fiq.o fiqasm.o | 35 | obj-$(CONFIG_FIQ) += fiq.o fiqasm.o |
36 | obj-$(CONFIG_MODULES) += armksyms.o module.o | 36 | obj-$(CONFIG_MODULES) += armksyms.o module.o |
37 | obj-$(CONFIG_ARTHUR) += arthur.o | ||
38 | obj-$(CONFIG_ISA_DMA) += dma-isa.o | 37 | obj-$(CONFIG_ISA_DMA) += dma-isa.o |
39 | obj-$(CONFIG_PCI) += bios32.o isa.o | 38 | obj-$(CONFIG_PCI) += bios32.o isa.o |
40 | obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o | 39 | obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o |
diff --git a/arch/arm/kernel/arthur.c b/arch/arm/kernel/arthur.c deleted file mode 100644 index 321c5291d05f..000000000000 --- a/arch/arm/kernel/arthur.c +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/arthur.c | ||
3 | * | ||
4 | * Copyright (C) 1998, 1999, 2000, 2001 Philip Blundell | ||
5 | * | ||
6 | * Arthur personality | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/module.h> | ||
17 | #include <linux/personality.h> | ||
18 | #include <linux/stddef.h> | ||
19 | #include <linux/signal.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/sched.h> | ||
22 | |||
23 | #include <asm/ptrace.h> | ||
24 | |||
25 | /* Arthur doesn't have many signals, and a lot of those that it does | ||
26 | have don't map easily to any Linux equivalent. Never mind. */ | ||
27 | |||
28 | #define ARTHUR_SIGABRT 1 | ||
29 | #define ARTHUR_SIGFPE 2 | ||
30 | #define ARTHUR_SIGILL 3 | ||
31 | #define ARTHUR_SIGINT 4 | ||
32 | #define ARTHUR_SIGSEGV 5 | ||
33 | #define ARTHUR_SIGTERM 6 | ||
34 | #define ARTHUR_SIGSTAK 7 | ||
35 | #define ARTHUR_SIGUSR1 8 | ||
36 | #define ARTHUR_SIGUSR2 9 | ||
37 | #define ARTHUR_SIGOSERROR 10 | ||
38 | |||
39 | static unsigned long arthur_to_linux_signals[32] = { | ||
40 | 0, 1, 2, 3, 4, 5, 6, 7, | ||
41 | 8, 9, 10, 11, 12, 13, 14, 15, | ||
42 | 16, 17, 18, 19, 20, 21, 22, 23, | ||
43 | 24, 25, 26, 27, 28, 29, 30, 31 | ||
44 | }; | ||
45 | |||
46 | static unsigned long linux_to_arthur_signals[32] = { | ||
47 | 0, -1, ARTHUR_SIGINT, -1, | ||
48 | ARTHUR_SIGILL, 5, ARTHUR_SIGABRT, 7, | ||
49 | ARTHUR_SIGFPE, 9, ARTHUR_SIGUSR1, ARTHUR_SIGSEGV, | ||
50 | ARTHUR_SIGUSR2, 13, 14, ARTHUR_SIGTERM, | ||
51 | 16, 17, 18, 19, | ||
52 | 20, 21, 22, 23, | ||
53 | 24, 25, 26, 27, | ||
54 | 28, 29, 30, 31 | ||
55 | }; | ||
56 | |||
57 | static void arthur_lcall7(int nr, struct pt_regs *regs) | ||
58 | { | ||
59 | struct siginfo info; | ||
60 | info.si_signo = SIGSWI; | ||
61 | info.si_errno = nr; | ||
62 | /* Bounce it to the emulator */ | ||
63 | send_sig_info(SIGSWI, &info, current); | ||
64 | } | ||
65 | |||
66 | static struct exec_domain arthur_exec_domain = { | ||
67 | .name = "Arthur", | ||
68 | .handler = arthur_lcall7, | ||
69 | .pers_low = PER_RISCOS, | ||
70 | .pers_high = PER_RISCOS, | ||
71 | .signal_map = arthur_to_linux_signals, | ||
72 | .signal_invmap = linux_to_arthur_signals, | ||
73 | .module = THIS_MODULE, | ||
74 | }; | ||
75 | |||
76 | /* | ||
77 | * We could do with some locking to stop Arthur being removed while | ||
78 | * processes are using it. | ||
79 | */ | ||
80 | |||
81 | static int __init arthur_init(void) | ||
82 | { | ||
83 | return register_exec_domain(&arthur_exec_domain); | ||
84 | } | ||
85 | |||
86 | static void __exit arthur_exit(void) | ||
87 | { | ||
88 | unregister_exec_domain(&arthur_exec_domain); | ||
89 | } | ||
90 | |||
91 | module_init(arthur_init); | ||
92 | module_exit(arthur_exit); | ||
93 | |||
94 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 61bb5a65eb37..871b8267d211 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -67,7 +67,6 @@ int main(void) | |||
67 | DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); | 67 | DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); |
68 | DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit)); | 68 | DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit)); |
69 | DEFINE(TI_TASK, offsetof(struct thread_info, task)); | 69 | DEFINE(TI_TASK, offsetof(struct thread_info, task)); |
70 | DEFINE(TI_EXEC_DOMAIN, offsetof(struct thread_info, exec_domain)); | ||
71 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); | 70 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); |
72 | DEFINE(TI_CPU_DOMAIN, offsetof(struct thread_info, cpu_domain)); | 71 | DEFINE(TI_CPU_DOMAIN, offsetof(struct thread_info, cpu_domain)); |
73 | DEFINE(TI_CPU_SAVE, offsetof(struct thread_info, cpu_context)); | 72 | DEFINE(TI_CPU_SAVE, offsetof(struct thread_info, cpu_context)); |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 023ac905e4c3..423663e23791 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -318,17 +318,6 @@ get_sigframe(struct ksignal *ksig, struct pt_regs *regs, int framesize) | |||
318 | return frame; | 318 | return frame; |
319 | } | 319 | } |
320 | 320 | ||
321 | /* | ||
322 | * translate the signal | ||
323 | */ | ||
324 | static inline int map_sig(int sig) | ||
325 | { | ||
326 | struct thread_info *thread = current_thread_info(); | ||
327 | if (sig < 32 && thread->exec_domain && thread->exec_domain->signal_invmap) | ||
328 | sig = thread->exec_domain->signal_invmap[sig]; | ||
329 | return sig; | ||
330 | } | ||
331 | |||
332 | static int | 321 | static int |
333 | setup_return(struct pt_regs *regs, struct ksignal *ksig, | 322 | setup_return(struct pt_regs *regs, struct ksignal *ksig, |
334 | unsigned long __user *rc, void __user *frame) | 323 | unsigned long __user *rc, void __user *frame) |
@@ -412,7 +401,7 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
412 | } | 401 | } |
413 | } | 402 | } |
414 | 403 | ||
415 | regs->ARM_r0 = map_sig(ksig->sig); | 404 | regs->ARM_r0 = ksig->sig; |
416 | regs->ARM_sp = (unsigned long)frame; | 405 | regs->ARM_sp = (unsigned long)frame; |
417 | regs->ARM_lr = retcode; | 406 | regs->ARM_lr = retcode; |
418 | regs->ARM_pc = handler; | 407 | regs->ARM_pc = handler; |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 788e23fe64d8..3dce1a342030 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -505,12 +505,10 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason) | |||
505 | 505 | ||
506 | static int bad_syscall(int n, struct pt_regs *regs) | 506 | static int bad_syscall(int n, struct pt_regs *regs) |
507 | { | 507 | { |
508 | struct thread_info *thread = current_thread_info(); | ||
509 | siginfo_t info; | 508 | siginfo_t info; |
510 | 509 | ||
511 | if ((current->personality & PER_MASK) != PER_LINUX && | 510 | if ((current->personality & PER_MASK) != PER_LINUX) { |
512 | thread->exec_domain->handler) { | 511 | send_sig(SIGSEGV, current, 1); |
513 | thread->exec_domain->handler(n, regs); | ||
514 | return regs->ARM_r0; | 512 | return regs->ARM_r0; |
515 | } | 513 | } |
516 | 514 | ||