summaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/current.h
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2009-02-06 14:54:08 +1000
committerGreg Ungerer <gerg@uclinux.org>2009-03-24 15:17:45 +1000
commit2844b660358c9230a2e85a0218f0df4046d5c392 (patch)
tree10c422d34addbeb7c799f753996943d3dbf4c9c8 /arch/m68k/include/asm/current.h
parentd20f5aa338dc75fb2e7bfb7627d3dfcc81196e69 (diff)
downloadblackbird-op-linux-2844b660358c9230a2e85a0218f0df4046d5c392.tar.gz
blackbird-op-linux-2844b660358c9230a2e85a0218f0df4046d5c392.zip
m68k: merge the mmu and non-mmu versions of current.h
Trivial merge of the mmu and non-mmu versions of current.h Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include/asm/current.h')
-rw-r--r--arch/m68k/include/asm/current.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/arch/m68k/include/asm/current.h b/arch/m68k/include/asm/current.h
index 51b056dfaedd..91fcc5358cfe 100644
--- a/arch/m68k/include/asm/current.h
+++ b/arch/m68k/include/asm/current.h
@@ -1,5 +1,28 @@
-#ifdef __uClinux__
-#include "current_no.h"
+#ifndef _M68K_CURRENT_H
+#define _M68K_CURRENT_H
+
+#ifdef CONFIG_MMU
+
+register struct task_struct *current __asm__("%a2");
+
#else
-#include "current_mm.h"
-#endif
+
+/*
+ * Rather than dedicate a register (as the m68k source does), we
+ * just keep a global, we should probably just change it all to be
+ * current and lose _current_task.
+ */
+#include <linux/thread_info.h>
+
+struct task_struct;
+
+static inline struct task_struct *get_current(void)
+{
+ return(current_thread_info()->task);
+}
+
+#define current get_current()
+
+#endif /* CONFNIG_MMU */
+
+#endif /* !(_M68K_CURRENT_H) */
OpenPOWER on IntegriCloud