Title: [5868] trunk/arch/blackfin: Task[#2299] disable pthread stack check for SMP at runtime.
Revision
5868
Author
sonicz
Date
2008-12-16 20:47:22 -0600 (Tue, 16 Dec 2008)

Log Message

Task[#2299] disable pthread stack check for SMP at runtime.

Modified Paths

Diff

Modified: trunk/arch/blackfin/include/asm/l1layout.h (5867 => 5868)


--- trunk/arch/blackfin/include/asm/l1layout.h	2008-12-16 22:49:46 UTC (rev 5867)
+++ trunk/arch/blackfin/include/asm/l1layout.h	2008-12-17 02:47:22 UTC (rev 5868)
@@ -8,6 +8,7 @@
 
 #include <asm/blackfin.h>
 
+#ifndef CONFIG_SMP
 #ifndef __ASSEMBLY__
 
 /* Data that is "mapped" into the process VM at the start of the L1 scratch
@@ -28,5 +29,6 @@
 						get_l1_scratch_start())
 
 #endif
+#endif
 
 #endif

Modified: trunk/arch/blackfin/include/asm/processor.h (5867 => 5868)


--- trunk/arch/blackfin/include/asm/processor.h	2008-12-16 22:49:46 UTC (rev 5867)
+++ trunk/arch/blackfin/include/asm/processor.h	2008-12-17 02:47:22 UTC (rev 5868)
@@ -65,6 +65,7 @@
  * 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 @@
 		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;

Modified: trunk/arch/blackfin/include/asm/system.h (5867 => 5868)


--- trunk/arch/blackfin/include/asm/system.h	2008-12-16 22:49:46 UTC (rev 5867)
+++ trunk/arch/blackfin/include/asm/system.h	2008-12-17 02:47:22 UTC (rev 5868)
@@ -197,6 +197,7 @@
 
 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 @@
 		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 */

Modified: trunk/arch/blackfin/include/asm/thread_info.h (5867 => 5868)


--- trunk/arch/blackfin/include/asm/thread_info.h	2008-12-16 22:49:46 UTC (rev 5867)
+++ trunk/arch/blackfin/include/asm/thread_info.h	2008-12-17 02:47:22 UTC (rev 5868)
@@ -63,7 +63,9 @@
 	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
 };
 
 /*

Modified: trunk/arch/blackfin/kernel/traps.c (5867 => 5868)


--- trunk/arch/blackfin/kernel/traps.c	2008-12-16 22:49:46 UTC (rev 5867)
+++ trunk/arch/blackfin/kernel/traps.c	2008-12-17 02:47:22 UTC (rev 5868)
@@ -42,7 +42,7 @@
 #include <asm/fixed_code.h>
 
 #ifdef CONFIG_KGDB
-# include <linux/kgdb.h>
+#include <linux/kgdb.h>
 
 # define CHK_DEBUGGER_TRAP() \
 	do { \
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to