Skip to content

Commit

Permalink
powerpc: Fix lwsync patching code on 64bit
Browse files Browse the repository at this point in the history
do_lwsync_fixups doesn't work on 64bit, we end up writing lwsyncs to the
wrong addresses:

0:mon> di c0000001000bfacc
c0000001000bfacc  7c2004ac      lwsync

Since the lwsync section has negative offsets we need to use a signed int
pointer so we sign extend the value.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
antonblanchard authored and ozbenh committed Feb 17, 2010
1 parent f10e2e5 commit 53eae22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/lib/feature-fixups.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)

void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
{
unsigned int *start, *end, *dest;
int *start, *end, *dest;

if (!(value & CPU_FTR_LWSYNC))
return ;
Expand Down

0 comments on commit 53eae22

Please sign in to comment.