<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/init/initramfs.c, branch v2.6.27.14</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>inflate: refactor inflate malloc code</title>
<updated>2008-07-25T17:53:28+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2008-07-25T08:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d6ffcca623a9a16df6cdfbe8250b7a5904a5f5e'/>
<id>2d6ffcca623a9a16df6cdfbe8250b7a5904a5f5e</id>
<content type='text'>
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 &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Mikael Starvik &lt;mikael.starvik@axis.com&gt;
Cc: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Richard Henderson &lt;rth@twiddle.net&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Mikael Starvik &lt;mikael.starvik@axis.com&gt;
Cc: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@atmel.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: Yoshinori Sato &lt;ysato@users.sourceforge.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>directly use kmalloc() and kfree() in init/initramfs.c</title>
<updated>2008-04-29T15:06:06+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2008-04-29T07:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3265e66b1825942c6e0fc457986cdf941a5f7d37'/>
<id>3265e66b1825942c6e0fc457986cdf941a5f7d37</id>
<content type='text'>
Instead of using the malloc() and free() wrappers needed by the
lib/inflate.c code for allocations, simply use kmalloc() and kfree() in the
initramfs code.  This is needed for a further lib/inflate.c-related cleanup
patch that will remove the malloc() and free() functions.

Take that opportunity to remove the useless kmalloc() return value
cast.

Based on work done by Matt Mackall.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Jan Engelhardt &lt;jengelh@computergmbh.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of using the malloc() and free() wrappers needed by the
lib/inflate.c code for allocations, simply use kmalloc() and kfree() in the
initramfs code.  This is needed for a further lib/inflate.c-related cleanup
patch that will remove the malloc() and free() functions.

Take that opportunity to remove the useless kmalloc() return value
cast.

Based on work done by Matt Mackall.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Jan Engelhardt &lt;jengelh@computergmbh.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: Remove ACPI_CUSTOM_DSDT_INITRD option</title>
<updated>2008-03-15T18:58:04+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-03-15T18:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a9e0d685553af76cb6ae2af93cca4913e7fcd47'/>
<id>9a9e0d685553af76cb6ae2af93cca4913e7fcd47</id>
<content type='text'>
This essentially reverts commit 71fc47a9adf8ee89e5c96a47222915c5485ac437
("ACPI: basic initramfs DSDT override support"), because the code simply
isn't ready.

It did ugly things to the init sequence to populate the rootfs image
early, but that just ended up showing other problems with the whole
approach.  The fact is, the VFS layer simply isn't initialized this
early, and the relevant ACPI code should either run much later, or this
shouldn't be done at all.

For 2.6.25, we'll just pick the latter option.  We can revisit this
concept later if necessary.

Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Cc: Tilman Schmidt &lt;tilman@imap.cc&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Thomas Renninger &lt;trenn@suse.de&gt;
Cc: Eric Piel &lt;eric.piel@tremplin-utc.net&gt;
Cc: Len Brown &lt;len.brown@intel.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Markus Gaugusch &lt;dsdt@gaugusch.at&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This essentially reverts commit 71fc47a9adf8ee89e5c96a47222915c5485ac437
("ACPI: basic initramfs DSDT override support"), because the code simply
isn't ready.

It did ugly things to the init sequence to populate the rootfs image
early, but that just ended up showing other problems with the whole
approach.  The fact is, the VFS layer simply isn't initialized this
early, and the relevant ACPI code should either run much later, or this
shouldn't be done at all.

For 2.6.25, we'll just pick the latter option.  We can revisit this
concept later if necessary.

Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Cc: Tilman Schmidt &lt;tilman@imap.cc&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Thomas Renninger &lt;trenn@suse.de&gt;
Cc: Eric Piel &lt;eric.piel@tremplin-utc.net&gt;
Cc: Len Brown &lt;len.brown@intel.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Markus Gaugusch &lt;dsdt@gaugusch.at&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: basic initramfs DSDT override support</title>
<updated>2008-02-07T03:07:41+00:00</updated>
<author>
<name>Markus Gaugusch</name>
<email>dsdt@gaugusch.at</email>
</author>
<published>2008-02-04T23:04:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=71fc47a9adf8ee89e5c96a47222915c5485ac437'/>
<id>71fc47a9adf8ee89e5c96a47222915c5485ac437</id>
<content type='text'>
The basics of DSDT from initramfs. In case this option is selected,
populate_rootfs() is called a bit earlier to have the initramfs content
available during ACPI initialization.

This is a very similar path to the one available at
http://gaugusch.at/kernel.shtml but with some update in the
documentation, default set to No and the change of populate_rootfs() the
"Jeff Mahony way" (which avoids reading the initramfs twice).

Signed-off-by: Thomas Renninger &lt;trenn@suse.de&gt;
Signed-off-by: Eric Piel &lt;eric.piel@tremplin-utc.net&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The basics of DSDT from initramfs. In case this option is selected,
populate_rootfs() is called a bit earlier to have the initramfs content
available during ACPI initialization.

This is a very similar path to the one available at
http://gaugusch.at/kernel.shtml but with some update in the
documentation, default set to No and the change of populate_rootfs() the
"Jeff Mahony way" (which avoids reading the initramfs twice).

Signed-off-by: Thomas Renninger &lt;trenn@suse.de&gt;
Signed-off-by: Eric Piel &lt;eric.piel@tremplin-utc.net&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove superfluous checks for CONFIG_BLK_DEV_INITRD from initramfs.c</title>
<updated>2008-02-06T18:41:06+00:00</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2008-02-06T09:37:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b25b7819e51f388f8c8d7ae4679a658895dc67cc'/>
<id>b25b7819e51f388f8c8d7ae4679a658895dc67cc</id>
<content type='text'>
Given that init/Makefile includes initramfs.c in the build only if
CONFIG_BLK_DEV_INITRD is defined, there seems to be no point checking for
it yet again.

Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Given that init/Makefile includes initramfs.c in the build only if
CONFIG_BLK_DEV_INITRD is defined, there seems to be no point checking for
it yet again.

Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>initramfs: missing __init</title>
<updated>2007-07-26T18:11:56+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2007-07-26T16:33:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b0a5ab93158586e599ecd0d24a9a72da74d23ddd'/>
<id>b0a5ab93158586e599ecd0d24a9a72da74d23ddd</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Add retain_initrd boot option</title>
<updated>2007-02-11T18:51:24+00:00</updated>
<author>
<name>Michael Neuling</name>
<email>mikey@neuling.org</email>
</author>
<published>2007-02-10T09:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a7b35cb18c52d651f6ed9cd59edc979200ab880'/>
<id>0a7b35cb18c52d651f6ed9cd59edc979200ab880</id>
<content type='text'>
Add retain_initrd option to control freeing of initrd memory after
extraction.  By default, free memory as previously.

The first boot will need to hold a copy of the in memory fs for the second
boot.  This image can be large (much larger than the kernel), hence we can
save time when the memory loader is slow.  Also, it reduces the memory
footprint while extracting the first boot since you don't need another copy
of the fs.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Cc: "Randy.Dunlap" &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add retain_initrd option to control freeing of initrd memory after
extraction.  By default, free memory as previously.

The first boot will need to hold a copy of the in memory fs for the second
boot.  This image can be large (much larger than the kernel), hence we can
save time when the memory loader is slow.  Also, it reduces the memory
footprint while extracting the first boot since you don't need another copy
of the fs.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Cc: "Randy.Dunlap" &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure we populate the initroot filesystem late enough</title>
<updated>2006-12-11T20:12:04+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@woody.osdl.org</email>
</author>
<published>2006-12-11T20:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8d610dd52dd1da696e199e4b4545f33a2a5de5c6'/>
<id>8d610dd52dd1da696e199e4b4545f33a2a5de5c6</id>
<content type='text'>
We should not initialize rootfs before all the core initializers have
run.  So do it as a separate stage just before starting the regular
driver initializers.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should not initialize rootfs before all the core initializers have
run.  So do it as a separate stage just before starting the regular
driver initializers.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Make initramfs printk a warning on incorrect cpio type</title>
<updated>2006-12-07T16:39:36+00:00</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@linux.intel.com</email>
</author>
<published>2006-12-07T04:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e591bbc0d563e12f5a260fbbca0df7d5810910e'/>
<id>2e591bbc0d563e12f5a260fbbca0df7d5810910e</id>
<content type='text'>
It turns out that the "-c" option of cpio is highly unportable even between
distros let alone unix variants, and may actually make the wrong type of
cpio archive.  I just wasted quite some time on this, and the kernel can
detect this and warn about it (it's __init memory so it gets thrown away
and thus there is no runtime overhead)

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out that the "-c" option of cpio is highly unportable even between
distros let alone unix variants, and may actually make the wrong type of
cpio archive.  I just wasted quite some time on this, and the kernel can
detect this and warn about it (it's __init memory so it gets thrown away
and thus there is no runtime overhead)

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] initramfs overwrite fix</title>
<updated>2006-06-26T16:58:40+00:00</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@zytor.com</email>
</author>
<published>2006-06-26T07:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2139a7fbf3effd8cad505871e3a3c308780ada32'/>
<id>2139a7fbf3effd8cad505871e3a3c308780ada32</id>
<content type='text'>
This patch ensures that initramfs overwrites work correctly, even when dealing
with device nodes of different types.  Furthermore, when replacing a file
which already exists, we must make very certain that we truncate the existing
file.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch ensures that initramfs overwrites work correctly, even when dealing
with device nodes of different types.  Furthermore, when replacing a file
which already exists, we must make very certain that we truncate the existing
file.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
