diff options
Diffstat (limited to 'arch/sparc/include/asm/traps.h')
-rw-r--r-- | arch/sparc/include/asm/traps.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/sparc/include/asm/traps.h b/arch/sparc/include/asm/traps.h index bebdbf8f43a8..3aa62dde343f 100644 --- a/arch/sparc/include/asm/traps.h +++ b/arch/sparc/include/asm/traps.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define NUM_SPARC_TRAPS 255 | 10 | #define NUM_SPARC_TRAPS 255 |
11 | 11 | ||
12 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
13 | 13 | #ifdef __KERNEL__ | |
14 | /* This is for V8 compliant Sparc CPUS */ | 14 | /* This is for V8 compliant Sparc CPUS */ |
15 | struct tt_entry { | 15 | struct tt_entry { |
16 | unsigned long inst_one; | 16 | unsigned long inst_one; |
@@ -22,14 +22,7 @@ struct tt_entry { | |||
22 | /* We set this to _start in system setup. */ | 22 | /* We set this to _start in system setup. */ |
23 | extern struct tt_entry *sparc_ttable; | 23 | extern struct tt_entry *sparc_ttable; |
24 | 24 | ||
25 | static inline unsigned long get_tbr(void) | 25 | #endif /* (__KERNEL__) */ |
26 | { | ||
27 | unsigned long tbr; | ||
28 | |||
29 | __asm__ __volatile__("rd %%tbr, %0\n\t" : "=r" (tbr)); | ||
30 | return tbr; | ||
31 | } | ||
32 | |||
33 | #endif /* !(__ASSEMBLY__) */ | 26 | #endif /* !(__ASSEMBLY__) */ |
34 | 27 | ||
35 | /* For patching the trap table at boot time, we need to know how to | 28 | /* For patching the trap table at boot time, we need to know how to |