From 242fa79281e87d9affb751add22c38a30561697a Mon Sep 17 00:00:00 2001 From: Sonic Zhang Date: Wed, 7 Jan 2009 23:14:38 +0800 Subject: [PATCH] --- yaml --- r: 127135 b: refs/heads/master c: cc92b870a779500f444419f27bf73c6c7660ff9c h: refs/heads/master i: 127133: 09deefa186e7584d0e34c487a68529eb6fd9944b 127131: 31a93fecb9c0c2b96a8fd8cce5a9c3259e69efbd 127127: 8e82afa4cb508f89266e71c14d7f1e0d6a01adaf 127119: c441cd684ebd15332f82f9b2fb0914272dc276c0 127103: 121e15f5c92e6e7f6fd8a1b59f73ce351b89005a v: v3 --- [refs] | 2 +- trunk/arch/blackfin/include/asm/l1layout.h | 2 ++ trunk/arch/blackfin/include/asm/processor.h | 11 +++++++++++ trunk/arch/blackfin/include/asm/system.h | 7 +++++++ trunk/arch/blackfin/include/asm/thread_info.h | 2 ++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9c2399928675..22b638323295 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 459249aa2d9ae02f49479a2096e5372ccc29c9be +refs/heads/master: cc92b870a779500f444419f27bf73c6c7660ff9c diff --git a/trunk/arch/blackfin/include/asm/l1layout.h b/trunk/arch/blackfin/include/asm/l1layout.h index 06bb37f6c788..79dbefaa5bef 100644 --- a/trunk/arch/blackfin/include/asm/l1layout.h +++ b/trunk/arch/blackfin/include/asm/l1layout.h @@ -8,6 +8,7 @@ #include +#ifndef CONFIG_SMP #ifndef __ASSEMBLY__ /* 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()) #endif +#endif #endif diff --git a/trunk/arch/blackfin/include/asm/processor.h b/trunk/arch/blackfin/include/asm/processor.h index 83d57a85b14f..0eece23b41c7 100644 --- a/trunk/arch/blackfin/include/asm/processor.h +++ b/trunk/arch/blackfin/include/asm/processor.h @@ -65,6 +65,7 @@ struct thread_struct { * pass the data segment into user programs if it exists, * it can't hurt anything as far as I can tell */ +#ifndef CONFIG_SMP #define start_thread(_regs, _pc, _usp) \ do { \ set_fs(USER_DS); \ @@ -78,6 +79,16 @@ do { \ sizeof(*L1_SCRATCH_TASK_INFO)); \ wrusp(_usp); \ } 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 */ struct task_struct; diff --git a/trunk/arch/blackfin/include/asm/system.h b/trunk/arch/blackfin/include/asm/system.h index aa7d87b62b28..812e6e6e2cee 100644 --- a/trunk/arch/blackfin/include/asm/system.h +++ b/trunk/arch/blackfin/include/asm/system.h @@ -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); +#ifndef CONFIG_SMP #define switch_to(prev,next,last) \ do { \ memcpy (&task_thread_info(prev)->l1_task_info, L1_SCRATCH_TASK_INFO, \ @@ -205,5 +206,11 @@ do { \ sizeof *L1_SCRATCH_TASK_INFO); \ (last) = resume (prev, next); \ } while (0) +#else +#define switch_to(prev, next, last) \ +do { \ + (last) = resume(prev, next); \ +} while (0) +#endif #endif /* _BLACKFIN_SYSTEM_H */ diff --git a/trunk/arch/blackfin/include/asm/thread_info.h b/trunk/arch/blackfin/include/asm/thread_info.h index 7eaf2e2606d9..e721ce55956c 100644 --- a/trunk/arch/blackfin/include/asm/thread_info.h +++ b/trunk/arch/blackfin/include/asm/thread_info.h @@ -63,7 +63,9 @@ struct thread_info { int preempt_count; /* 0 => preemptable, <0 => BUG */ mm_segment_t addr_limit; /* address limit */ struct restart_block restart_block; +#ifndef CONFIG_SMP struct l1_scratch_task_info l1_task_info; +#endif }; /*