diff options
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/Kconfig | 14 | ||||
-rw-r--r-- | arch/c6x/include/asm/elf.h | 14 | ||||
-rw-r--r-- | arch/c6x/include/asm/mmu.h | 4 | ||||
-rw-r--r-- | arch/c6x/include/asm/processor.h | 3 | ||||
-rw-r--r-- | arch/c6x/include/asm/ptrace.h | 5 | ||||
-rw-r--r-- | arch/c6x/include/asm/thread_info.h | 17 | ||||
-rw-r--r-- | arch/c6x/kernel/process.c | 16 | ||||
-rw-r--r-- | arch/c6x/kernel/signal.c | 3 |
8 files changed, 28 insertions, 48 deletions
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index 9d446eff2c04..052f81a76239 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # see Documentation/kbuild/kconfig-language.txt. | 3 | # see Documentation/kbuild/kconfig-language.txt. |
4 | # | 4 | # |
5 | 5 | ||
6 | config TMS320C6X | 6 | config C6X |
7 | def_bool y | 7 | def_bool y |
8 | select CLKDEV_LOOKUP | 8 | select CLKDEV_LOOKUP |
9 | select GENERIC_IRQ_SHOW | 9 | select GENERIC_IRQ_SHOW |
@@ -20,24 +20,12 @@ config TMS320C6X | |||
20 | config MMU | 20 | config MMU |
21 | def_bool n | 21 | def_bool n |
22 | 22 | ||
23 | config ZONE_DMA | ||
24 | def_bool y | ||
25 | |||
26 | config FPU | 23 | config FPU |
27 | def_bool n | 24 | def_bool n |
28 | 25 | ||
29 | config HIGHMEM | ||
30 | def_bool n | ||
31 | |||
32 | config NUMA | ||
33 | def_bool n | ||
34 | |||
35 | config RWSEM_GENERIC_SPINLOCK | 26 | config RWSEM_GENERIC_SPINLOCK |
36 | def_bool y | 27 | def_bool y |
37 | 28 | ||
38 | config RWSEM_XCHGADD_ALGORITHM | ||
39 | def_bool n | ||
40 | |||
41 | config GENERIC_CALIBRATE_DELAY | 29 | config GENERIC_CALIBRATE_DELAY |
42 | def_bool y | 30 | def_bool y |
43 | 31 | ||
diff --git a/arch/c6x/include/asm/elf.h b/arch/c6x/include/asm/elf.h index d57865ba2c44..f4552db20b4a 100644 --- a/arch/c6x/include/asm/elf.h +++ b/arch/c6x/include/asm/elf.h | |||
@@ -30,7 +30,19 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
30 | */ | 30 | */ |
31 | #define elf_check_arch(x) ((x)->e_machine == EM_TI_C6000) | 31 | #define elf_check_arch(x) ((x)->e_machine == EM_TI_C6000) |
32 | 32 | ||
33 | #define elf_check_const_displacement(x) (1) | 33 | #define elf_check_fdpic(x) (1) |
34 | #define elf_check_const_displacement(x) (0) | ||
35 | |||
36 | #define ELF_FDPIC_PLAT_INIT(_regs, _exec_map, _interp_map, _dynamic_addr) \ | ||
37 | do { \ | ||
38 | _regs->b4 = (_exec_map); \ | ||
39 | _regs->a6 = (_interp_map); \ | ||
40 | _regs->b6 = (_dynamic_addr); \ | ||
41 | } while (0) | ||
42 | |||
43 | #define ELF_FDPIC_CORE_EFLAGS 0 | ||
44 | |||
45 | #define ELF_CORE_COPY_FPREGS(...) 0 /* No FPU regs to copy */ | ||
34 | 46 | ||
35 | /* | 47 | /* |
36 | * These are used to set parameters in the core dumps. | 48 | * These are used to set parameters in the core dumps. |
diff --git a/arch/c6x/include/asm/mmu.h b/arch/c6x/include/asm/mmu.h index 41592bf16067..4467e770a1ce 100644 --- a/arch/c6x/include/asm/mmu.h +++ b/arch/c6x/include/asm/mmu.h | |||
@@ -13,6 +13,10 @@ | |||
13 | 13 | ||
14 | typedef struct { | 14 | typedef struct { |
15 | unsigned long end_brk; | 15 | unsigned long end_brk; |
16 | #ifdef CONFIG_BINFMT_ELF_FDPIC | ||
17 | unsigned long exec_fdpic_loadmap; | ||
18 | unsigned long interp_fdpic_loadmap; | ||
19 | #endif | ||
16 | } mm_context_t; | 20 | } mm_context_t; |
17 | 21 | ||
18 | #endif /* _ASM_C6X_MMU_H */ | 22 | #endif /* _ASM_C6X_MMU_H */ |
diff --git a/arch/c6x/include/asm/processor.h b/arch/c6x/include/asm/processor.h index 3ff7fab956ba..c50af7ef1c96 100644 --- a/arch/c6x/include/asm/processor.h +++ b/arch/c6x/include/asm/processor.h | |||
@@ -92,9 +92,6 @@ static inline void release_thread(struct task_struct *dead_task) | |||
92 | { | 92 | { |
93 | } | 93 | } |
94 | 94 | ||
95 | /* Prepare to copy thread state - unlazy all lazy status */ | ||
96 | #define prepare_to_copy(tsk) do { } while (0) | ||
97 | |||
98 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 95 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
99 | 96 | ||
100 | #define copy_segments(tsk, mm) do { } while (0) | 97 | #define copy_segments(tsk, mm) do { } while (0) |
diff --git a/arch/c6x/include/asm/ptrace.h b/arch/c6x/include/asm/ptrace.h index 21e8d7931fe7..b04ff5964258 100644 --- a/arch/c6x/include/asm/ptrace.h +++ b/arch/c6x/include/asm/ptrace.h | |||
@@ -97,6 +97,11 @@ | |||
97 | #define PT_DP PT_B14 /* Data Segment Pointer (B14) */ | 97 | #define PT_DP PT_B14 /* Data Segment Pointer (B14) */ |
98 | #define PT_SP PT_B15 /* Stack Pointer (B15) */ | 98 | #define PT_SP PT_B15 /* Stack Pointer (B15) */ |
99 | 99 | ||
100 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
101 | |||
102 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
103 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
104 | |||
100 | #ifndef __ASSEMBLY__ | 105 | #ifndef __ASSEMBLY__ |
101 | 106 | ||
102 | #ifdef _BIG_ENDIAN | 107 | #ifdef _BIG_ENDIAN |
diff --git a/arch/c6x/include/asm/thread_info.h b/arch/c6x/include/asm/thread_info.h index fd99148cda9d..1710bcbb8d09 100644 --- a/arch/c6x/include/asm/thread_info.h +++ b/arch/c6x/include/asm/thread_info.h | |||
@@ -20,11 +20,11 @@ | |||
20 | #ifdef CONFIG_4KSTACKS | 20 | #ifdef CONFIG_4KSTACKS |
21 | #define THREAD_SIZE 4096 | 21 | #define THREAD_SIZE 4096 |
22 | #define THREAD_SHIFT 12 | 22 | #define THREAD_SHIFT 12 |
23 | #define THREAD_ORDER 0 | 23 | #define THREAD_SIZE_ORDER 0 |
24 | #else | 24 | #else |
25 | #define THREAD_SIZE 8192 | 25 | #define THREAD_SIZE 8192 |
26 | #define THREAD_SHIFT 13 | 26 | #define THREAD_SHIFT 13 |
27 | #define THREAD_ORDER 1 | 27 | #define THREAD_SIZE_ORDER 1 |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define THREAD_START_SP (THREAD_SIZE - 8) | 30 | #define THREAD_START_SP (THREAD_SIZE - 8) |
@@ -80,19 +80,6 @@ struct thread_info *current_thread_info(void) | |||
80 | return ti; | 80 | return ti; |
81 | } | 81 | } |
82 | 82 | ||
83 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
84 | |||
85 | /* thread information allocation */ | ||
86 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
87 | #define THREAD_FLAGS (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) | ||
88 | #else | ||
89 | #define THREAD_FLAGS (GFP_KERNEL | __GFP_NOTRACK) | ||
90 | #endif | ||
91 | |||
92 | #define alloc_thread_info_node(tsk, node) \ | ||
93 | ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) | ||
94 | |||
95 | #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) | ||
96 | #define get_thread_info(ti) get_task_struct((ti)->task) | 83 | #define get_thread_info(ti) get_task_struct((ti)->task) |
97 | #define put_thread_info(ti) put_task_struct((ti)->task) | 84 | #define put_thread_info(ti) put_task_struct((ti)->task) |
98 | #endif /* __ASSEMBLY__ */ | 85 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index 7ca8c41b03cd..45e924a636a0 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c | |||
@@ -26,22 +26,6 @@ void (*c6x_halt)(void); | |||
26 | 26 | ||
27 | extern asmlinkage void ret_from_fork(void); | 27 | extern asmlinkage void ret_from_fork(void); |
28 | 28 | ||
29 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
30 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
31 | |||
32 | /* | ||
33 | * Initial thread structure. | ||
34 | */ | ||
35 | union thread_union init_thread_union __init_task_data = { | ||
36 | INIT_THREAD_INFO(init_task) | ||
37 | }; | ||
38 | |||
39 | /* | ||
40 | * Initial task structure. | ||
41 | */ | ||
42 | struct task_struct init_task = INIT_TASK(init_task); | ||
43 | EXPORT_SYMBOL(init_task); | ||
44 | |||
45 | /* | 29 | /* |
46 | * power off function, if any | 30 | * power off function, if any |
47 | */ | 31 | */ |
diff --git a/arch/c6x/kernel/signal.c b/arch/c6x/kernel/signal.c index 3b5a05099989..cf37478c1169 100644 --- a/arch/c6x/kernel/signal.c +++ b/arch/c6x/kernel/signal.c | |||
@@ -69,6 +69,9 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs) | |||
69 | struct rt_sigframe __user *frame; | 69 | struct rt_sigframe __user *frame; |
70 | sigset_t set; | 70 | sigset_t set; |
71 | 71 | ||
72 | /* Always make any pending restarted system calls return -EINTR */ | ||
73 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
74 | |||
72 | /* | 75 | /* |
73 | * Since we stacked the signal on a dword boundary, | 76 | * Since we stacked the signal on a dword boundary, |
74 | * 'sp' should be dword aligned here. If it's | 77 | * 'sp' should be dword aligned here. If it's |