1
0
Fork 0

powerpc: Fix lwsync patching code on 64bit

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>
hifive-unleashed-5.1
Anton Blanchard 2010-02-10 01:07:19 +00:00 committed by Benjamin Herrenschmidt
parent f10e2e5b4b
commit 53eae2281a
1 changed files with 1 additions and 1 deletions

View File

@ -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 ;