patch-2.3.13 linux/include/asm-m68k/processor.h

Next file: linux/include/asm-m68k/resource.h
Previous file: linux/include/asm-m68k/pgtable.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.12/linux/include/asm-m68k/processor.h linux/include/asm-m68k/processor.h
@@ -15,6 +15,18 @@
 
 #include <asm/segment.h>
 #include <asm/fpu.h>
+#include <asm/ptrace.h>
+
+extern inline unsigned long rdusp(void) {
+  	unsigned long usp;
+
+	__asm__ __volatile__("move %/usp,%0" : "=a" (usp));
+	return usp;
+}
+
+extern inline void wrusp(unsigned long usp) {
+	__asm__ __volatile__("move %0,%/usp" : : "a" (usp));
+}
 
 /*
  * User space process size: 3.75GB. This is hardcoded into a few places,
@@ -53,7 +65,7 @@
 
 #define INIT_MMAP { &init_mm, 0, 0x40000000, NULL, __pgprot(_PAGE_PRESENT|_PAGE_ACCESSED), VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
 
-#define INIT_TSS  { \
+#define INIT_THREAD  { \
 	sizeof(init_stack) + (unsigned long) init_stack, 0, \
 	PS_S, __KERNEL_DS, \
 	{0, 0}, 0, {0,}, {0, 0, 0}, {0,}, \
@@ -73,6 +85,9 @@
 	wrusp(usp);
 }
 
+/* Forward declaration, a strange C thing */
+struct task_struct;
+
 /* Free all resources held by a thread. */
 static inline void release_thread(struct task_struct *dead_task)
 {
@@ -80,7 +95,7 @@
 
 extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 
-#define copy_segments(nr, tsk, mm)	do { } while (0)
+#define copy_segments(tsk, mm)		do { } while (0)
 #define release_segments(mm)		do { } while (0)
 #define forget_segments()		do { } while (0)
 
@@ -106,6 +121,8 @@
 	else
 		return sw->retpc;
 }
+
+#define THREAD_SIZE (2*PAGE_SIZE)
 
 /* Allocation and freeing of basic task resources. */
 #define alloc_task_struct() \

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)