aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-27 17:42:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-27 17:42:18 -0400
commit74807afd3f4eb403e490b5db7af1ece117262f5b (patch)
tree2a3cb1fbf3a4b613f4d9b45af88bcda6bdd56713 /arch/mips
parentcd40fab6dbf4173c1617557be720dcec89657866 (diff)
parent8a574cfa2652545eb95595d38ac2a0bb501af0ae (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle: "The final round of fixes. One corner case in the math emulator and another one in the mcount function for ftrace" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: mcount: Adjust stack pointer for static trace in MIPS32 MIPS: Fix MFC1 & MFHC1 emulation for 64-bit MIPS systems
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/mcount.S12
-rw-r--r--arch/mips/math-emu/cp1emu.c6
2 files changed, 15 insertions, 3 deletions
diff --git a/arch/mips/kernel/mcount.S b/arch/mips/kernel/mcount.S
index 5d25462de8a6..2f7c734771f4 100644
--- a/arch/mips/kernel/mcount.S
+++ b/arch/mips/kernel/mcount.S
@@ -129,7 +129,11 @@ NESTED(_mcount, PT_SIZE, ra)
129 nop 129 nop
130#endif 130#endif
131 b ftrace_stub 131 b ftrace_stub
132#ifdef CONFIG_32BIT
133 addiu sp, sp, 8
134#else
132 nop 135 nop
136#endif
133 137
134static_trace: 138static_trace:
135 MCOUNT_SAVE_REGS 139 MCOUNT_SAVE_REGS
@@ -139,6 +143,9 @@ static_trace:
139 move a1, AT /* arg2: parent's return address */ 143 move a1, AT /* arg2: parent's return address */
140 144
141 MCOUNT_RESTORE_REGS 145 MCOUNT_RESTORE_REGS
146#ifdef CONFIG_32BIT
147 addiu sp, sp, 8
148#endif
142 .globl ftrace_stub 149 .globl ftrace_stub
143ftrace_stub: 150ftrace_stub:
144 RETURN_BACK 151 RETURN_BACK
@@ -183,6 +190,11 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra)
183 jal prepare_ftrace_return 190 jal prepare_ftrace_return
184 nop 191 nop
185 MCOUNT_RESTORE_REGS 192 MCOUNT_RESTORE_REGS
193#ifndef CONFIG_DYNAMIC_FTRACE
194#ifdef CONFIG_32BIT
195 addiu sp, sp, 8
196#endif
197#endif
186 RETURN_BACK 198 RETURN_BACK
187 END(ftrace_graph_caller) 199 END(ftrace_graph_caller)
188 200
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index bf0fc6b16ad9..7a4727795a70 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -650,9 +650,9 @@ static inline int cop1_64bit(struct pt_regs *xcp)
650#define SIFROMREG(si, x) \ 650#define SIFROMREG(si, x) \
651do { \ 651do { \
652 if (cop1_64bit(xcp)) \ 652 if (cop1_64bit(xcp)) \
653 (si) = get_fpr32(&ctx->fpr[x], 0); \ 653 (si) = (int)get_fpr32(&ctx->fpr[x], 0); \
654 else \ 654 else \
655 (si) = get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \ 655 (si) = (int)get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \
656} while (0) 656} while (0)
657 657
658#define SITOREG(si, x) \ 658#define SITOREG(si, x) \
@@ -667,7 +667,7 @@ do { \
667 } \ 667 } \
668} while (0) 668} while (0)
669 669
670#define SIFROMHREG(si, x) ((si) = get_fpr32(&ctx->fpr[x], 1)) 670#define SIFROMHREG(si, x) ((si) = (int)get_fpr32(&ctx->fpr[x], 1))
671 671
672#define SITOHREG(si, x) \ 672#define SITOHREG(si, x) \
673do { \ 673do { \