diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2009-01-07 10:14:38 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 10:14:38 -0500 |
commit | cc92b870a779500f444419f27bf73c6c7660ff9c (patch) | |
tree | b82430fe2c0aaa72ea4ebdbc21fb1f2ce8cca7c2 /arch/blackfin/include/asm | |
parent | 459249aa2d9ae02f49479a2096e5372ccc29c9be (diff) |
Blackfin arch: disable pthread stack check for SMP at runtime
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/include/asm')
-rw-r--r-- | arch/blackfin/include/asm/l1layout.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/processor.h | 11 | ||||
-rw-r--r-- | arch/blackfin/include/asm/system.h | 7 | ||||
-rw-r--r-- | arch/blackfin/include/asm/thread_info.h | 2 |
4 files changed, 22 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/l1layout.h b/arch/blackfin/include/asm/l1layout.h index 06bb37f6c788..79dbefaa5bef 100644 --- a/arch/blackfin/include/asm/l1layout.h +++ b/arch/blackfin/include/asm/l1layout.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <asm/blackfin.h> | 9 | #include <asm/blackfin.h> |
10 | 10 | ||
11 | #ifndef CONFIG_SMP | ||
11 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
12 | 13 | ||
13 | /* Data that is "mapped" into the process VM at the start of the L1 scratch | 14 | /* Data that is "mapped" into the process VM at the start of the L1 scratch |
@@ -28,5 +29,6 @@ struct l1_scratch_task_info | |||
28 | get_l1_scratch_start()) | 29 | get_l1_scratch_start()) |
29 | 30 | ||
30 | #endif | 31 | #endif |
32 | #endif | ||
31 | 33 | ||
32 | #endif | 34 | #endif |
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h index 83d57a85b14f..0eece23b41c7 100644 --- a/arch/blackfin/include/asm/processor.h +++ b/arch/blackfin/include/asm/processor.h | |||
@@ -65,6 +65,7 @@ struct thread_struct { | |||
65 | * pass the data segment into user programs if it exists, | 65 | * pass the data segment into user programs if it exists, |
66 | * it can't hurt anything as far as I can tell | 66 | * it can't hurt anything as far as I can tell |
67 | */ | 67 | */ |
68 | #ifndef CONFIG_SMP | ||
68 | #define start_thread(_regs, _pc, _usp) \ | 69 | #define start_thread(_regs, _pc, _usp) \ |
69 | do { \ | 70 | do { \ |
70 | set_fs(USER_DS); \ | 71 | set_fs(USER_DS); \ |
@@ -78,6 +79,16 @@ do { \ | |||
78 | sizeof(*L1_SCRATCH_TASK_INFO)); \ | 79 | sizeof(*L1_SCRATCH_TASK_INFO)); \ |
79 | wrusp(_usp); \ | 80 | wrusp(_usp); \ |
80 | } while(0) | 81 | } while(0) |
82 | #else | ||
83 | #define start_thread(_regs, _pc, _usp) \ | ||
84 | do { \ | ||
85 | set_fs(USER_DS); \ | ||
86 | (_regs)->pc = (_pc); \ | ||
87 | if (current->mm) \ | ||
88 | (_regs)->p5 = current->mm->start_data; \ | ||
89 | wrusp(_usp); \ | ||
90 | } while (0) | ||
91 | #endif | ||
81 | 92 | ||
82 | /* Forward declaration, a strange C thing */ | 93 | /* Forward declaration, a strange C thing */ |
83 | struct task_struct; | 94 | struct task_struct; |
diff --git a/arch/blackfin/include/asm/system.h b/arch/blackfin/include/asm/system.h index aa7d87b62b28..812e6e6e2cee 100644 --- a/arch/blackfin/include/asm/system.h +++ b/arch/blackfin/include/asm/system.h | |||
@@ -197,6 +197,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | |||
197 | 197 | ||
198 | asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next); | 198 | asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next); |
199 | 199 | ||
200 | #ifndef CONFIG_SMP | ||
200 | #define switch_to(prev,next,last) \ | 201 | #define switch_to(prev,next,last) \ |
201 | do { \ | 202 | do { \ |
202 | memcpy (&task_thread_info(prev)->l1_task_info, L1_SCRATCH_TASK_INFO, \ | 203 | memcpy (&task_thread_info(prev)->l1_task_info, L1_SCRATCH_TASK_INFO, \ |
@@ -205,5 +206,11 @@ do { \ | |||
205 | sizeof *L1_SCRATCH_TASK_INFO); \ | 206 | sizeof *L1_SCRATCH_TASK_INFO); \ |
206 | (last) = resume (prev, next); \ | 207 | (last) = resume (prev, next); \ |
207 | } while (0) | 208 | } while (0) |
209 | #else | ||
210 | #define switch_to(prev, next, last) \ | ||
211 | do { \ | ||
212 | (last) = resume(prev, next); \ | ||
213 | } while (0) | ||
214 | #endif | ||
208 | 215 | ||
209 | #endif /* _BLACKFIN_SYSTEM_H */ | 216 | #endif /* _BLACKFIN_SYSTEM_H */ |
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h index 7eaf2e2606d9..e721ce55956c 100644 --- a/arch/blackfin/include/asm/thread_info.h +++ b/arch/blackfin/include/asm/thread_info.h | |||
@@ -63,7 +63,9 @@ struct thread_info { | |||
63 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 63 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
64 | mm_segment_t addr_limit; /* address limit */ | 64 | mm_segment_t addr_limit; /* address limit */ |
65 | struct restart_block restart_block; | 65 | struct restart_block restart_block; |
66 | #ifndef CONFIG_SMP | ||
66 | struct l1_scratch_task_info l1_task_info; | 67 | struct l1_scratch_task_info l1_task_info; |
68 | #endif | ||
67 | }; | 69 | }; |
68 | 70 | ||
69 | /* | 71 | /* |