2.6.18-rt4

john cooper
2006-09-27T13:13:21Z

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

Ingo Molnar wrote:
> * Lennert Buytenhek <buytenh@wantstofly.org> wrote:
>
>> On Thu, Sep 21, 2006 at 10:19:21PM -0400, john cooper wrote:
>>
>>>> ok, i've uploaded -rt3:
>>> Attached is a patch which fixes a build problem
>>> for ARM pxa270, and general ARM boot issue when
>>> LATENCY_TRACE is configured.
>> This patch (queued for Linus) lifts that 4MB limitation:
>>
>> http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3809/2
>>
>> (I ran into the limit when enabling lockdep on ARM.)
>
> ok, i've added this no-4M-limit patch to -rt. John, does that solve your
> problem?

A few of us hit a snag in Lennert's original patch. He has a
fix which addresses this, attached.

-john

--
john.cooper@third-harmonic.com

[-- Attachment #2: fix-allow-large-kernels.diff --]
[-- Type: text/x-patch, Size: 985 bytes --]

The 'sub r3, r3, r5' check to determine the compressed kernel size in
arch/arm/boot/compressed/head.S doesn't work properly, since at that
point, r3 will have been overwritten by cache_on().

What we can do is to use sp instead, which does not get clobbered in
the meanwhile. Using sp will give us a slightly higher compressed
kernel image size guess than when using r3, but that's safe.

Bug reported by John Cooper and David Anders.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>

Index: linux-2.6.18/arch/arm/boot/compressed/head.S
===================================================================
--- linux-2.6.18.orig/arch/arm/boot/compressed/head.S
+++ linux-2.6.18/arch/arm/boot/compressed/head.S
@@ -240,7 +240,7 @@ not_relocated: mov r0, #0
*/
cmp r4, r2
bhs wont_overwrite
- sub r3, r3, r5 @ compressed kernel size
+ sub r3, sp, r5 @ > compressed kernel image
add r0, r4, r3, lsl #2 @ allow for 4x expansion
cmp r0, r5
bls wont_overwrite