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>
This commit is contained in:
parent
459249aa2d
commit
cc92b870a7
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <asm/blackfin.h>
|
#include <asm/blackfin.h>
|
||||||
|
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/* Data that is "mapped" into the process VM at the start of the L1 scratch
|
/* Data that is "mapped" into the process VM at the start of the L1 scratch
|
||||||
@ -28,5 +29,6 @@ struct l1_scratch_task_info
|
|||||||
get_l1_scratch_start())
|
get_l1_scratch_start())
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,6 +65,7 @@ struct thread_struct {
|
|||||||
* pass the data segment into user programs if it exists,
|
* pass the data segment into user programs if it exists,
|
||||||
* it can't hurt anything as far as I can tell
|
* it can't hurt anything as far as I can tell
|
||||||
*/
|
*/
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
#define start_thread(_regs, _pc, _usp) \
|
#define start_thread(_regs, _pc, _usp) \
|
||||||
do { \
|
do { \
|
||||||
set_fs(USER_DS); \
|
set_fs(USER_DS); \
|
||||||
@ -78,6 +79,16 @@ do { \
|
|||||||
sizeof(*L1_SCRATCH_TASK_INFO)); \
|
sizeof(*L1_SCRATCH_TASK_INFO)); \
|
||||||
wrusp(_usp); \
|
wrusp(_usp); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
#else
|
||||||
|
#define start_thread(_regs, _pc, _usp) \
|
||||||
|
do { \
|
||||||
|
set_fs(USER_DS); \
|
||||||
|
(_regs)->pc = (_pc); \
|
||||||
|
if (current->mm) \
|
||||||
|
(_regs)->p5 = current->mm->start_data; \
|
||||||
|
wrusp(_usp); \
|
||||||
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Forward declaration, a strange C thing */
|
/* Forward declaration, a strange C thing */
|
||||||
struct task_struct;
|
struct task_struct;
|
||||||
|
@ -197,6 +197,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
|
|||||||
|
|
||||||
asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
|
asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
|
||||||
|
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
#define switch_to(prev,next,last) \
|
#define switch_to(prev,next,last) \
|
||||||
do { \
|
do { \
|
||||||
memcpy (&task_thread_info(prev)->l1_task_info, L1_SCRATCH_TASK_INFO, \
|
memcpy (&task_thread_info(prev)->l1_task_info, L1_SCRATCH_TASK_INFO, \
|
||||||
@ -205,5 +206,11 @@ do { \
|
|||||||
sizeof *L1_SCRATCH_TASK_INFO); \
|
sizeof *L1_SCRATCH_TASK_INFO); \
|
||||||
(last) = resume (prev, next); \
|
(last) = resume (prev, next); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#else
|
||||||
|
#define switch_to(prev, next, last) \
|
||||||
|
do { \
|
||||||
|
(last) = resume(prev, next); \
|
||||||
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _BLACKFIN_SYSTEM_H */
|
#endif /* _BLACKFIN_SYSTEM_H */
|
||||||
|
@ -63,7 +63,9 @@ struct thread_info {
|
|||||||
int preempt_count; /* 0 => preemptable, <0 => BUG */
|
int preempt_count; /* 0 => preemptable, <0 => BUG */
|
||||||
mm_segment_t addr_limit; /* address limit */
|
mm_segment_t addr_limit; /* address limit */
|
||||||
struct restart_block restart_block;
|
struct restart_block restart_block;
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
struct l1_scratch_task_info l1_task_info;
|
struct l1_scratch_task_info l1_task_info;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user