OpenCloudOS-Kernel/arch/x86/boot
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
..
compressed inflate: refactor inflate malloc code 2008-07-25 10:53:28 -07:00
tools x86: add a crc32 checksum to the kernel image. 2008-04-17 17:40:46 +02:00
.gitignore Update .gitignore files 2008-04-25 12:27:32 -07:00
Makefile x86: move suspend wakeup code to C 2008-04-17 17:41:37 +02:00
a20.c Merge branch 'x86/setup' into x86/devel 2008-07-08 09:43:01 +02:00
apm.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
bitops.h x86: remove pointless comments 2008-04-19 19:19:54 +02:00
boot.h x86: remove pointless comments 2008-04-19 19:19:54 +02:00
cmdline.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
code16gcc.h i386: move boot 2007-10-11 11:16:45 +02:00
copy.S x86: remove pointless comments 2008-04-19 19:19:54 +02:00
cpu.c x86: Fix up silly i1586 boot message. 2008-05-28 10:34:12 -07:00
cpucheck.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
edd.c x86: check function status in EDD boot code 2008-07-18 14:33:17 -07:00
header.S x86, boot: add linked list of struct setup_data 2008-04-26 21:34:42 +02:00
install.sh x86: remove pointless comments 2008-04-19 19:19:54 +02:00
main.c x86: Honor 'quiet' command line option in real mode boot decompressor. 2008-05-30 17:00:47 -07:00
mca.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
memory.c x86 boot: proper use of ARRAY_SIZE instead of repeated E820MAX constant 2008-05-25 10:55:11 +02:00
mkcpustr.c x86 setup: print missing CPU features in cleartext 2008-02-04 16:48:00 +01:00
mtools.conf.in i386: move boot 2007-10-11 11:16:45 +02:00
pm.c x86: unify and correct the GDT_ENTRY() macro 2008-07-17 11:29:24 -07:00
pmjump.S x86: fix regression: boot failure on AMD Elan TS-5500 2008-07-01 10:53:29 +02:00
printf.c x86: boot/printfc use NULL instead 0 2008-05-25 08:58:25 +02:00
setup.ld i386: move boot 2007-10-11 11:16:45 +02:00
string.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
tty.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
version.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
vesa.h x86-boot: don't request VBE2 information 2008-03-07 16:39:14 +01:00
video-bios.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
video-mode.c x86: move suspend wakeup code to C 2008-04-17 17:41:37 +02:00
video-vesa.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
video-vga.c x86: janitor work in video-vga.c 2008-05-25 08:58:35 +02:00
video.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00
video.h x86: remove pointless comments 2008-04-19 19:19:54 +02:00
voyager.c x86: remove pointless comments 2008-04-19 19:19:54 +02:00