powerpc/ftrace: Fix math to calculate offset in TOC
authorSteven Rostedt <rostedt@goodmis.org>
Sat, 7 Feb 2009 20:22:40 +0000 (20:22 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 10 Feb 2009 03:39:08 +0000 (14:39 +1100)
commitf25f9074c24f1451a74942c4bc089bb53e47f462
tree92835cb8121734b22eb36d3a870607d47818fbe8
parenteef336189b2b5ae68bfbef0df24176a4a152d981
powerpc/ftrace: Fix math to calculate offset in TOC

Impact: fix dynamic ftrace with large modules in PPC64

The math to calculate the offset into the TOC that is taken from reading
the trampoline is incorrect. The bottom half of the offset is a signed
extended short. The current code was using an OR to create the offset
when it should have been using an addition.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/ftrace.c