2008-02-16 18:59:27

by Byron Bradley

[permalink] [raw]
Subject: 2.6.25-rc2-mm1: ARM build fail due to inflate-refactor-inflate-malloc-code

Commit 0ad34f5f5f12861d4a18542c1a26284023b07a8d produces the following
build failure on ARM:

CC arch/arm/boot/compressed/misc.o
In file included from /home/bb3081/project/kernel/orion/arch/arm/boot/compressed/misc.c:242:
/home/bb3081/project/kernel/orion/arch/arm/boot/compressed/../../../../lib/inflate.c: In function 'malloc':
/home/bb3081/project/kernel/orion/arch/arm/boot/compressed/../../../../lib/inflate.c:255: error: 'free_mem_end_ptr' undeclared (first use in this function)
/home/bb3081/project/kernel/orion/arch/arm/boot/compressed/../../../../lib/inflate.c:255: error: (Each undeclared identifier is reported only once
/home/bb3081/project/kernel/orion/arch/arm/boot/compressed/../../../../lib/inflate.c:255: error: for each function it appears in.)
make[3]: *** [arch/arm/boot/compressed/misc.o] Error 1
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[1]: *** [zImage] Error 2
make: *** [sub-make] Error 2

free_mem_end_ptr is only defined on a few different architectures so this
commit probably effects others. After reverting this commit (below)
2.6.25-rc2-mm1 seems fine on two Marvell Orion based ARM boards.



commit 0ad34f5f5f12861d4a18542c1a26284023b07a8d
Author: Thomas Petazzoni <[email protected]>
Date: Fri Feb 15 21:35:37 2008 +0000

inflate-refactor-inflate-malloc-code

Inflate requires some dynamic memory allocation very early in the boot
process and this is provided with a set of four functions:
malloc/free/gzip_mark/gzip_release.

The old inflate code used a mark/release strategy rather than implement
free. This new version instead keeps a count on the number of outstanding
allocations and when it hits zero, it resets the malloc arena.

This allows removing all the mark and release implementations and unifying
all the malloc/free implementations.

Work initially done by Matt Mackall, updated to a recent version of the
kernel by me.