diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-07-11 11:44:27 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-08-01 18:06:43 -0400 |
commit | 558155a0a731b4f56846559a57ca7ca921230497 (patch) | |
tree | f91b6c0a8751b5448f4b1d65e95400282d926d73 /arch/mips | |
parent | 8bd70c6af3a85193e4188fd3e7fbff0d5830fb78 (diff) |
MIPS: allow msa.h to be included in assembly files
Just #ifdef away the C functions when included from an assembly file,
as will be done in a following commit.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7299/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/msa.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/mips/include/asm/msa.h b/arch/mips/include/asm/msa.h index 538f6d482db8..e80e85c1334f 100644 --- a/arch/mips/include/asm/msa.h +++ b/arch/mips/include/asm/msa.h | |||
@@ -12,6 +12,8 @@ | |||
12 | 12 | ||
13 | #include <asm/mipsregs.h> | 13 | #include <asm/mipsregs.h> |
14 | 14 | ||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
15 | extern void _save_msa(struct task_struct *); | 17 | extern void _save_msa(struct task_struct *); |
16 | extern void _restore_msa(struct task_struct *); | 18 | extern void _restore_msa(struct task_struct *); |
17 | 19 | ||
@@ -133,15 +135,6 @@ static inline void write_msa_##name(unsigned int val) \ | |||
133 | 135 | ||
134 | #endif /* !TOOLCHAIN_SUPPORTS_MSA */ | 136 | #endif /* !TOOLCHAIN_SUPPORTS_MSA */ |
135 | 137 | ||
136 | #define MSA_IR 0 | ||
137 | #define MSA_CSR 1 | ||
138 | #define MSA_ACCESS 2 | ||
139 | #define MSA_SAVE 3 | ||
140 | #define MSA_MODIFY 4 | ||
141 | #define MSA_REQUEST 5 | ||
142 | #define MSA_MAP 6 | ||
143 | #define MSA_UNMAP 7 | ||
144 | |||
145 | __BUILD_MSA_CTL_REG(ir, 0) | 138 | __BUILD_MSA_CTL_REG(ir, 0) |
146 | __BUILD_MSA_CTL_REG(csr, 1) | 139 | __BUILD_MSA_CTL_REG(csr, 1) |
147 | __BUILD_MSA_CTL_REG(access, 2) | 140 | __BUILD_MSA_CTL_REG(access, 2) |
@@ -151,6 +144,17 @@ __BUILD_MSA_CTL_REG(request, 5) | |||
151 | __BUILD_MSA_CTL_REG(map, 6) | 144 | __BUILD_MSA_CTL_REG(map, 6) |
152 | __BUILD_MSA_CTL_REG(unmap, 7) | 145 | __BUILD_MSA_CTL_REG(unmap, 7) |
153 | 146 | ||
147 | #endif /* !__ASSEMBLY__ */ | ||
148 | |||
149 | #define MSA_IR 0 | ||
150 | #define MSA_CSR 1 | ||
151 | #define MSA_ACCESS 2 | ||
152 | #define MSA_SAVE 3 | ||
153 | #define MSA_MODIFY 4 | ||
154 | #define MSA_REQUEST 5 | ||
155 | #define MSA_MAP 6 | ||
156 | #define MSA_UNMAP 7 | ||
157 | |||
154 | /* MSA Implementation Register (MSAIR) */ | 158 | /* MSA Implementation Register (MSAIR) */ |
155 | #define MSA_IR_REVB 0 | 159 | #define MSA_IR_REVB 0 |
156 | #define MSA_IR_REVF (_ULCAST_(0xff) << MSA_IR_REVB) | 160 | #define MSA_IR_REVF (_ULCAST_(0xff) << MSA_IR_REVB) |