diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-06-19 14:26:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 00:44:53 -0400 |
commit | a00736e936c2a1e9c36f22f6f3a69392eaab51f4 (patch) | |
tree | 4fd3d203dbc30d50a1b0c1acce2957e082a75173 /include/asm-sparc/fpumacro.h | |
parent | bdc3135ac99efd59de084a309751ec76887e62d8 (diff) |
sparc: copy sparc64 specific files to asm-sparc
Used the following script to copy the files:
cd include
set -e
SPARC64=`ls asm-sparc64`
for FILE in ${SPARC64}; do
if [ -f asm-sparc/$FILE ]; then
echo $FILE exist in asm-sparc
else
git mv asm-sparc64/$FILE asm-sparc/$FILE
printf "#include <asm-sparc/$FILE>\n" > asm-sparc64/$FILE
git add asm-sparc64/$FILE
fi
done
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'include/asm-sparc/fpumacro.h')
-rw-r--r-- | include/asm-sparc/fpumacro.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/asm-sparc/fpumacro.h b/include/asm-sparc/fpumacro.h new file mode 100644 index 000000000000..cc463fec806f --- /dev/null +++ b/include/asm-sparc/fpumacro.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* fpumacro.h: FPU related macros. | ||
2 | * | ||
3 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | ||
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | ||
5 | */ | ||
6 | |||
7 | #ifndef _SPARC64_FPUMACRO_H | ||
8 | #define _SPARC64_FPUMACRO_H | ||
9 | |||
10 | #include <asm/asi.h> | ||
11 | #include <asm/visasm.h> | ||
12 | |||
13 | struct fpustate { | ||
14 | u32 regs[64]; | ||
15 | }; | ||
16 | |||
17 | #define FPUSTATE (struct fpustate *)(current_thread_info()->fpregs) | ||
18 | |||
19 | static inline unsigned long fprs_read(void) | ||
20 | { | ||
21 | unsigned long retval; | ||
22 | |||
23 | __asm__ __volatile__("rd %%fprs, %0" : "=r" (retval)); | ||
24 | |||
25 | return retval; | ||
26 | } | ||
27 | |||
28 | static inline void fprs_write(unsigned long val) | ||
29 | { | ||
30 | __asm__ __volatile__("wr %0, 0x0, %%fprs" : : "r" (val)); | ||
31 | } | ||
32 | |||
33 | #endif /* !(_SPARC64_FPUMACRO_H) */ | ||