Commit 74807afd authored by Linus Torvalds's avatar Linus Torvalds

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
parents cd40fab6 8a574cfa
...@@ -129,7 +129,11 @@ NESTED(_mcount, PT_SIZE, ra) ...@@ -129,7 +129,11 @@ NESTED(_mcount, PT_SIZE, ra)
nop nop
#endif #endif
b ftrace_stub b ftrace_stub
#ifdef CONFIG_32BIT
addiu sp, sp, 8
#else
nop nop
#endif
static_trace: static_trace:
MCOUNT_SAVE_REGS MCOUNT_SAVE_REGS
...@@ -139,6 +143,9 @@ static_trace: ...@@ -139,6 +143,9 @@ static_trace:
move a1, AT /* arg2: parent's return address */ move a1, AT /* arg2: parent's return address */
MCOUNT_RESTORE_REGS MCOUNT_RESTORE_REGS
#ifdef CONFIG_32BIT
addiu sp, sp, 8
#endif
.globl ftrace_stub .globl ftrace_stub
ftrace_stub: ftrace_stub:
RETURN_BACK RETURN_BACK
...@@ -183,6 +190,11 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra) ...@@ -183,6 +190,11 @@ NESTED(ftrace_graph_caller, PT_SIZE, ra)
jal prepare_ftrace_return jal prepare_ftrace_return
nop nop
MCOUNT_RESTORE_REGS MCOUNT_RESTORE_REGS
#ifndef CONFIG_DYNAMIC_FTRACE
#ifdef CONFIG_32BIT
addiu sp, sp, 8
#endif
#endif
RETURN_BACK RETURN_BACK
END(ftrace_graph_caller) END(ftrace_graph_caller)
......
...@@ -650,9 +650,9 @@ static inline int cop1_64bit(struct pt_regs *xcp) ...@@ -650,9 +650,9 @@ static inline int cop1_64bit(struct pt_regs *xcp)
#define SIFROMREG(si, x) \ #define SIFROMREG(si, x) \
do { \ do { \
if (cop1_64bit(xcp)) \ if (cop1_64bit(xcp)) \
(si) = get_fpr32(&ctx->fpr[x], 0); \ (si) = (int)get_fpr32(&ctx->fpr[x], 0); \
else \ else \
(si) = get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \ (si) = (int)get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \
} while (0) } while (0)
#define SITOREG(si, x) \ #define SITOREG(si, x) \
...@@ -667,7 +667,7 @@ do { \ ...@@ -667,7 +667,7 @@ do { \
} \ } \
} while (0) } while (0)
#define SIFROMHREG(si, x) ((si) = get_fpr32(&ctx->fpr[x], 1)) #define SIFROMHREG(si, x) ((si) = (int)get_fpr32(&ctx->fpr[x], 1))
#define SITOHREG(si, x) \ #define SITOHREG(si, x) \
do { \ do { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment