aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/asm.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2020-04-24 18:56:45 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-04-24 18:18:06 +0200
commitd339cd02b888eb8c4508fd772120782eac59a9fa (patch)
tree0bc6051bb591c23942b7393ee2cc9305f68d5658 /arch/mips/include/asm/asm.h
parentMIPS: Fix the declaration conflict of mm_isBranchInstr() (diff)
downloadlinux-dev-d339cd02b888eb8c4508fd772120782eac59a9fa.tar.xz
linux-dev-d339cd02b888eb8c4508fd772120782eac59a9fa.zip
MIPS: Move unaligned load/store helpers to inst.h
Move unaligned load/store helpers from unaligned.c to inst.h, then other parts of the kernel can use these helpers. Use __ASSEMBLY__ to guard the definition of "LONG" in asm.h to avoid build error on IPxx platforms. Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Pei Huang <huangpei@loongson.cn> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/include/asm/asm.h')
-rw-r--r--arch/mips/include/asm/asm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index c23527ba65d0..934465de470e 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -202,7 +202,9 @@ symbol = value
#define LONG_SRA sra
#define LONG_SRAV srav
+#ifdef __ASSEMBLY__
#define LONG .word
+#endif
#define LONGSIZE 4
#define LONGMASK 3
#define LONGLOG 2
@@ -225,7 +227,9 @@ symbol = value
#define LONG_SRA dsra
#define LONG_SRAV dsrav
+#ifdef __ASSEMBLY__
#define LONG .dword
+#endif
#define LONGSIZE 8
#define LONGMASK 7
#define LONGLOG 3