summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ftrace.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-02-10 20:55:12 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-10 20:55:12 +0100
commitc36c63c511fa088fcc247a8e888b04f248be8435 (patch)
treea60e5791550929164e86c27f7a06c5c37a05a9e4 /arch/powerpc/kernel/ftrace.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 (diff)
parentpowerpc: Add missing sparsemem.h include (diff)
downloadlinux-c36c63c511fa088fcc247a8e888b04f248be8435.tar.xz
linux-c36c63c511fa088fcc247a8e888b04f248be8435.zip
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc: Add missing sparsemem.h include powerpc/pci: mmap anonymous memory when legacy_mem doesn't exist powerpc/cell: Add missing #include for oprofile powerpc/ftrace: Fix math to calculate offset in TOC powerpc: Don't emulate mr. instructions powerpc/fsl-booke: Fix mapping functions to use phys_addr_t arch/powerpc: Eliminate double sizeof powerpc/cpm2: Fix set interrupt type powerpc/83xx: Fix TSEC0 workability on MPC8313E-RDB boards powerpc/83xx: Fix missing #{address,size}-cells in mpc8313erdb.dts powerpc/83xx: Build breakage for CONFIG_PM but no CONFIG_SUSPEND
Diffstat (limited to 'arch/powerpc/kernel/ftrace.c')
-rw-r--r--arch/powerpc/kernel/ftrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 5355244c99ff..60c60ccf5e3c 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -195,8 +195,9 @@ __ftrace_make_nop(struct module *mod,
return -EINVAL;
}
- offset = (unsigned)((unsigned short)jmp[0]) << 16 |
- (unsigned)((unsigned short)jmp[1]);
+ /* The bottom half is signed extended */
+ offset = ((unsigned)((unsigned short)jmp[0]) << 16) +
+ (int)((short)jmp[1]);
DEBUGP(" %x ", offset);