[SPARC]: Merge asm-sparc{,64}/current.h

Signed-off-by: David S. Miller <davem@davemloft.net>

authored by David S. Miller and committed by David S. Miller ba89f59a cec6dc5d

+18 -22
+17 -14
include/asm-sparc/current.h
··· 1 - /* 2 - * include/asm-sparc/current.h 1 + /* include/asm-sparc/current.h 3 2 * 4 3 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation 5 4 * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) 5 + * Copyright (C) 2007 David S. Miller (davem@davemloft.net) 6 6 * 7 7 * Derived from "include/asm-s390/current.h" by 8 8 * Martin Schwidefsky (schwidefsky@de.ibm.com) 9 9 * Derived from "include/asm-i386/current.h" 10 - */ 11 - #ifndef _ASM_CURRENT_H 12 - #define _ASM_CURRENT_H 13 - 14 - /* 15 - * At the sparc64 DaveM keeps current_thread_info in %g4. 16 - * We might want to consider doing the same to shave a few cycles. 17 - */ 10 + */ 11 + #ifndef _SPARC_CURRENT_H 12 + #define _SPARC_CURRENT_H 18 13 19 14 #include <linux/thread_info.h> 20 15 21 - struct task_struct; 16 + #ifdef CONFIG_SPARC64 17 + register struct task_struct *current asm("g4"); 18 + #endif 22 19 23 - /* Two stage process (inline + #define) for type-checking. */ 24 - /* We also obfuscate get_current() to check if anyone used that by mistake. */ 20 + #ifdef CONFIG_SPARC32 21 + /* We might want to consider using %g4 like sparc64 to shave a few cycles. 22 + * 23 + * Two stage process (inline + #define) for type-checking. 24 + * We also obfuscate get_current() to check if anyone used that by mistake. 25 + */ 26 + struct task_struct; 25 27 static inline struct task_struct *__get_current(void) 26 28 { 27 29 return current_thread_info()->task; 28 30 } 29 31 #define current __get_current() 32 + #endif 30 33 31 - #endif /* !(_ASM_CURRENT_H) */ 34 + #endif /* !(_SPARC_CURRENT_H) */
+1 -8
include/asm-sparc64/current.h
··· 1 - #ifndef _SPARC64_CURRENT_H 2 - #define _SPARC64_CURRENT_H 3 - 4 - #include <linux/thread_info.h> 5 - 6 - register struct task_struct *current asm("g4"); 7 - 8 - #endif /* !(_SPARC64_CURRENT_H) */ 1 + #include <asm-sparc/current.h>