summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/current.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-11-01 06:38:20 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-01 06:38:20 -0800
commit4b1c46a383aafc137bc91a0f9698bfc11e062d1b (patch)
treedd8b793c534b6f83cc16f38ba96d0ff4722a7344 /include/asm-powerpc/current.h
parent30574b61611ccd29677989097f8c8a5d9a73d873 (diff)
parent4393c4f6788cee65095dd838cfeca6edefbfeb52 (diff)
downloadkernel-crypto-4b1c46a383aafc137bc91a0f9698bfc11e062d1b.tar.gz
kernel-crypto-4b1c46a383aafc137bc91a0f9698bfc11e062d1b.tar.xz
kernel-crypto-4b1c46a383aafc137bc91a0f9698bfc11e062d1b.zip
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Make alignment exception always check exception table [POWERPC] Disallow kprobes on emulate_step and branch_taken [POWERPC] Make mmiowb's io_sync preempt safe [POWERPC] Make high hugepage areas preempt safe [POWERPC] Make current preempt-safe [POWERPC] qe_lib: qe_issue_cmd writes wrong value to CECDR [POWERPC] Use 4kB iommu pages even on 64kB-page systems [POWERPC] Fix oprofile support for e500 in arch/powerpc [POWERPC] Fix rmb() for e500-based machines it [POWERPC] Fix various offb issues
Diffstat (limited to 'include/asm-powerpc/current.h')
-rw-r--r--include/asm-powerpc/current.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h
index 1938d6abd25..b8708aedf92 100644
--- a/include/asm-powerpc/current.h
+++ b/include/asm-powerpc/current.h
@@ -14,7 +14,17 @@ struct task_struct;
#ifdef __powerpc64__
#include <asm/paca.h>
-#define current (get_paca()->__current)
+static inline struct task_struct *get_current(void)
+{
+ struct task_struct *task;
+
+ __asm__ __volatile__("ld %0,%1(13)"
+ : "=r" (task)
+ : "i" (offsetof(struct paca_struct, __current)));
+
+ return task;
+}
+#define current get_current()
#else