]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] PPC32: Fix thinko in arch/ppc/boot/simple/relocate.S
authorAndrew Morton <akpm@osdl.org>
Fri, 2 Apr 2004 12:05:15 +0000 (04:05 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 2 Apr 2004 12:05:15 +0000 (04:05 -0800)
From: Tom Rini <trini@kernel.crashing.org>

When I was updating ppc/boot/simple/relocate.S to work on PPC_PREP systems, I
in advertantly broke 4xx systems.  On classic PPC, the first three
instructions are nops, of which the first two can be overwritten.  This is
not true of 4xx (or 8xx, but that's not working right now anyhow).  The
following is needed to fix this.

arch/ppc/boot/simple/relocate.S

index c9f83f613ccfc79c7d1cdb4dd1a5220cd9d6bd00..e57d9673e599699c874de7854ef90550b60bc060 100644 (file)
@@ -196,9 +196,9 @@ start_ldr:
        /*
         * Start at the begining.
         */
+#ifdef CONFIG_PPC_MULTIPLATFORM
        li      r9,0xc
        mtlr    r9
-#ifdef CONFIG_PPC_MULTIPLATFORM
        /* tell kernel we're prep, by putting 0xdeadc0de at KERNELLOAD,
         * and tell the kernel to start on the 4th instruction since we
         * overwrite the first 3 sometimes (which are 'nop').
@@ -207,6 +207,9 @@ start_ldr:
        ori     r10,r10,0xdeadc0de@l
        li      r9,0
        stw     r10,0(r9)
+#else
+       li      r9,0
+       mtlr    r9
 #endif
        blr