summaryrefslogtreecommitdiff
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-27 03:32:33 +0300
committerDavid S. Miller <davem@davemloft.net>2008-03-27 03:32:33 +0300
commitc101b088ba0ed16d7109b2f3c2d16798d162a535 (patch)
tree25eaea3719800dc039e5f31da937fb26b590037e /include/asm-sparc64
parentf6a843d939ade435e060d580f5c56d958464f8a5 (diff)
downloadlinux-c101b088ba0ed16d7109b2f3c2d16798d162a535.tar.xz
[SPARC64]: Define TASK_SIZE_OF()
This make "cat /proc/${PID}/pagemap" more efficient for 32-bit tasks. Based upon a report by Mariusz Kozlowski. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/processor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index 8da484c19822..885b6a1dcae4 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -37,6 +37,9 @@
#endif
#define TASK_SIZE ((unsigned long)-VPTE_SIZE)
+#define TASK_SIZE_OF(tsk) \
+ (test_tsk_thread_flag(tsk,TIF_32BIT) ? \
+ (1UL << 32UL) : TASK_SIZE)
#ifdef __KERNEL__
#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE)