kernel-hacking-2024-linux-s.../arch/arm
Thomas Petazzoni 2d6ffcca62 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.

The architecture-dependent code must define two addresses:
 - free_mem_ptr, the address of the beginning of the area in which
   allocations should be made
 - free_mem_end_ptr, the address of the end of the area in which
   allocations should be made. If set to 0, then no check is made on
   the number of allocations, it just grows as much as needed

The architecture-dependent code can also provide an arch_decomp_wdog()
function call.  This function will be called several times during the
decompression process, and allow to notify the watchdog that the system is
still running.  If an architecture provides such a call, then it must
define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls
arch_decomp_wdog().

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

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:28 -07:00
..
boot inflate: refactor inflate malloc code 2008-07-25 10:53:28 -07:00
common Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-07-23 18:24:08 -07:00
configs [ARM] Merge most of the PXA work for initial merge 2008-07-14 23:34:46 +01:00
kernel Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-24 12:55:01 -07:00
lib
mach-aaec2000
mach-at91 Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap-reviewed', 'rpc', 'rtc' and 's3c' into devel 2008-07-10 16:38:50 +01:00
mach-clps711x
mach-clps7500
mach-davinci
mach-ebsa110
mach-ep93xx [ARM] 5171/1: ep93xx: fix compilation of modules using clocks 2008-07-10 14:50:21 +01:00
mach-footbridge
mach-h720x
mach-imx Merge branch 'imx' into devel 2008-07-10 16:41:50 +01:00
mach-integrator arm: bus_id -> dev_name() and dev_set_name() conversions 2008-07-21 21:55:03 -07:00
mach-iop13xx
mach-iop32x leds: Add pca9532 platform data for Thecus N2100 2008-07-23 09:49:56 +01:00
mach-iop33x
mach-ixp4xx [ARM] Merge most of the PXA work for initial merge 2008-07-14 23:34:46 +01:00
mach-ixp23xx
mach-ixp2000
mach-kirkwood
mach-ks8695
mach-l7200
mach-lh7a40x
mach-loki
mach-msm
mach-mv78xx0
mach-mx2 i.MX27 family: Add the Phytec PCM970 evaluation board 2008-07-05 10:03:01 +02:00
mach-mx3 MX3: Adapt mx31lite to new timer init style 2008-07-05 10:02:53 +02:00
mach-netx
mach-ns9xxx Remove use of asm/semaphore.h 2008-07-24 08:31:00 -04:00
mach-omap1 Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap-reviewed', 'rpc', 'rtc' and 's3c' into devel 2008-07-10 16:38:50 +01:00
mach-omap2 Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap-reviewed', 'rpc', 'rtc' and 's3c' into devel 2008-07-10 16:38:50 +01:00
mach-orion5x [ARM] Orion: LED support for HP mv2120 2008-07-07 18:38:24 -04:00
mach-pnx4008
mach-pxa [ARM] Merge most of the PXA work for initial merge 2008-07-14 23:34:46 +01:00
mach-realview
mach-rpc
mach-s3c2400
mach-s3c2410 [ARM] Acer n30: Minor style and indentation fixes. 2008-07-07 18:13:05 +01:00
mach-s3c2412
mach-s3c2440 [ARM] AT2440EVB: Add DM9000A network controller support. 2008-07-07 18:13:01 +01:00
mach-s3c2442
mach-s3c2443 [ARM] S3C2443: Add prediv clk and fix setting of h and p clocks 2008-07-07 18:13:02 +01:00
mach-sa1100 Merge branches 'pxa-ian' and 'pxa-xm270' into pxa 2008-07-12 21:42:04 +01:00
mach-shark
mach-versatile
mm mm: drop unneeded pgdat argument from free_area_init_node() 2008-07-24 10:47:16 -07:00
nwfpe
oprofile
plat-iop [ARM] 5160/1: IOP3XX: gpio/gpiolib support 2008-07-09 23:31:42 +01:00
plat-mxc i.MX2 family: Add basic mach support 2008-07-05 10:03:02 +02:00
plat-omap PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures 2008-07-24 10:47:21 -07:00
plat-orion
plat-s3c
plat-s3c24xx
tools [ARM] Update mach-types 2008-07-13 12:05:21 +01:00
vfp
Kconfig add HAVE_CLK to Kconfig, for driver dependencies 2008-07-24 10:47:13 -07:00
Kconfig-nommu
Kconfig.debug
Makefile Merge branch 'imx' into devel 2008-07-10 16:41:50 +01:00