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
This commit is contained in:
Linus Torvalds 2014-09-27 14:42:18 -07:00
commit 74807afd3f
2 changed files with 15 additions and 3 deletions

View File

@ -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:
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)
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)

View File

@ -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 { \
} \ } \
} 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 { \