All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] RFC: x86: relocatable kernel changes
@ 2009-05-07 22:26 ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam

This series is currently in -tip; the goal of it is to make the
semantics of the relocatable kernel fully the same as the
non-relocatable kernel when loaded by a relocating bootloader.  That
means CONFIG_PHYSICAL_START is honored to (a) be able to keep ZONE_DMA
free, and avoid the once-again-increasingly-common 15-16 MB hole
(don't ask me *why* this abortion is cropping up again, but I'm seeing
an increasing number of reports to the effect that it *is*) and (b) make
vmlinux match the runtime code in the normal case.

To deal with that constraint, CONFIG_PHYSICAL_START is taken as a
minimum address for the kernel.  Since a relocating bootloader may
have real reasons to load the kernel lower than that (for example,
because it has detected that it is on a small-memory system), this
adds two new fields to the bzImage header:

	runtime_start	- CONFIG_PHYSICAL_START
	runtime_size	- The contiguous memory space consumed by the kernel

The latter is the union of contiguous memory consumed by the kernel
during decompression and initialization; this is now possible thanks
to Jeremy's .brk patchset.  This isn't the same thing as the amount of
memory the kernel needs, but rather the amount of memory it will
assume that it can use before it starts to be able to read the memory
map.

The runtime_start field can be *written* by the bootloader if the
kernel is relocatable; e.g. by setting it to zero to indicate that the
load address should be used no matter what.

The physical address at which the kernel starts is now:

	align_up(max(load_address, runtime_start), kernel_alignment)

This seems to be the best possible compromise between the current
behaviors for relocatable and non-relocatable kernels.

This patchset also bumps up the default alignment to a PMD boundary (2
MB for x86-64 and PAE; 4 MB for !PAE).  I also change the default
CONFIG_PHYSICAL_START to 16 MB (4 MB for CONFIG_EMBEDDED).

The patchset also includes some plain optimizations.

 Documentation/x86/boot.txt             |   41 +++++++++
 arch/x86/Kconfig                       |   28 ++++--
 arch/x86/boot/Makefile                 |   24 ++++--
 arch/x86/boot/compressed/Makefile      |   51 +++--------
 arch/x86/boot/compressed/head_32.S     |  131 +++++++++++++---------------
 arch/x86/boot/compressed/head_64.S     |  129 ++++++++++++----------------
 arch/x86/boot/compressed/mkpiggy.c     |   97 +++++++++++++++++++++
 arch/x86/boot/compressed/vmlinux.lds.S |    1 +
 arch/x86/boot/compressed/vmlinux.scr   |   10 --
 arch/x86/boot/header.S                 |   21 ++++-
 arch/x86/configs/i386_defconfig        |  148 ++++++++++++++++++++++++-------
 arch/x86/configs/x86_64_defconfig      |  148 ++++++++++++++++++++++++--------
 arch/x86/include/asm/boot.h            |   13 +++-
 arch/x86/include/asm/bootparam.h       |    2 +
 arch/x86/kernel/asm-offsets_32.c       |    1 +
 arch/x86/kernel/asm-offsets_64.c       |    1 +
 scripts/Makefile.lib                   |   11 ++-
 scripts/bin_size                       |    8 ++-
 18 files changed, 575 insertions(+), 290 deletions(-)

^ permalink raw reply	[flat|nested] 90+ messages in thread

* [PATCH 00/14] RFC: x86: relocatable kernel changes
@ 2009-05-07 22:26 ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: kexec, hbabu, ebiederm, ying.huang, mingo, sam, tglx, vgoyal

This series is currently in -tip; the goal of it is to make the
semantics of the relocatable kernel fully the same as the
non-relocatable kernel when loaded by a relocating bootloader.  That
means CONFIG_PHYSICAL_START is honored to (a) be able to keep ZONE_DMA
free, and avoid the once-again-increasingly-common 15-16 MB hole
(don't ask me *why* this abortion is cropping up again, but I'm seeing
an increasing number of reports to the effect that it *is*) and (b) make
vmlinux match the runtime code in the normal case.

To deal with that constraint, CONFIG_PHYSICAL_START is taken as a
minimum address for the kernel.  Since a relocating bootloader may
have real reasons to load the kernel lower than that (for example,
because it has detected that it is on a small-memory system), this
adds two new fields to the bzImage header:

	runtime_start	- CONFIG_PHYSICAL_START
	runtime_size	- The contiguous memory space consumed by the kernel

The latter is the union of contiguous memory consumed by the kernel
during decompression and initialization; this is now possible thanks
to Jeremy's .brk patchset.  This isn't the same thing as the amount of
memory the kernel needs, but rather the amount of memory it will
assume that it can use before it starts to be able to read the memory
map.

The runtime_start field can be *written* by the bootloader if the
kernel is relocatable; e.g. by setting it to zero to indicate that the
load address should be used no matter what.

The physical address at which the kernel starts is now:

	align_up(max(load_address, runtime_start), kernel_alignment)

This seems to be the best possible compromise between the current
behaviors for relocatable and non-relocatable kernels.

This patchset also bumps up the default alignment to a PMD boundary (2
MB for x86-64 and PAE; 4 MB for !PAE).  I also change the default
CONFIG_PHYSICAL_START to 16 MB (4 MB for CONFIG_EMBEDDED).

The patchset also includes some plain optimizations.

 Documentation/x86/boot.txt             |   41 +++++++++
 arch/x86/Kconfig                       |   28 ++++--
 arch/x86/boot/Makefile                 |   24 ++++--
 arch/x86/boot/compressed/Makefile      |   51 +++--------
 arch/x86/boot/compressed/head_32.S     |  131 +++++++++++++---------------
 arch/x86/boot/compressed/head_64.S     |  129 ++++++++++++----------------
 arch/x86/boot/compressed/mkpiggy.c     |   97 +++++++++++++++++++++
 arch/x86/boot/compressed/vmlinux.lds.S |    1 +
 arch/x86/boot/compressed/vmlinux.scr   |   10 --
 arch/x86/boot/header.S                 |   21 ++++-
 arch/x86/configs/i386_defconfig        |  148 ++++++++++++++++++++++++-------
 arch/x86/configs/x86_64_defconfig      |  148 ++++++++++++++++++++++++--------
 arch/x86/include/asm/boot.h            |   13 +++-
 arch/x86/include/asm/bootparam.h       |    2 +
 arch/x86/kernel/asm-offsets_32.c       |    1 +
 arch/x86/kernel/asm-offsets_64.c       |    1 +
 scripts/Makefile.lib                   |   11 ++-
 scripts/bin_size                       |    8 ++-
 18 files changed, 575 insertions(+), 290 deletions(-)

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Aligning the .bss section makes it trivially faster, and makes using
larger transfers for the clear slightly easier.

[ Impact: trivial performance enhancement, future patch prep ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/vmlinux.lds.S |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index 0d26c92..27c168d 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -42,6 +42,7 @@ SECTIONS
 		*(.data.*)
 		_edata = . ;
 	}
+	. = ALIGN(32);
 	.bss : {
 		_bss = . ;
 		*(.bss)
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Aligning the .bss section makes it trivially faster, and makes using
larger transfers for the clear slightly easier.

[ Impact: trivial performance enhancement, future patch prep ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/vmlinux.lds.S |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index 0d26c92..27c168d 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -42,6 +42,7 @@ SECTIONS
 		*(.data.*)
 		_edata = . ;
 	}
+	. = ALIGN(32);
 	.bss : {
 		_bss = . ;
 		*(.bss)
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Currently, when building a relocatable kernel, CONFIG_PHYSICAL_START
is ignored.  This is undesirable, as we would like to keep the kernel
out of ZONE_DMA and away from the possible memory hole at 15 MB (which
some vendors for some bizarre reason still have.)

With this patch, CONFIG_PHYSICAL_START is considered the *minimum*
address at which the kernel can be located; a relocating bootloader
can locate it higher, but not lower.  This also restores the
originally intended behavior that CONFIG_RELOCATABLE is functionally a
noop if used with a non-relocating bootloader.

This patch also change movsb and stosb to movsl, stosl and stosq, to
shave a small fraction off the boot time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |   77 ++++++++++++++++++-----------------
 arch/x86/boot/compressed/head_64.S |   37 ++++++++++-------
 2 files changed, 61 insertions(+), 53 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 85bd328..31fc6dc 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -39,11 +39,11 @@ ENTRY(startup_32)
 
 	cli
 	movl $(__BOOT_DS),%eax
-	movl %eax,%ds
-	movl %eax,%es
-	movl %eax,%fs
-	movl %eax,%gs
-	movl %eax,%ss
+	movl %eax, %ds
+	movl %eax, %es
+	movl %eax, %fs
+	movl %eax, %gs
+	movl %eax, %ss
 1:
 
 /* Calculate the delta between where we were compiled to run
@@ -64,12 +64,18 @@ ENTRY(startup_32)
  */
 
 #ifdef CONFIG_RELOCATABLE
-	movl 	%ebp, %ebx
-	addl    $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
-	andl    $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
+	movl $LOAD_PHYSICAL_ADDR, %eax
+	movl %ebp, %ebx
+	cmpl %ebx, %eax
+	jbe 1f
+	movl %eax, %ebx
+1:
+	addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
+	andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
 #else
 	movl $LOAD_PHYSICAL_ADDR, %ebx
 #endif
+	movl %ebx, %edi		/* Save kernel target address */
 
 	/* Replace the compressed data size with the uncompressed size */
 	subl input_len(%ebp), %ebx
@@ -84,27 +90,30 @@ ENTRY(startup_32)
 	addl $4095, %ebx
 	andl $~4095, %ebx
 
-/* Copy the compressed kernel to the end of our buffer
+/*
+ * Set up the stack
+ */
+	leal boot_stack_end(%ebx), %esp
+	pushl %edi		/* Saved kernel target address */
+
+/*
+ * Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
  */
 	pushl %esi
-	leal _ebss(%ebp), %esi
-	leal _ebss(%ebx), %edi
-	movl $(_ebss - startup_32), %ecx
+	leal (_bss-4)(%ebp), %esi
+	leal (_bss-4)(%ebx), %edi
+	movl $(_bss - startup_32), %ecx
+	shrl $2, %ecx
 	std
-	rep
-	movsb
+	rep; movsl
 	cld
 	popl %esi
 
-/* Compute the kernel start address.
+/*
+ * %ebp -> kernel target address
  */
-#ifdef CONFIG_RELOCATABLE
-	addl    $(CONFIG_PHYSICAL_ALIGN - 1), %ebp
-	andl    $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebp
-#else
-	movl	$LOAD_PHYSICAL_ADDR, %ebp
-#endif
+	popl %ebp
 
 /*
  * Jump to the relocated address.
@@ -117,20 +126,14 @@ ENDPROC(startup_32)
 relocated:
 
 /*
- * Clear BSS
- */
-	xorl %eax,%eax
-	leal _edata(%ebx),%edi
-	leal _ebss(%ebx), %ecx
-	subl %edi,%ecx
-	cld
-	rep
-	stosb
-
-/*
- * Setup the stack for the decompressor
+ * Clear BSS - note: stack is currently empty
  */
-	leal boot_stack_end(%ebx), %esp
+	xorl %eax, %eax
+	leal _bss(%ebx), %edi
+	leal (_ebss+3)(%ebx), %ecx
+	subl %edi, %ecx
+	shrl $2, %ecx
+	rep; stosl
 
 /*
  * Do the decompression, and jump to the new kernel..
@@ -178,12 +181,12 @@ relocated:
 /*
  * Jump to the decompressed kernel.
  */
-	xorl %ebx,%ebx
+	xorl %ebx, %ebx
 	jmp *%ebp
 
-.bss
 /* Stack and heap for uncompression */
-.balign 4
+	.bss
+	.balign 4
 boot_heap:
 	.fill BOOT_HEAP_SIZE, 1, 0
 boot_stack:
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index ed4a829..f4ddd02 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -7,11 +7,6 @@
 /*
  *  head.S contains the 32-bit startup code.
  *
- * NOTE!!! Startup happens at absolute address 0x00001000, which is also where
- * the page directory will exist. The startup code will be overwritten by
- * the page directory. [According to comments etc elsewhere on a compressed
- * kernel it will end up at 0x1000 + 1Mb I hope so as I assume this. - AC]
- *
  * Page 0 is deliberately kept safe, since System Management Mode code in 
  * laptops may need to access the BIOS data stored there.  This is also
  * useful for future device drivers that either access the BIOS via VM86 
@@ -77,11 +72,17 @@ ENTRY(startup_32)
  * contains the address where we should move the kernel image temporarily
  * for safe in-place decompression.
  */
+ALIGN_MASK	= (CONFIG_PHYSICAL_ALIGN-1) | (PMD_PAGE_SIZE-1)
 
 #ifdef CONFIG_RELOCATABLE
+	movl	$CONFIG_PHYSICAL_START, %eax
 	movl	%ebp, %ebx
-	addl	$(PMD_PAGE_SIZE -1), %ebx
-	andl	$PMD_PAGE_MASK, %ebx
+	addl	$ALIGN_MASK, %ebx
+	andl	$~ALIGN_MASK, %ebx
+	cmpl	%ebx, %eax
+	jbe	1f
+	movl	%eax, %ebx
+1:
 #else
 	movl	$CONFIG_PHYSICAL_START, %ebx
 #endif
@@ -221,13 +222,17 @@ ENTRY(startup_64)
 	/* Start with the delta to where the kernel will run at. */
 #ifdef CONFIG_RELOCATABLE
 	leaq	startup_32(%rip) /* - $startup_32 */, %rbp
-	addq	$(PMD_PAGE_SIZE - 1), %rbp
-	andq	$PMD_PAGE_MASK, %rbp
-	movq	%rbp, %rbx
+	movq	$CONFIG_PHYSICAL_START, %rax
+	addq	$ALIGN_MASK, %rbp
+	andq	$~ALIGN_MASK, %rbp
+	cmpq	%rbp, %rax
+	jbe	1f
+	movq	%rax, %rbp
+1:
 #else
 	movq	$CONFIG_PHYSICAL_START, %rbp
-	movq	%rbp, %rbx
 #endif
+	movq	%rbp, %rbx
 
 	/* Replace the compressed data size with the uncompressed size */
 	movl	input_len(%rip), %eax
@@ -266,13 +271,13 @@ relocated:
 /*
  * Clear BSS
  */
-	xorq	%rax, %rax
-	leaq    _edata(%rbx), %rdi
-	leaq    _end_before_pgt(%rbx), %rcx
+	xorl	%eax, %eax
+	leaq    _edata(%rip), %rdi
+	leaq    _end_before_pgt(%rip), %rcx
 	subq	%rdi, %rcx
+	shrq	$3, %rcx
 	cld
-	rep
-	stosb
+	rep	stosq
 
 	/* Setup the stack */
 	leaq	boot_stack_end(%rip), %rsp
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Currently, when building a relocatable kernel, CONFIG_PHYSICAL_START
is ignored.  This is undesirable, as we would like to keep the kernel
out of ZONE_DMA and away from the possible memory hole at 15 MB (which
some vendors for some bizarre reason still have.)

With this patch, CONFIG_PHYSICAL_START is considered the *minimum*
address at which the kernel can be located; a relocating bootloader
can locate it higher, but not lower.  This also restores the
originally intended behavior that CONFIG_RELOCATABLE is functionally a
noop if used with a non-relocating bootloader.

This patch also change movsb and stosb to movsl, stosl and stosq, to
shave a small fraction off the boot time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |   77 ++++++++++++++++++-----------------
 arch/x86/boot/compressed/head_64.S |   37 ++++++++++-------
 2 files changed, 61 insertions(+), 53 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 85bd328..31fc6dc 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -39,11 +39,11 @@ ENTRY(startup_32)
 
 	cli
 	movl $(__BOOT_DS),%eax
-	movl %eax,%ds
-	movl %eax,%es
-	movl %eax,%fs
-	movl %eax,%gs
-	movl %eax,%ss
+	movl %eax, %ds
+	movl %eax, %es
+	movl %eax, %fs
+	movl %eax, %gs
+	movl %eax, %ss
 1:
 
 /* Calculate the delta between where we were compiled to run
@@ -64,12 +64,18 @@ ENTRY(startup_32)
  */
 
 #ifdef CONFIG_RELOCATABLE
-	movl 	%ebp, %ebx
-	addl    $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
-	andl    $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
+	movl $LOAD_PHYSICAL_ADDR, %eax
+	movl %ebp, %ebx
+	cmpl %ebx, %eax
+	jbe 1f
+	movl %eax, %ebx
+1:
+	addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
+	andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
 #else
 	movl $LOAD_PHYSICAL_ADDR, %ebx
 #endif
+	movl %ebx, %edi		/* Save kernel target address */
 
 	/* Replace the compressed data size with the uncompressed size */
 	subl input_len(%ebp), %ebx
@@ -84,27 +90,30 @@ ENTRY(startup_32)
 	addl $4095, %ebx
 	andl $~4095, %ebx
 
-/* Copy the compressed kernel to the end of our buffer
+/*
+ * Set up the stack
+ */
+	leal boot_stack_end(%ebx), %esp
+	pushl %edi		/* Saved kernel target address */
+
+/*
+ * Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
  */
 	pushl %esi
-	leal _ebss(%ebp), %esi
-	leal _ebss(%ebx), %edi
-	movl $(_ebss - startup_32), %ecx
+	leal (_bss-4)(%ebp), %esi
+	leal (_bss-4)(%ebx), %edi
+	movl $(_bss - startup_32), %ecx
+	shrl $2, %ecx
 	std
-	rep
-	movsb
+	rep; movsl
 	cld
 	popl %esi
 
-/* Compute the kernel start address.
+/*
+ * %ebp -> kernel target address
  */
-#ifdef CONFIG_RELOCATABLE
-	addl    $(CONFIG_PHYSICAL_ALIGN - 1), %ebp
-	andl    $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebp
-#else
-	movl	$LOAD_PHYSICAL_ADDR, %ebp
-#endif
+	popl %ebp
 
 /*
  * Jump to the relocated address.
@@ -117,20 +126,14 @@ ENDPROC(startup_32)
 relocated:
 
 /*
- * Clear BSS
- */
-	xorl %eax,%eax
-	leal _edata(%ebx),%edi
-	leal _ebss(%ebx), %ecx
-	subl %edi,%ecx
-	cld
-	rep
-	stosb
-
-/*
- * Setup the stack for the decompressor
+ * Clear BSS - note: stack is currently empty
  */
-	leal boot_stack_end(%ebx), %esp
+	xorl %eax, %eax
+	leal _bss(%ebx), %edi
+	leal (_ebss+3)(%ebx), %ecx
+	subl %edi, %ecx
+	shrl $2, %ecx
+	rep; stosl
 
 /*
  * Do the decompression, and jump to the new kernel..
@@ -178,12 +181,12 @@ relocated:
 /*
  * Jump to the decompressed kernel.
  */
-	xorl %ebx,%ebx
+	xorl %ebx, %ebx
 	jmp *%ebp
 
-.bss
 /* Stack and heap for uncompression */
-.balign 4
+	.bss
+	.balign 4
 boot_heap:
 	.fill BOOT_HEAP_SIZE, 1, 0
 boot_stack:
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index ed4a829..f4ddd02 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -7,11 +7,6 @@
 /*
  *  head.S contains the 32-bit startup code.
  *
- * NOTE!!! Startup happens at absolute address 0x00001000, which is also where
- * the page directory will exist. The startup code will be overwritten by
- * the page directory. [According to comments etc elsewhere on a compressed
- * kernel it will end up at 0x1000 + 1Mb I hope so as I assume this. - AC]
- *
  * Page 0 is deliberately kept safe, since System Management Mode code in 
  * laptops may need to access the BIOS data stored there.  This is also
  * useful for future device drivers that either access the BIOS via VM86 
@@ -77,11 +72,17 @@ ENTRY(startup_32)
  * contains the address where we should move the kernel image temporarily
  * for safe in-place decompression.
  */
+ALIGN_MASK	= (CONFIG_PHYSICAL_ALIGN-1) | (PMD_PAGE_SIZE-1)
 
 #ifdef CONFIG_RELOCATABLE
+	movl	$CONFIG_PHYSICAL_START, %eax
 	movl	%ebp, %ebx
-	addl	$(PMD_PAGE_SIZE -1), %ebx
-	andl	$PMD_PAGE_MASK, %ebx
+	addl	$ALIGN_MASK, %ebx
+	andl	$~ALIGN_MASK, %ebx
+	cmpl	%ebx, %eax
+	jbe	1f
+	movl	%eax, %ebx
+1:
 #else
 	movl	$CONFIG_PHYSICAL_START, %ebx
 #endif
@@ -221,13 +222,17 @@ ENTRY(startup_64)
 	/* Start with the delta to where the kernel will run at. */
 #ifdef CONFIG_RELOCATABLE
 	leaq	startup_32(%rip) /* - $startup_32 */, %rbp
-	addq	$(PMD_PAGE_SIZE - 1), %rbp
-	andq	$PMD_PAGE_MASK, %rbp
-	movq	%rbp, %rbx
+	movq	$CONFIG_PHYSICAL_START, %rax
+	addq	$ALIGN_MASK, %rbp
+	andq	$~ALIGN_MASK, %rbp
+	cmpq	%rbp, %rax
+	jbe	1f
+	movq	%rax, %rbp
+1:
 #else
 	movq	$CONFIG_PHYSICAL_START, %rbp
-	movq	%rbp, %rbx
 #endif
+	movq	%rbp, %rbx
 
 	/* Replace the compressed data size with the uncompressed size */
 	movl	input_len(%rip), %eax
@@ -266,13 +271,13 @@ relocated:
 /*
  * Clear BSS
  */
-	xorq	%rax, %rax
-	leaq    _edata(%rbx), %rdi
-	leaq    _end_before_pgt(%rbx), %rcx
+	xorl	%eax, %eax
+	leaq    _edata(%rip), %rdi
+	leaq    _end_before_pgt(%rip), %rcx
 	subq	%rdi, %rcx
+	shrq	$3, %rcx
 	cld
-	rep
-	stosb
+	rep	stosq
 
 	/* Setup the stack */
 	leaq	boot_stack_end(%rip), %rsp
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Change the default for CONFIG_PHYSICAL_START to 16 MB; 4 MB if
EMBEDDED.  Change the default for CONFIG_PHYSICAL_ALIGN to match up
with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)

The default of 16 MB is designed to avoid occupying ZONE_DMA, as well
as avoiding a 15-16 MB memory hole, which some vendors inexplicably
still have in their systems.

[ Impact: minor performance improvement, leave ZONE_DMA free ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/Kconfig |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 039c3f0..13b3a5a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1455,17 +1455,20 @@ config KEXEC_JUMP
 
 config PHYSICAL_START
 	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
-	default "0x1000000" if X86_NUMAQ
-	default "0x200000" if X86_64
-	default "0x100000"
+	default "0x400000" if EMBEDDED
+	default "0x1000000"
 	---help---
 	  This gives the physical address where the kernel is loaded.
 
 	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
 	  bzImage will decompress itself to above physical address and
-	  run from there. Otherwise, bzImage will run from the address where
-	  it has been loaded by the boot loader and will ignore above physical
-	  address.
+	  run from there. Otherwise, bzImage will run from the either
+	  the above physical address or where it has been loaded by
+	  the boot loader, whichever is higher.
+
+	  For embedded machines with very small memory (less than
+	  about 24 MB) this may need to be adjusted downward from the
+	  default value of 0x1000000 (16 MB).
 
 	  In normal kdump cases one does not have to set/change this option
 	  as now bzImage can be compiled as a completely relocatable image
@@ -1516,8 +1519,8 @@ config RELOCATABLE
 config PHYSICAL_ALIGN
 	hex
 	prompt "Alignment value to which kernel should be aligned" if X86_32
-	default "0x100000" if X86_32
-	default "0x200000" if X86_64
+	default "0x200000" if X86_64 || X86_PAE
+	default "0x400000"
 	range 0x2000 0x400000
 	---help---
 	  This value puts the alignment restrictions on physical address
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Change the default for CONFIG_PHYSICAL_START to 16 MB; 4 MB if
EMBEDDED.  Change the default for CONFIG_PHYSICAL_ALIGN to match up
with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)

The default of 16 MB is designed to avoid occupying ZONE_DMA, as well
as avoiding a 15-16 MB memory hole, which some vendors inexplicably
still have in their systems.

[ Impact: minor performance improvement, leave ZONE_DMA free ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/Kconfig |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 039c3f0..13b3a5a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1455,17 +1455,20 @@ config KEXEC_JUMP
 
 config PHYSICAL_START
 	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
-	default "0x1000000" if X86_NUMAQ
-	default "0x200000" if X86_64
-	default "0x100000"
+	default "0x400000" if EMBEDDED
+	default "0x1000000"
 	---help---
 	  This gives the physical address where the kernel is loaded.
 
 	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
 	  bzImage will decompress itself to above physical address and
-	  run from there. Otherwise, bzImage will run from the address where
-	  it has been loaded by the boot loader and will ignore above physical
-	  address.
+	  run from there. Otherwise, bzImage will run from the either
+	  the above physical address or where it has been loaded by
+	  the boot loader, whichever is higher.
+
+	  For embedded machines with very small memory (less than
+	  about 24 MB) this may need to be adjusted downward from the
+	  default value of 0x1000000 (16 MB).
 
 	  In normal kdump cases one does not have to set/change this option
 	  as now bzImage can be compiled as a completely relocatable image
@@ -1516,8 +1519,8 @@ config RELOCATABLE
 config PHYSICAL_ALIGN
 	hex
 	prompt "Alignment value to which kernel should be aligned" if X86_32
-	default "0x100000" if X86_32
-	default "0x200000" if X86_64
+	default "0x200000" if X86_64 || X86_PAE
+	default "0x400000"
 	range 0x2000 0x400000
 	---help---
 	  This value puts the alignment restrictions on physical address
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 04/14] x86, boot: unify use LOAD_PHYSICAL_ADDR and LOAD_PHYSICAL_ALIGN
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Instead of using CONFIG_PHYSICAL_ALIGN and CONFIG_PHYSICAL_START
directly, use LOAD_PHYSICAL_ALIGN (CONFIG_PHYSICAL_ALIGN or the
smallest valid number, whichever is greater) and LOAD_PHYSICAL_ADDR
(CONFIG_PHYSICAL_START rounded up to the nearest alignment datum) for
both 32 and 64-bit mode.

[ Impact: Avoids problems in case of kernel misconfiguration ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |    4 ++--
 arch/x86/boot/compressed/head_64.S |   21 +++++++++------------
 arch/x86/boot/header.S             |    2 +-
 arch/x86/include/asm/boot.h        |   13 +++++++++++--
 4 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 31fc6dc..2d7cd0f 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -70,8 +70,8 @@ ENTRY(startup_32)
 	jbe 1f
 	movl %eax, %ebx
 1:
-	addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
-	andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
+	addl $(LOAD_PHYSICAL_ALIGN - 1), %ebx
+	andl $(~(LOAD_PHYSICAL_ALIGN - 1)), %ebx
 #else
 	movl $LOAD_PHYSICAL_ADDR, %ebx
 #endif
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index f4ddd02..201af02 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -22,7 +22,6 @@
 #include <linux/linkage.h>
 #include <asm/segment.h>
 #include <asm/pgtable_types.h>
-#include <asm/page_types.h>
 #include <asm/boot.h>
 #include <asm/msr.h>
 #include <asm/processor-flags.h>
@@ -72,19 +71,17 @@ ENTRY(startup_32)
  * contains the address where we should move the kernel image temporarily
  * for safe in-place decompression.
  */
-ALIGN_MASK	= (CONFIG_PHYSICAL_ALIGN-1) | (PMD_PAGE_SIZE-1)
-
 #ifdef CONFIG_RELOCATABLE
-	movl	$CONFIG_PHYSICAL_START, %eax
+	movl	$LOAD_PHYSICAL_ADDR, %eax
 	movl	%ebp, %ebx
-	addl	$ALIGN_MASK, %ebx
-	andl	$~ALIGN_MASK, %ebx
+	addl	$(LOAD_PHYSICAL_ALIGN - 1), %ebx
+	andl	$~(LOAD_PHYSICAL_ALIGN - 1), %ebx
 	cmpl	%ebx, %eax
 	jbe	1f
 	movl	%eax, %ebx
 1:
 #else
-	movl	$CONFIG_PHYSICAL_START, %ebx
+	movl	$LOAD_PHYSICAL_ADDR, %ebx
 #endif
 
 	/* Replace the compressed data size with the uncompressed size */
@@ -216,21 +213,21 @@ ENTRY(startup_64)
 	 *
 	 * If it is a relocatable kernel then decompress and run the kernel
 	 * from load address aligned to 2MB addr, otherwise decompress and
-	 * run the kernel from CONFIG_PHYSICAL_START
+	 * run the kernel from LOAD_PHYSICAL_ADDR
 	 */
 
 	/* Start with the delta to where the kernel will run at. */
 #ifdef CONFIG_RELOCATABLE
 	leaq	startup_32(%rip) /* - $startup_32 */, %rbp
-	movq	$CONFIG_PHYSICAL_START, %rax
-	addq	$ALIGN_MASK, %rbp
-	andq	$~ALIGN_MASK, %rbp
+	movq	$LOAD_PHYSICAL_ADDR, %rax
+	addq	$(LOAD_PHYSICAL_ALIGN - 1), %rbp
+	andq	$~(LOAD_PHYSICAL_ALIGN - 1), %rbp
 	cmpq	%rbp, %rax
 	jbe	1f
 	movq	%rax, %rbp
 1:
 #else
-	movq	$CONFIG_PHYSICAL_START, %rbp
+	movq	$LOAD_PHYSICAL_ADDR, %rbp
 #endif
 	movq	%rbp, %rbx
 
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 5d84d1c..cfd3bc4 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -192,7 +192,7 @@ ramdisk_max:	.long 0x7fffffff
 					# but leave it at 2 GB to avoid
 					# possible bootloader bugs.
 
-kernel_alignment:  .long CONFIG_PHYSICAL_ALIGN	#physical addr alignment
+kernel_alignment:  .long LOAD_PHYSICAL_ALIGN	#physical addr alignment
 						#required for protected mode
 						#kernel
 #ifdef CONFIG_RELOCATABLE
diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
index 6ba23dd..641debb 100644
--- a/arch/x86/include/asm/boot.h
+++ b/arch/x86/include/asm/boot.h
@@ -8,10 +8,19 @@
 
 #ifdef __KERNEL__
 
+#include <asm/page_types.h>
+
+/* Permitted physical alignment of the kernel */
+#if defined(CONFIG_X86_64) && CONFIG_PHYSICAL_ALIGN < PMD_PAGE_SIZE
+#define LOAD_PHYSICAL_ALIGN	PMD_PAGE_SIZE
+#else
+#define LOAD_PHYSICAL_ALIGN	CONFIG_PHYSICAL_ALIGN
+#endif
+
 /* Physical address where kernel should be loaded. */
 #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
-				+ (CONFIG_PHYSICAL_ALIGN - 1)) \
-				& ~(CONFIG_PHYSICAL_ALIGN - 1))
+				+ (LOAD_PHYSICAL_ALIGN - 1)) \
+				& ~(LOAD_PHYSICAL_ALIGN - 1))
 
 #ifdef CONFIG_KERNEL_BZIP2
 #define BOOT_HEAP_SIZE             0x400000
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 04/14] x86, boot: unify use LOAD_PHYSICAL_ADDR and LOAD_PHYSICAL_ALIGN
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Instead of using CONFIG_PHYSICAL_ALIGN and CONFIG_PHYSICAL_START
directly, use LOAD_PHYSICAL_ALIGN (CONFIG_PHYSICAL_ALIGN or the
smallest valid number, whichever is greater) and LOAD_PHYSICAL_ADDR
(CONFIG_PHYSICAL_START rounded up to the nearest alignment datum) for
both 32 and 64-bit mode.

[ Impact: Avoids problems in case of kernel misconfiguration ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |    4 ++--
 arch/x86/boot/compressed/head_64.S |   21 +++++++++------------
 arch/x86/boot/header.S             |    2 +-
 arch/x86/include/asm/boot.h        |   13 +++++++++++--
 4 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 31fc6dc..2d7cd0f 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -70,8 +70,8 @@ ENTRY(startup_32)
 	jbe 1f
 	movl %eax, %ebx
 1:
-	addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
-	andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
+	addl $(LOAD_PHYSICAL_ALIGN - 1), %ebx
+	andl $(~(LOAD_PHYSICAL_ALIGN - 1)), %ebx
 #else
 	movl $LOAD_PHYSICAL_ADDR, %ebx
 #endif
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index f4ddd02..201af02 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -22,7 +22,6 @@
 #include <linux/linkage.h>
 #include <asm/segment.h>
 #include <asm/pgtable_types.h>
-#include <asm/page_types.h>
 #include <asm/boot.h>
 #include <asm/msr.h>
 #include <asm/processor-flags.h>
@@ -72,19 +71,17 @@ ENTRY(startup_32)
  * contains the address where we should move the kernel image temporarily
  * for safe in-place decompression.
  */
-ALIGN_MASK	= (CONFIG_PHYSICAL_ALIGN-1) | (PMD_PAGE_SIZE-1)
-
 #ifdef CONFIG_RELOCATABLE
-	movl	$CONFIG_PHYSICAL_START, %eax
+	movl	$LOAD_PHYSICAL_ADDR, %eax
 	movl	%ebp, %ebx
-	addl	$ALIGN_MASK, %ebx
-	andl	$~ALIGN_MASK, %ebx
+	addl	$(LOAD_PHYSICAL_ALIGN - 1), %ebx
+	andl	$~(LOAD_PHYSICAL_ALIGN - 1), %ebx
 	cmpl	%ebx, %eax
 	jbe	1f
 	movl	%eax, %ebx
 1:
 #else
-	movl	$CONFIG_PHYSICAL_START, %ebx
+	movl	$LOAD_PHYSICAL_ADDR, %ebx
 #endif
 
 	/* Replace the compressed data size with the uncompressed size */
@@ -216,21 +213,21 @@ ENTRY(startup_64)
 	 *
 	 * If it is a relocatable kernel then decompress and run the kernel
 	 * from load address aligned to 2MB addr, otherwise decompress and
-	 * run the kernel from CONFIG_PHYSICAL_START
+	 * run the kernel from LOAD_PHYSICAL_ADDR
 	 */
 
 	/* Start with the delta to where the kernel will run at. */
 #ifdef CONFIG_RELOCATABLE
 	leaq	startup_32(%rip) /* - $startup_32 */, %rbp
-	movq	$CONFIG_PHYSICAL_START, %rax
-	addq	$ALIGN_MASK, %rbp
-	andq	$~ALIGN_MASK, %rbp
+	movq	$LOAD_PHYSICAL_ADDR, %rax
+	addq	$(LOAD_PHYSICAL_ALIGN - 1), %rbp
+	andq	$~(LOAD_PHYSICAL_ALIGN - 1), %rbp
 	cmpq	%rbp, %rax
 	jbe	1f
 	movq	%rax, %rbp
 1:
 #else
-	movq	$CONFIG_PHYSICAL_START, %rbp
+	movq	$LOAD_PHYSICAL_ADDR, %rbp
 #endif
 	movq	%rbp, %rbx
 
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 5d84d1c..cfd3bc4 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -192,7 +192,7 @@ ramdisk_max:	.long 0x7fffffff
 					# but leave it at 2 GB to avoid
 					# possible bootloader bugs.
 
-kernel_alignment:  .long CONFIG_PHYSICAL_ALIGN	#physical addr alignment
+kernel_alignment:  .long LOAD_PHYSICAL_ALIGN	#physical addr alignment
 						#required for protected mode
 						#kernel
 #ifdef CONFIG_RELOCATABLE
diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
index 6ba23dd..641debb 100644
--- a/arch/x86/include/asm/boot.h
+++ b/arch/x86/include/asm/boot.h
@@ -8,10 +8,19 @@
 
 #ifdef __KERNEL__
 
+#include <asm/page_types.h>
+
+/* Permitted physical alignment of the kernel */
+#if defined(CONFIG_X86_64) && CONFIG_PHYSICAL_ALIGN < PMD_PAGE_SIZE
+#define LOAD_PHYSICAL_ALIGN	PMD_PAGE_SIZE
+#else
+#define LOAD_PHYSICAL_ALIGN	CONFIG_PHYSICAL_ALIGN
+#endif
+
 /* Physical address where kernel should be loaded. */
 #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
-				+ (CONFIG_PHYSICAL_ALIGN - 1)) \
-				& ~(CONFIG_PHYSICAL_ALIGN - 1))
+				+ (LOAD_PHYSICAL_ALIGN - 1)) \
+				& ~(LOAD_PHYSICAL_ALIGN - 1))
 
 #ifdef CONFIG_KERNEL_BZIP2
 #define BOOT_HEAP_SIZE             0x400000
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Allow the compression commands in Kbuild (i.e. gzip, bzip2, lzma) to
take multiple input files and emit the concatenated compressed
output.  This avoids an intermediate step when a kernel image is built
from multiple components, such as the relocatable x86-32 kernel.

[ Impact: new build feature, not yet used ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/Makefile.lib |   11 ++++++++---
 scripts/bin_size     |    8 ++++++--
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9796195..35dfdf6 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -183,7 +183,8 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
 # ---------------------------------------------------------------------------
 
 quiet_cmd_gzip = GZIP    $@
-cmd_gzip = gzip -f -9 < $< > $@
+cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
+	(rm -f $@ ; false)
 
 
 # Bzip2
@@ -193,10 +194,14 @@ cmd_gzip = gzip -f -9 < $< > $@
 size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
 
 quiet_cmd_bzip2 = BZIP2    $@
-cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
+cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
+	bzip2 -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
+	(rm -f $@ ; false)
 
 # Lzma
 # ---------------------------------------------------------------------------
 
 quiet_cmd_lzma = LZMA    $@
-cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
+cmd_lzma = (cat $(filter-out FORCE,$^) | \
+	lzma -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
+	(rm -f $@ ; false)
diff --git a/scripts/bin_size b/scripts/bin_size
index 43e1b36..55f2161 100644
--- a/scripts/bin_size
+++ b/scripts/bin_size
@@ -1,10 +1,14 @@
 #!/bin/sh
 
 if [ $# = 0 ] ; then
-   echo Usage: $0 file
+   echo Usage: $0 file...
 fi
 
-size_dec=`stat -c "%s" $1`
+size_dec=0
+for file; do
+  fsize=`stat -c "%s" $file`
+  size_dec=`expr $size_dec + $fsize`
+done
 size_hex_echo_string=`printf "%08x" $size_dec |
      sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
 /bin/echo -ne $size_hex_echo_string
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Allow the compression commands in Kbuild (i.e. gzip, bzip2, lzma) to
take multiple input files and emit the concatenated compressed
output.  This avoids an intermediate step when a kernel image is built
from multiple components, such as the relocatable x86-32 kernel.

[ Impact: new build feature, not yet used ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/Makefile.lib |   11 ++++++++---
 scripts/bin_size     |    8 ++++++--
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9796195..35dfdf6 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -183,7 +183,8 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
 # ---------------------------------------------------------------------------
 
 quiet_cmd_gzip = GZIP    $@
-cmd_gzip = gzip -f -9 < $< > $@
+cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
+	(rm -f $@ ; false)
 
 
 # Bzip2
@@ -193,10 +194,14 @@ cmd_gzip = gzip -f -9 < $< > $@
 size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
 
 quiet_cmd_bzip2 = BZIP2    $@
-cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
+cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
+	bzip2 -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
+	(rm -f $@ ; false)
 
 # Lzma
 # ---------------------------------------------------------------------------
 
 quiet_cmd_lzma = LZMA    $@
-cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
+cmd_lzma = (cat $(filter-out FORCE,$^) | \
+	lzma -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
+	(rm -f $@ ; false)
diff --git a/scripts/bin_size b/scripts/bin_size
index 43e1b36..55f2161 100644
--- a/scripts/bin_size
+++ b/scripts/bin_size
@@ -1,10 +1,14 @@
 #!/bin/sh
 
 if [ $# = 0 ] ; then
-   echo Usage: $0 file
+   echo Usage: $0 file...
 fi
 
-size_dec=`stat -c "%s" $1`
+size_dec=0
+for file; do
+  fsize=`stat -c "%s" $file`
+  size_dec=`expr $size_dec + $fsize`
+done
 size_hex_echo_string=`printf "%08x" $size_dec |
      sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
 /bin/echo -ne $size_hex_echo_string
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 06/14] x86: add a Kconfig symbol for when relocations are needed
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

We only need to build relocations when we are building a 32-bit
relocatable kernel.  Rather than unnecessarily complicating the
Makefiles, make an explicit Kbuild symbol for this.

[ Impact: permits future cleanup ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/Kconfig |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 13b3a5a..cd76de1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1516,6 +1516,11 @@ config RELOCATABLE
 	  it has been loaded at and the compile time physical address
 	  (CONFIG_PHYSICAL_START) is ignored.
 
+# Relocation on x86-32 needs some additional build support
+config X86_NEED_RELOCS
+	def_bool y
+	depends on X86_32 && RELOCATABLE
+
 config PHYSICAL_ALIGN
 	hex
 	prompt "Alignment value to which kernel should be aligned" if X86_32
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 06/14] x86: add a Kconfig symbol for when relocations are needed
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

We only need to build relocations when we are building a 32-bit
relocatable kernel.  Rather than unnecessarily complicating the
Makefiles, make an explicit Kbuild symbol for this.

[ Impact: permits future cleanup ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/Kconfig |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 13b3a5a..cd76de1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1516,6 +1516,11 @@ config RELOCATABLE
 	  it has been loaded at and the compile time physical address
 	  (CONFIG_PHYSICAL_START) is ignored.
 
+# Relocation on x86-32 needs some additional build support
+config X86_NEED_RELOCS
+	def_bool y
+	depends on X86_32 && RELOCATABLE
+
 config PHYSICAL_ALIGN
 	hex
 	prompt "Alignment value to which kernel should be aligned" if X86_32
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 07/14] x86, boot: simplify arch/x86/boot/compressed/Makefile
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Simplify the arch/x86/boot/compressed/Makefile, by using the new
capability of specifying multiple inputs to a compressor, and the
CONFIG_X86_NEED_RELOCS Kconfig symbol.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/boot/compressed/Makefile |   39 +++++-------------------------------
 1 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 0f4b5e2..b35c3bb 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -29,7 +29,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
 
 
 targets += vmlinux.bin.all vmlinux.relocs relocs
-hostprogs-$(CONFIG_X86_32) += relocs
+hostprogs-$(CONFIG_X86_NEED_RELOCS) += relocs
 
 quiet_cmd_relocs = RELOCS  $@
       cmd_relocs = $(obj)/relocs $< > $@;$(obj)/relocs --abs-relocs $<
@@ -37,46 +37,19 @@ $(obj)/vmlinux.relocs: vmlinux $(obj)/relocs FORCE
 	$(call if_changed,relocs)
 
 vmlinux.bin.all-y := $(obj)/vmlinux.bin
-vmlinux.bin.all-$(CONFIG_RELOCATABLE) += $(obj)/vmlinux.relocs
-quiet_cmd_relocbin = BUILD   $@
-      cmd_relocbin = cat $(filter-out FORCE,$^) > $@
-$(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE
-	$(call if_changed,relocbin)
+vmlinux.bin.all-$(CONFIG_X86_NEED_RELOCS) += $(obj)/vmlinux.relocs
 
-ifeq ($(CONFIG_X86_32),y)
-
-ifdef CONFIG_RELOCATABLE
-$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
-	$(call if_changed,gzip)
-$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin.all FORCE
-	$(call if_changed,bzip2)
-$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE
-	$(call if_changed,lzma)
-else
-$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,gzip)
-$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,bzip2)
-$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,lzma)
-endif
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
-
-else
-
-$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
+$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
 	$(call if_changed,gzip)
-$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
+$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
 	$(call if_changed,bzip2)
-$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
+$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
 	$(call if_changed,lzma)
 
-LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
-endif
-
 suffix_$(CONFIG_KERNEL_GZIP)  = gz
 suffix_$(CONFIG_KERNEL_BZIP2) = bz2
 suffix_$(CONFIG_KERNEL_LZMA)  = lzma
 
+LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T
 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
 	$(call if_changed,ld)
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 07/14] x86, boot: simplify arch/x86/boot/compressed/Makefile
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Simplify the arch/x86/boot/compressed/Makefile, by using the new
capability of specifying multiple inputs to a compressor, and the
CONFIG_X86_NEED_RELOCS Kconfig symbol.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/boot/compressed/Makefile |   39 +++++-------------------------------
 1 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 0f4b5e2..b35c3bb 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -29,7 +29,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
 
 
 targets += vmlinux.bin.all vmlinux.relocs relocs
-hostprogs-$(CONFIG_X86_32) += relocs
+hostprogs-$(CONFIG_X86_NEED_RELOCS) += relocs
 
 quiet_cmd_relocs = RELOCS  $@
       cmd_relocs = $(obj)/relocs $< > $@;$(obj)/relocs --abs-relocs $<
@@ -37,46 +37,19 @@ $(obj)/vmlinux.relocs: vmlinux $(obj)/relocs FORCE
 	$(call if_changed,relocs)
 
 vmlinux.bin.all-y := $(obj)/vmlinux.bin
-vmlinux.bin.all-$(CONFIG_RELOCATABLE) += $(obj)/vmlinux.relocs
-quiet_cmd_relocbin = BUILD   $@
-      cmd_relocbin = cat $(filter-out FORCE,$^) > $@
-$(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE
-	$(call if_changed,relocbin)
+vmlinux.bin.all-$(CONFIG_X86_NEED_RELOCS) += $(obj)/vmlinux.relocs
 
-ifeq ($(CONFIG_X86_32),y)
-
-ifdef CONFIG_RELOCATABLE
-$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE
-	$(call if_changed,gzip)
-$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin.all FORCE
-	$(call if_changed,bzip2)
-$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin.all FORCE
-	$(call if_changed,lzma)
-else
-$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,gzip)
-$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,bzip2)
-$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
-	$(call if_changed,lzma)
-endif
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
-
-else
-
-$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
+$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
 	$(call if_changed,gzip)
-$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
+$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
 	$(call if_changed,bzip2)
-$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
+$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
 	$(call if_changed,lzma)
 
-LDFLAGS_piggy.o := -r --format binary --oformat elf64-x86-64 -T
-endif
-
 suffix_$(CONFIG_KERNEL_GZIP)  = gz
 suffix_$(CONFIG_KERNEL_BZIP2) = bz2
 suffix_$(CONFIG_KERNEL_LZMA)  = lzma
 
+LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T
 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
 	$(call if_changed,ld)
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 08/14] x86, boot: use BP_scratch in arch/x86/boot/compressed/head_*.S
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Use the BP_scratch symbol from asm-offsets.h instead of hard-coding
the location.

[ Impact: cleanup ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |    2 +-
 arch/x86/boot/compressed/head_64.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 2d7cd0f..511b0be 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -53,7 +53,7 @@ ENTRY(startup_32)
  * data at 0x1e4 (defined as a scratch field) are used as the stack
  * for this calculation. Only 4 bytes are needed.
  */
-	leal (0x1e4+4)(%esi), %esp
+	leal (BP_scratch+4)(%esi), %esp
 	call 1f
 1:	popl %ebp
 	subl $1b, %ebp
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 201af02..191b0d3 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -50,7 +50,7 @@ ENTRY(startup_32)
  * data at 0x1e4 (defined as a scratch field) are used as the stack
  * for this calculation. Only 4 bytes are needed.
  */
-	leal	(0x1e4+4)(%esi), %esp
+	leal	(BP_scratch+4)(%esi), %esp
 	call	1f
 1:	popl	%ebp
 	subl	$1b, %ebp
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 08/14] x86, boot: use BP_scratch in arch/x86/boot/compressed/head_*.S
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Use the BP_scratch symbol from asm-offsets.h instead of hard-coding
the location.

[ Impact: cleanup ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |    2 +-
 arch/x86/boot/compressed/head_64.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 2d7cd0f..511b0be 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -53,7 +53,7 @@ ENTRY(startup_32)
  * data at 0x1e4 (defined as a scratch field) are used as the stack
  * for this calculation. Only 4 bytes are needed.
  */
-	leal (0x1e4+4)(%esi), %esp
+	leal (BP_scratch+4)(%esi), %esp
 	call 1f
 1:	popl %ebp
 	subl $1b, %ebp
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 201af02..191b0d3 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -50,7 +50,7 @@ ENTRY(startup_32)
  * data at 0x1e4 (defined as a scratch field) are used as the stack
  * for this calculation. Only 4 bytes are needed.
  */
-	leal	(0x1e4+4)(%esi), %esp
+	leal	(BP_scratch+4)(%esi), %esp
 	call	1f
 1:	popl	%ebp
 	subl	$1b, %ebp
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin, Jeremy Fitzhardinge

From: H. Peter Anvin <hpa@zytor.com>

Make the (minimum) runtime address and the required amount of linear
address space available to the boot loader.  A relocating boot loader
can use this information to select a kernel location; furthermore, it
is permitted to modify the minimum runtime address field in order for
the boot loader to force a specific location for the kernel (as long
as it fits the alignment constraints.)

This means that the address space layout for the kernel compressor has
to be determined at compile time.  Since we have to do that, we might
as well reap the benefit and remove some runtime calculations in
assembly.

Note: bounding the amount of linear address space (not necessarily
bounding the amount of memory needed, but the amount that has to be
linearly contiguous before the memory map is consulted) was only
possible since Jeremy Fitzhardinge's brk support work.

[ Impact: new feature; simplication of compressed/head_*.S ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/boot/Makefile               |   24 ++++++---
 arch/x86/boot/compressed/Makefile    |   14 ++++--
 arch/x86/boot/compressed/head_32.S   |   54 ++++++-------------
 arch/x86/boot/compressed/head_64.S   |   52 +++++-------------
 arch/x86/boot/compressed/mkpiggy.c   |   97 ++++++++++++++++++++++++++++++++++
 arch/x86/boot/compressed/vmlinux.scr |   10 ----
 arch/x86/boot/header.S               |   19 +++++--
 arch/x86/include/asm/bootparam.h     |    2 +
 arch/x86/kernel/asm-offsets_32.c     |    1 +
 arch/x86/kernel/asm-offsets_64.c     |    1 +
 10 files changed, 173 insertions(+), 101 deletions(-)
 create mode 100644 arch/x86/boot/compressed/mkpiggy.c
 delete mode 100644 arch/x86/boot/compressed/vmlinux.scr

diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 6633b6e..3332d22 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
 
 SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
 
-sed-offsets := -e 's/^00*/0/' \
-        -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
+sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p'
 
-quiet_cmd_offsets = OFFSETS $@
-      cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
+quiet_cmd_voffset = VOFFSET $@
+      cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@
 
-$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
-	$(call if_changed,offsets)
+targets += voffset.h
+$(obj)/voffset.h: vmlinux FORCE
+	$(call if_changed,voffset)
+
+sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_ebss\|z_.*\)$$/\#define ZO_\2 0x\1/p'
+
+quiet_cmd_zoffset = ZOFFSET $@
+      cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
+
+targets += zoffset.h
+$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
+	$(call if_changed,zoffset)
 
-targets += offsets.h
 
 AFLAGS_header.o += -I$(obj)
-$(obj)/header.o: $(obj)/offsets.h
+$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
 
 LDFLAGS_setup.elf	:= -T
 $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index b35c3bb..6f4d7ba 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -4,7 +4,8 @@
 # create a compressed vmlinux image from the original vmlinux
 #
 
-targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
+targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
+	   vmlinux.bin.lzma head_$(BITS).o misc.o
 
 KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
@@ -19,6 +20,8 @@ KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
 LDFLAGS := -m elf_$(UTS_MACHINE)
 LDFLAGS_vmlinux := -T
 
+hostprogs-y	:= mkpiggy
+
 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
 	$(call if_changed,ld)
 	@:
@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
 suffix_$(CONFIG_KERNEL_BZIP2) = bz2
 suffix_$(CONFIG_KERNEL_LZMA)  = lzma
 
-LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
-	$(call if_changed,ld)
+quiet_cmd_mkpiggy = MKPIGGY $@
+      cmd_mkpiggy = $(obj)/mkpiggy $< > $@
+
+targets += piggy.S
+$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix_y) $(obj)/mkpiggy FORCE
+	$(call if_changed,mkpiggy)
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 511b0be..47636b3 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -64,7 +64,7 @@ ENTRY(startup_32)
  */
 
 #ifdef CONFIG_RELOCATABLE
-	movl $LOAD_PHYSICAL_ADDR, %eax
+	movl BP_runtime_start(%esi), %eax
 	movl %ebp, %ebx
 	cmpl %ebx, %eax
 	jbe 1f
@@ -75,26 +75,13 @@ ENTRY(startup_32)
 #else
 	movl $LOAD_PHYSICAL_ADDR, %ebx
 #endif
-	movl %ebx, %edi		/* Save kernel target address */
-
-	/* Replace the compressed data size with the uncompressed size */
-	subl input_len(%ebp), %ebx
-	movl output_len(%ebp), %eax
-	addl %eax, %ebx
-	/* Add 8 bytes for every 32K input block */
-	shrl $12, %eax
-	addl %eax, %ebx
-	/* Add 32K + 18 bytes of extra slack */
-	addl $(32768 + 18), %ebx
-	/* Align on a 4K boundary */
-	addl $4095, %ebx
-	andl $~4095, %ebx
+	/* Target address to relocate to for decompression */
+	addl $z_extract_offset, %ebx
 
 /*
  * Set up the stack
  */
 	leal boot_stack_end(%ebx), %esp
-	pushl %edi		/* Saved kernel target address */
 
 /*
  * Copy the compressed kernel to the end of our buffer
@@ -111,11 +98,6 @@ ENTRY(startup_32)
 	popl %esi
 
 /*
- * %ebp -> kernel target address
- */
-	popl %ebp
-
-/*
  * Jump to the relocated address.
  */
 	leal relocated(%ebx), %eax
@@ -138,29 +120,27 @@ relocated:
 /*
  * Do the decompression, and jump to the new kernel..
  */
-	movl output_len(%ebx), %eax
-	pushl %eax
-			# push arguments for decompress_kernel:
-	pushl %ebp	# output address
-	movl input_len(%ebx), %eax
-	pushl %eax	# input_len
+	leal z_extract_offset_negative(%ebx), %ebp
+	pushl %ebp		# output address
+	pushl $z_input_len	# input_len
 	leal input_data(%ebx), %eax
-	pushl %eax	# input_data
+	pushl %eax		# input_data
 	leal boot_heap(%ebx), %eax
-	pushl %eax	# heap area
-	pushl %esi	# real mode pointer
+	pushl %eax		# heap area
+	pushl %esi		# real mode pointer
 	call decompress_kernel
 	addl $20, %esp
-	popl %ecx
 
-#if CONFIG_RELOCATABLE
-/* Find the address of the relocations.
+#ifdef CONFIG_RELOCATABLE
+/*
+ * Find the address of the relocations.
  */
-	movl %ebp, %edi
-	addl %ecx, %edi
+	leal z_output_len(%ebp), %edi
 
-/* Calculate the delta between where vmlinux was compiled to run
- * and where it was actually loaded.
+/*
+ * Calculate the delta between where vmlinux was compiled to run
+ * and where it was actually loaded.  Use the compile-time
+ * LOAD_PHYSICAL_ADDR here, not boot_param.runtime_start.
  */
 	movl %ebp, %ebx
 	subl $LOAD_PHYSICAL_ADDR, %ebx
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 191b0d3..2678fdf 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -72,7 +72,7 @@ ENTRY(startup_32)
  * for safe in-place decompression.
  */
 #ifdef CONFIG_RELOCATABLE
-	movl	$LOAD_PHYSICAL_ADDR, %eax
+	movl	BP_runtime_start(%esi), %eax
 	movl	%ebp, %ebx
 	addl	$(LOAD_PHYSICAL_ALIGN - 1), %ebx
 	andl	$~(LOAD_PHYSICAL_ALIGN - 1), %ebx
@@ -83,17 +83,8 @@ ENTRY(startup_32)
 #else
 	movl	$LOAD_PHYSICAL_ADDR, %ebx
 #endif
-
-	/* Replace the compressed data size with the uncompressed size */
-	subl	input_len(%ebp), %ebx
-	movl	output_len(%ebp), %eax
-	addl	%eax, %ebx
-	/* Add 8 bytes for every 32K input block */
-	shrl	$12, %eax
-	addl	%eax, %ebx
-	/* Add 32K + 18 bytes of extra slack and align on a 4K boundary */
-	addl	$(32768 + 18 + 4095), %ebx
-	andl	$~4095, %ebx
+	/* Target address to relocate to for decompression */
+	addl	$z_extract_offset, %ebx
 
 /*
  * Prepare for entering 64 bit mode
@@ -207,19 +198,17 @@ ENTRY(startup_64)
 	movl    $0x20, %eax
 	ltr	%ax
 
-	/* Compute the decompressed kernel start address.  It is where
-	 * we were loaded at aligned to a 2M boundary. %rbp contains the
-	 * decompressed kernel start address.
+	/*
+	 * Kernel load address and relocation information... note that
+	 * we can't rely on the calculation in 32-bit mode since we might
+	 * have come here via the 64-bit entrypoint.
 	 *
-	 * If it is a relocatable kernel then decompress and run the kernel
-	 * from load address aligned to 2MB addr, otherwise decompress and
-	 * run the kernel from LOAD_PHYSICAL_ADDR
+	 * At the end of this, %rbp points to the decompressed kernel
+	 * load address, and %rbx to where we need to relocate ourselves to.
 	 */
-
-	/* Start with the delta to where the kernel will run at. */
 #ifdef CONFIG_RELOCATABLE
 	leaq	startup_32(%rip) /* - $startup_32 */, %rbp
-	movq	$LOAD_PHYSICAL_ADDR, %rax
+	movl	BP_runtime_start(%rsi), %eax
 	addq	$(LOAD_PHYSICAL_ALIGN - 1), %rbp
 	andq	$~(LOAD_PHYSICAL_ALIGN - 1), %rbp
 	cmpq	%rbp, %rax
@@ -227,21 +216,9 @@ ENTRY(startup_64)
 	movq	%rax, %rbp
 1:
 #else
-	movq	$LOAD_PHYSICAL_ADDR, %rbp
+	movl	$LOAD_PHYSICAL_ADDR, %ebp
 #endif
-	movq	%rbp, %rbx
-
-	/* Replace the compressed data size with the uncompressed size */
-	movl	input_len(%rip), %eax
-	subq	%rax, %rbx
-	movl	output_len(%rip), %eax
-	addq	%rax, %rbx
-	/* Add 8 bytes for every 32K input block */
-	shrq	$12, %rax
-	addq	%rax, %rbx
-	/* Add 32K + 18 bytes of extra slack and align on a 4K boundary */
-	addq	$(32768 + 18 + 4095), %rbx
-	andq	$~4095, %rbx
+	leaq	z_extract_offset(%rbp), %rbx
 
 /* Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
@@ -290,9 +267,8 @@ relocated:
 	movq	%rsi, %rdi		# real mode address
 	leaq	boot_heap(%rip), %rsi	# malloc area for uncompression
 	leaq	input_data(%rip), %rdx  # input_data
-	movl	input_len(%rip), %eax
-	movq	%rax, %rcx		# input_len
-	movq	%rbp, %r8		# output
+	movl	$z_input_len, %ecx	# input_len
+	movq	%rbp, %r8		# output target address
 	call	decompress_kernel
 	popq	%rsi
 
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
new file mode 100644
index 0000000..bcbd36c
--- /dev/null
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -0,0 +1,97 @@
+/* ----------------------------------------------------------------------- *
+ *
+ *  Copyright (C) 2009 Intel Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License version
+ *  2 as published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ *  02110-1301, USA.
+ *
+ *  H. Peter Anvin <hpa@linux.intel.com>
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * Compute the desired load offset from a compressed program; outputs
+ * a small assembly wrapper with the appropriate symbols defined.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+
+static uint32_t getle32(const void *p)
+{
+	const uint8_t *cp = p;
+
+	return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
+		((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
+}
+
+int main(int argc, char *argv[])
+{
+	uint32_t olen;
+	long ilen;
+	unsigned long offs;
+	FILE *f;
+
+	if (argc < 2) {
+		fprintf(stderr, "Usage: %s compressed_file\n", argv[0]);
+		return 1;
+	}
+
+	/* Get the information for the compressed kernel image first */
+
+	f = fopen(argv[1], "r");
+	if (!f) {
+		perror(argv[1]);
+		return 1;
+	}
+
+
+	if (fseek(f, -4L, SEEK_END)) {
+		perror(argv[1]);
+	}
+	fread(&olen, sizeof olen, 1, f);
+	ilen = ftell(f);
+	olen = getle32(&olen);
+	fclose(f);
+
+	/*
+	 * Now we have the input (compressed) and output (uncompressed)
+	 * sizes, compute the necessary decompression offset...
+	 */
+
+	offs = (olen > ilen) ? olen - ilen : 0;
+	offs += olen >> 12;	/* Add 8 bytes for each 32K block */
+	offs += 32*1024 + 18;	/* Add 32K + 18 bytes slack */
+	offs = (offs+4095) & ~4095; /* Round to a 4K boundary */
+
+	printf(".section \".rodata.compressed\",\"a\",@progbits\n");
+	printf(".globl z_input_len\n");
+	printf("z_input_len = %lu\n", ilen);
+	printf(".globl z_output_len\n");
+	printf("z_output_len = %lu\n", (unsigned long)olen);
+	printf(".globl z_extract_offset\n");
+	printf("z_extract_offset = 0x%lx\n", offs);
+	/* z_extract_offset_negative allows simplification of head_32.S */
+	printf(".globl z_extract_offset_negative\n");
+	printf("z_extract_offset_negative = -0x%lx\n", offs);
+
+	printf(".globl input_data, input_data_end\n");
+	printf("input_data:\n");
+	printf(".incbin \"%s\"\n", argv[1]);
+	printf("input_data_end:\n");
+
+	return 0;
+}
diff --git a/arch/x86/boot/compressed/vmlinux.scr b/arch/x86/boot/compressed/vmlinux.scr
deleted file mode 100644
index f02382a..0000000
--- a/arch/x86/boot/compressed/vmlinux.scr
+++ /dev/null
@@ -1,10 +0,0 @@
-SECTIONS
-{
-  .rodata.compressed : {
-	input_len = .;
-	LONG(input_data_end - input_data) input_data = .;
-	*(.data)
-	output_len = . - 4;
-	input_data_end = .;
-	}
-}
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index cfd3bc4..0491fc4 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -22,7 +22,8 @@
 #include <asm/page_types.h>
 #include <asm/setup.h>
 #include "boot.h"
-#include "offsets.h"
+#include "voffset.h"
+#include "zoffset.h"
 
 BOOTSEG		= 0x07C0		/* original address of boot-sector */
 SYSSEG		= 0x1000		/* historical load address >> 4 */
@@ -115,7 +116,7 @@ _start:
 	# Part 2 of the header, from the old setup.S
 
 		.ascii	"HdrS"		# header signature
-		.word	0x0209		# header version number (>= 0x0105)
+		.word	0x020a		# header version number (>= 0x0105)
 					# or else old loadlin-1.5 will fail)
 		.globl realmode_swtch
 realmode_swtch:	.word	0, 0		# default_switch, SETUPSEG
@@ -212,13 +213,23 @@ hardware_subarch:	.long 0			# subarchitecture, added with 2.07
 
 hardware_subarch_data:	.quad 0
 
-payload_offset:		.long input_data
-payload_length:		.long input_data_end-input_data
+payload_offset:		.long ZO_input_data
+payload_length:		.long ZO_z_input_len
 
 setup_data:		.quad 0			# 64-bit physical pointer to
 						# single linked list of
 						# struct setup_data
 
+runtime_start:		.long LOAD_PHYSICAL_ADDR
+#define ZO_RUNTIME_SIZE	(ZO__ebss+ZO_z_expand_offset)
+#define VO_RUNTIME_SIZE	(VO__end-VO__text)
+#if VO_RUNTIME_SIZE > ZO_RUNTIME_SIZE
+#define RUNTIME_SIZE	VO_RUNTIME_SIZE
+#else
+#define RUNTIME_SIZE	ZO_RUNTIME_SIZE
+#endif
+runtime_size:		.long RUNTIME_SIZE	# Minimum contiguous memory
+
 # End of setup header #####################################################
 
 	.section ".inittext", "ax"
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h
index 433adae..dd924b5 100644
--- a/arch/x86/include/asm/bootparam.h
+++ b/arch/x86/include/asm/bootparam.h
@@ -62,6 +62,8 @@ struct setup_header {
 	__u32	payload_offset;
 	__u32	payload_length;
 	__u64	setup_data;
+	__u32	runtime_start;
+	__u32	runtime_size;
 } __attribute__((packed));
 
 struct sys_desc_table {
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index 5a6aa1c..742e256 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel/asm-offsets_32.c
@@ -146,4 +146,5 @@ void foo(void)
 	OFFSET(BP_loadflags, boot_params, hdr.loadflags);
 	OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch);
 	OFFSET(BP_version, boot_params, hdr.version);
+	OFFSET(BP_runtime_start, boot_params, hdr.runtime_start);
 }
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
index e72f062..5a29d50 100644
--- a/arch/x86/kernel/asm-offsets_64.c
+++ b/arch/x86/kernel/asm-offsets_64.c
@@ -125,6 +125,7 @@ int main(void)
 	OFFSET(BP_loadflags, boot_params, hdr.loadflags);
 	OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch);
 	OFFSET(BP_version, boot_params, hdr.version);
+	OFFSET(BP_runtime_start, boot_params, hdr.runtime_start);
 
 	BLANK();
 	DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jeremy Fitzhardinge, H. Peter Anvin, kexec, hbabu, ebiederm,
	ying.huang, mingo, sam, tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Make the (minimum) runtime address and the required amount of linear
address space available to the boot loader.  A relocating boot loader
can use this information to select a kernel location; furthermore, it
is permitted to modify the minimum runtime address field in order for
the boot loader to force a specific location for the kernel (as long
as it fits the alignment constraints.)

This means that the address space layout for the kernel compressor has
to be determined at compile time.  Since we have to do that, we might
as well reap the benefit and remove some runtime calculations in
assembly.

Note: bounding the amount of linear address space (not necessarily
bounding the amount of memory needed, but the amount that has to be
linearly contiguous before the memory map is consulted) was only
possible since Jeremy Fitzhardinge's brk support work.

[ Impact: new feature; simplication of compressed/head_*.S ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 arch/x86/boot/Makefile               |   24 ++++++---
 arch/x86/boot/compressed/Makefile    |   14 ++++--
 arch/x86/boot/compressed/head_32.S   |   54 ++++++-------------
 arch/x86/boot/compressed/head_64.S   |   52 +++++-------------
 arch/x86/boot/compressed/mkpiggy.c   |   97 ++++++++++++++++++++++++++++++++++
 arch/x86/boot/compressed/vmlinux.scr |   10 ----
 arch/x86/boot/header.S               |   19 +++++--
 arch/x86/include/asm/bootparam.h     |    2 +
 arch/x86/kernel/asm-offsets_32.c     |    1 +
 arch/x86/kernel/asm-offsets_64.c     |    1 +
 10 files changed, 173 insertions(+), 101 deletions(-)
 create mode 100644 arch/x86/boot/compressed/mkpiggy.c
 delete mode 100644 arch/x86/boot/compressed/vmlinux.scr

diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 6633b6e..3332d22 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
 
 SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
 
-sed-offsets := -e 's/^00*/0/' \
-        -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
+sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p'
 
-quiet_cmd_offsets = OFFSETS $@
-      cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
+quiet_cmd_voffset = VOFFSET $@
+      cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@
 
-$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
-	$(call if_changed,offsets)
+targets += voffset.h
+$(obj)/voffset.h: vmlinux FORCE
+	$(call if_changed,voffset)
+
+sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_ebss\|z_.*\)$$/\#define ZO_\2 0x\1/p'
+
+quiet_cmd_zoffset = ZOFFSET $@
+      cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
+
+targets += zoffset.h
+$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
+	$(call if_changed,zoffset)
 
-targets += offsets.h
 
 AFLAGS_header.o += -I$(obj)
-$(obj)/header.o: $(obj)/offsets.h
+$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
 
 LDFLAGS_setup.elf	:= -T
 $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index b35c3bb..6f4d7ba 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -4,7 +4,8 @@
 # create a compressed vmlinux image from the original vmlinux
 #
 
-targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
+targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
+	   vmlinux.bin.lzma head_$(BITS).o misc.o
 
 KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
@@ -19,6 +20,8 @@ KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
 LDFLAGS := -m elf_$(UTS_MACHINE)
 LDFLAGS_vmlinux := -T
 
+hostprogs-y	:= mkpiggy
+
 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
 	$(call if_changed,ld)
 	@:
@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
 suffix_$(CONFIG_KERNEL_BZIP2) = bz2
 suffix_$(CONFIG_KERNEL_LZMA)  = lzma
 
-LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
-	$(call if_changed,ld)
+quiet_cmd_mkpiggy = MKPIGGY $@
+      cmd_mkpiggy = $(obj)/mkpiggy $< > $@
+
+targets += piggy.S
+$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix_y) $(obj)/mkpiggy FORCE
+	$(call if_changed,mkpiggy)
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 511b0be..47636b3 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -64,7 +64,7 @@ ENTRY(startup_32)
  */
 
 #ifdef CONFIG_RELOCATABLE
-	movl $LOAD_PHYSICAL_ADDR, %eax
+	movl BP_runtime_start(%esi), %eax
 	movl %ebp, %ebx
 	cmpl %ebx, %eax
 	jbe 1f
@@ -75,26 +75,13 @@ ENTRY(startup_32)
 #else
 	movl $LOAD_PHYSICAL_ADDR, %ebx
 #endif
-	movl %ebx, %edi		/* Save kernel target address */
-
-	/* Replace the compressed data size with the uncompressed size */
-	subl input_len(%ebp), %ebx
-	movl output_len(%ebp), %eax
-	addl %eax, %ebx
-	/* Add 8 bytes for every 32K input block */
-	shrl $12, %eax
-	addl %eax, %ebx
-	/* Add 32K + 18 bytes of extra slack */
-	addl $(32768 + 18), %ebx
-	/* Align on a 4K boundary */
-	addl $4095, %ebx
-	andl $~4095, %ebx
+	/* Target address to relocate to for decompression */
+	addl $z_extract_offset, %ebx
 
 /*
  * Set up the stack
  */
 	leal boot_stack_end(%ebx), %esp
-	pushl %edi		/* Saved kernel target address */
 
 /*
  * Copy the compressed kernel to the end of our buffer
@@ -111,11 +98,6 @@ ENTRY(startup_32)
 	popl %esi
 
 /*
- * %ebp -> kernel target address
- */
-	popl %ebp
-
-/*
  * Jump to the relocated address.
  */
 	leal relocated(%ebx), %eax
@@ -138,29 +120,27 @@ relocated:
 /*
  * Do the decompression, and jump to the new kernel..
  */
-	movl output_len(%ebx), %eax
-	pushl %eax
-			# push arguments for decompress_kernel:
-	pushl %ebp	# output address
-	movl input_len(%ebx), %eax
-	pushl %eax	# input_len
+	leal z_extract_offset_negative(%ebx), %ebp
+	pushl %ebp		# output address
+	pushl $z_input_len	# input_len
 	leal input_data(%ebx), %eax
-	pushl %eax	# input_data
+	pushl %eax		# input_data
 	leal boot_heap(%ebx), %eax
-	pushl %eax	# heap area
-	pushl %esi	# real mode pointer
+	pushl %eax		# heap area
+	pushl %esi		# real mode pointer
 	call decompress_kernel
 	addl $20, %esp
-	popl %ecx
 
-#if CONFIG_RELOCATABLE
-/* Find the address of the relocations.
+#ifdef CONFIG_RELOCATABLE
+/*
+ * Find the address of the relocations.
  */
-	movl %ebp, %edi
-	addl %ecx, %edi
+	leal z_output_len(%ebp), %edi
 
-/* Calculate the delta between where vmlinux was compiled to run
- * and where it was actually loaded.
+/*
+ * Calculate the delta between where vmlinux was compiled to run
+ * and where it was actually loaded.  Use the compile-time
+ * LOAD_PHYSICAL_ADDR here, not boot_param.runtime_start.
  */
 	movl %ebp, %ebx
 	subl $LOAD_PHYSICAL_ADDR, %ebx
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 191b0d3..2678fdf 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -72,7 +72,7 @@ ENTRY(startup_32)
  * for safe in-place decompression.
  */
 #ifdef CONFIG_RELOCATABLE
-	movl	$LOAD_PHYSICAL_ADDR, %eax
+	movl	BP_runtime_start(%esi), %eax
 	movl	%ebp, %ebx
 	addl	$(LOAD_PHYSICAL_ALIGN - 1), %ebx
 	andl	$~(LOAD_PHYSICAL_ALIGN - 1), %ebx
@@ -83,17 +83,8 @@ ENTRY(startup_32)
 #else
 	movl	$LOAD_PHYSICAL_ADDR, %ebx
 #endif
-
-	/* Replace the compressed data size with the uncompressed size */
-	subl	input_len(%ebp), %ebx
-	movl	output_len(%ebp), %eax
-	addl	%eax, %ebx
-	/* Add 8 bytes for every 32K input block */
-	shrl	$12, %eax
-	addl	%eax, %ebx
-	/* Add 32K + 18 bytes of extra slack and align on a 4K boundary */
-	addl	$(32768 + 18 + 4095), %ebx
-	andl	$~4095, %ebx
+	/* Target address to relocate to for decompression */
+	addl	$z_extract_offset, %ebx
 
 /*
  * Prepare for entering 64 bit mode
@@ -207,19 +198,17 @@ ENTRY(startup_64)
 	movl    $0x20, %eax
 	ltr	%ax
 
-	/* Compute the decompressed kernel start address.  It is where
-	 * we were loaded at aligned to a 2M boundary. %rbp contains the
-	 * decompressed kernel start address.
+	/*
+	 * Kernel load address and relocation information... note that
+	 * we can't rely on the calculation in 32-bit mode since we might
+	 * have come here via the 64-bit entrypoint.
 	 *
-	 * If it is a relocatable kernel then decompress and run the kernel
-	 * from load address aligned to 2MB addr, otherwise decompress and
-	 * run the kernel from LOAD_PHYSICAL_ADDR
+	 * At the end of this, %rbp points to the decompressed kernel
+	 * load address, and %rbx to where we need to relocate ourselves to.
 	 */
-
-	/* Start with the delta to where the kernel will run at. */
 #ifdef CONFIG_RELOCATABLE
 	leaq	startup_32(%rip) /* - $startup_32 */, %rbp
-	movq	$LOAD_PHYSICAL_ADDR, %rax
+	movl	BP_runtime_start(%rsi), %eax
 	addq	$(LOAD_PHYSICAL_ALIGN - 1), %rbp
 	andq	$~(LOAD_PHYSICAL_ALIGN - 1), %rbp
 	cmpq	%rbp, %rax
@@ -227,21 +216,9 @@ ENTRY(startup_64)
 	movq	%rax, %rbp
 1:
 #else
-	movq	$LOAD_PHYSICAL_ADDR, %rbp
+	movl	$LOAD_PHYSICAL_ADDR, %ebp
 #endif
-	movq	%rbp, %rbx
-
-	/* Replace the compressed data size with the uncompressed size */
-	movl	input_len(%rip), %eax
-	subq	%rax, %rbx
-	movl	output_len(%rip), %eax
-	addq	%rax, %rbx
-	/* Add 8 bytes for every 32K input block */
-	shrq	$12, %rax
-	addq	%rax, %rbx
-	/* Add 32K + 18 bytes of extra slack and align on a 4K boundary */
-	addq	$(32768 + 18 + 4095), %rbx
-	andq	$~4095, %rbx
+	leaq	z_extract_offset(%rbp), %rbx
 
 /* Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
@@ -290,9 +267,8 @@ relocated:
 	movq	%rsi, %rdi		# real mode address
 	leaq	boot_heap(%rip), %rsi	# malloc area for uncompression
 	leaq	input_data(%rip), %rdx  # input_data
-	movl	input_len(%rip), %eax
-	movq	%rax, %rcx		# input_len
-	movq	%rbp, %r8		# output
+	movl	$z_input_len, %ecx	# input_len
+	movq	%rbp, %r8		# output target address
 	call	decompress_kernel
 	popq	%rsi
 
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
new file mode 100644
index 0000000..bcbd36c
--- /dev/null
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -0,0 +1,97 @@
+/* ----------------------------------------------------------------------- *
+ *
+ *  Copyright (C) 2009 Intel Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License version
+ *  2 as published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ *  02110-1301, USA.
+ *
+ *  H. Peter Anvin <hpa@linux.intel.com>
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * Compute the desired load offset from a compressed program; outputs
+ * a small assembly wrapper with the appropriate symbols defined.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+
+static uint32_t getle32(const void *p)
+{
+	const uint8_t *cp = p;
+
+	return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
+		((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
+}
+
+int main(int argc, char *argv[])
+{
+	uint32_t olen;
+	long ilen;
+	unsigned long offs;
+	FILE *f;
+
+	if (argc < 2) {
+		fprintf(stderr, "Usage: %s compressed_file\n", argv[0]);
+		return 1;
+	}
+
+	/* Get the information for the compressed kernel image first */
+
+	f = fopen(argv[1], "r");
+	if (!f) {
+		perror(argv[1]);
+		return 1;
+	}
+
+
+	if (fseek(f, -4L, SEEK_END)) {
+		perror(argv[1]);
+	}
+	fread(&olen, sizeof olen, 1, f);
+	ilen = ftell(f);
+	olen = getle32(&olen);
+	fclose(f);
+
+	/*
+	 * Now we have the input (compressed) and output (uncompressed)
+	 * sizes, compute the necessary decompression offset...
+	 */
+
+	offs = (olen > ilen) ? olen - ilen : 0;
+	offs += olen >> 12;	/* Add 8 bytes for each 32K block */
+	offs += 32*1024 + 18;	/* Add 32K + 18 bytes slack */
+	offs = (offs+4095) & ~4095; /* Round to a 4K boundary */
+
+	printf(".section \".rodata.compressed\",\"a\",@progbits\n");
+	printf(".globl z_input_len\n");
+	printf("z_input_len = %lu\n", ilen);
+	printf(".globl z_output_len\n");
+	printf("z_output_len = %lu\n", (unsigned long)olen);
+	printf(".globl z_extract_offset\n");
+	printf("z_extract_offset = 0x%lx\n", offs);
+	/* z_extract_offset_negative allows simplification of head_32.S */
+	printf(".globl z_extract_offset_negative\n");
+	printf("z_extract_offset_negative = -0x%lx\n", offs);
+
+	printf(".globl input_data, input_data_end\n");
+	printf("input_data:\n");
+	printf(".incbin \"%s\"\n", argv[1]);
+	printf("input_data_end:\n");
+
+	return 0;
+}
diff --git a/arch/x86/boot/compressed/vmlinux.scr b/arch/x86/boot/compressed/vmlinux.scr
deleted file mode 100644
index f02382a..0000000
--- a/arch/x86/boot/compressed/vmlinux.scr
+++ /dev/null
@@ -1,10 +0,0 @@
-SECTIONS
-{
-  .rodata.compressed : {
-	input_len = .;
-	LONG(input_data_end - input_data) input_data = .;
-	*(.data)
-	output_len = . - 4;
-	input_data_end = .;
-	}
-}
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index cfd3bc4..0491fc4 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -22,7 +22,8 @@
 #include <asm/page_types.h>
 #include <asm/setup.h>
 #include "boot.h"
-#include "offsets.h"
+#include "voffset.h"
+#include "zoffset.h"
 
 BOOTSEG		= 0x07C0		/* original address of boot-sector */
 SYSSEG		= 0x1000		/* historical load address >> 4 */
@@ -115,7 +116,7 @@ _start:
 	# Part 2 of the header, from the old setup.S
 
 		.ascii	"HdrS"		# header signature
-		.word	0x0209		# header version number (>= 0x0105)
+		.word	0x020a		# header version number (>= 0x0105)
 					# or else old loadlin-1.5 will fail)
 		.globl realmode_swtch
 realmode_swtch:	.word	0, 0		# default_switch, SETUPSEG
@@ -212,13 +213,23 @@ hardware_subarch:	.long 0			# subarchitecture, added with 2.07
 
 hardware_subarch_data:	.quad 0
 
-payload_offset:		.long input_data
-payload_length:		.long input_data_end-input_data
+payload_offset:		.long ZO_input_data
+payload_length:		.long ZO_z_input_len
 
 setup_data:		.quad 0			# 64-bit physical pointer to
 						# single linked list of
 						# struct setup_data
 
+runtime_start:		.long LOAD_PHYSICAL_ADDR
+#define ZO_RUNTIME_SIZE	(ZO__ebss+ZO_z_expand_offset)
+#define VO_RUNTIME_SIZE	(VO__end-VO__text)
+#if VO_RUNTIME_SIZE > ZO_RUNTIME_SIZE
+#define RUNTIME_SIZE	VO_RUNTIME_SIZE
+#else
+#define RUNTIME_SIZE	ZO_RUNTIME_SIZE
+#endif
+runtime_size:		.long RUNTIME_SIZE	# Minimum contiguous memory
+
 # End of setup header #####################################################
 
 	.section ".inittext", "ax"
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h
index 433adae..dd924b5 100644
--- a/arch/x86/include/asm/bootparam.h
+++ b/arch/x86/include/asm/bootparam.h
@@ -62,6 +62,8 @@ struct setup_header {
 	__u32	payload_offset;
 	__u32	payload_length;
 	__u64	setup_data;
+	__u32	runtime_start;
+	__u32	runtime_size;
 } __attribute__((packed));
 
 struct sys_desc_table {
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index 5a6aa1c..742e256 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel/asm-offsets_32.c
@@ -146,4 +146,5 @@ void foo(void)
 	OFFSET(BP_loadflags, boot_params, hdr.loadflags);
 	OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch);
 	OFFSET(BP_version, boot_params, hdr.version);
+	OFFSET(BP_runtime_start, boot_params, hdr.runtime_start);
 }
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
index e72f062..5a29d50 100644
--- a/arch/x86/kernel/asm-offsets_64.c
+++ b/arch/x86/kernel/asm-offsets_64.c
@@ -125,6 +125,7 @@ int main(void)
 	OFFSET(BP_loadflags, boot_params, hdr.loadflags);
 	OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch);
 	OFFSET(BP_version, boot_params, hdr.version);
+	OFFSET(BP_runtime_start, boot_params, hdr.runtime_start);
 
 	BLANK();
 	DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 10/14] x86, doc: document the runtime_start and runtime_size bzImage fields
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Add documentation for the runtime_start and runtime_size fields;
bzImage protocol version 2.10 (0x020a).

[ Impact: documentation only ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 Documentation/x86/boot.txt |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index e020366..093f838 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -50,6 +50,10 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
 Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
 		pointer to single linked list of struct	setup_data.
 
+Protocol 2.10:	(Kernel 2.6.31) Added the runtime_start and
+		runtime_size fields for the post-decompression address
+		and memory requirements of the kernel.
+
 **** MEMORY LAYOUT
 
 The traditional memory map for the kernel loader, used for Image or
@@ -182,6 +186,8 @@ Offset	Proto	Name		Meaning
 024C/4	2.08+	payload_length	Length of kernel payload
 0250/8	2.09+	setup_data	64-bit physical pointer to linked list
 				of struct setup_data
+0258/4	2.10+	runtime_start	(Minimum) post-decompression address
+025C/4	2.10+	runtime_size	Minimum linear memory required
 
 (1) For backwards compatibility, if the setup_sects field contains 0, the
     real value is 4.
@@ -582,6 +588,41 @@ Protocol:	2.09+
   sure to consider the case where the linked list already contains
   entries.
 
+Field name:	runtime_start
+Type:		modify (optional, reloc)
+Offset/size:	0x258/4
+Protocol:	2.10+
+
+  For a non-relocatable kernel, this is a readonly field indicating
+  the post-decompression address of the kernel.  This will typically
+  be larger than the load address (0x100000).
+
+  For a relocatable kernel, this is a read-write field indicating the
+  *minimum* post-decompression address of the kernel.  This allows
+  unchanged behavior when a non-relocating bootloader is used.  If
+  this value is greater than the load address, this value is used; if
+  this value is smaller than the load address, the load address is
+  rounded up to the nearest multiple of the kernel_alignment field and
+  this field is ignored.
+
+  A relocating bootloader can override this field, e.g. by setting it
+  to zero, to force the load address to control the runtime address of
+  the kernel.
+
+Field name:	runtime_size
+Type:		read
+Offset/size:	0x25C/4
+Protocol:	2.10+
+
+  This field informs the boot loader of the amount of linearly
+  contiguous memory starting at the kernel decompression address (as
+  given by the appropriate combination of the load address,
+  runtime_start, and kernel_alignment) that the kernel will require
+  before it becomes aware of the memory map.  It does *not* guarantee
+  a successful boot with only this memory, but it may be a useful
+  guideline for a relocating bootloader when it comes to selecting an
+  address to load the kernel.
+
 
 **** THE IMAGE CHECKSUM
 
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 10/14] x86, doc: document the runtime_start and runtime_size bzImage fields
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Add documentation for the runtime_start and runtime_size fields;
bzImage protocol version 2.10 (0x020a).

[ Impact: documentation only ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 Documentation/x86/boot.txt |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index e020366..093f838 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -50,6 +50,10 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
 Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
 		pointer to single linked list of struct	setup_data.
 
+Protocol 2.10:	(Kernel 2.6.31) Added the runtime_start and
+		runtime_size fields for the post-decompression address
+		and memory requirements of the kernel.
+
 **** MEMORY LAYOUT
 
 The traditional memory map for the kernel loader, used for Image or
@@ -182,6 +186,8 @@ Offset	Proto	Name		Meaning
 024C/4	2.08+	payload_length	Length of kernel payload
 0250/8	2.09+	setup_data	64-bit physical pointer to linked list
 				of struct setup_data
+0258/4	2.10+	runtime_start	(Minimum) post-decompression address
+025C/4	2.10+	runtime_size	Minimum linear memory required
 
 (1) For backwards compatibility, if the setup_sects field contains 0, the
     real value is 4.
@@ -582,6 +588,41 @@ Protocol:	2.09+
   sure to consider the case where the linked list already contains
   entries.
 
+Field name:	runtime_start
+Type:		modify (optional, reloc)
+Offset/size:	0x258/4
+Protocol:	2.10+
+
+  For a non-relocatable kernel, this is a readonly field indicating
+  the post-decompression address of the kernel.  This will typically
+  be larger than the load address (0x100000).
+
+  For a relocatable kernel, this is a read-write field indicating the
+  *minimum* post-decompression address of the kernel.  This allows
+  unchanged behavior when a non-relocating bootloader is used.  If
+  this value is greater than the load address, this value is used; if
+  this value is smaller than the load address, the load address is
+  rounded up to the nearest multiple of the kernel_alignment field and
+  this field is ignored.
+
+  A relocating bootloader can override this field, e.g. by setting it
+  to zero, to force the load address to control the runtime address of
+  the kernel.
+
+Field name:	runtime_size
+Type:		read
+Offset/size:	0x25C/4
+Protocol:	2.10+
+
+  This field informs the boot loader of the amount of linearly
+  contiguous memory starting at the kernel decompression address (as
+  given by the appropriate combination of the load address,
+  runtime_start, and kernel_alignment) that the kernel will require
+  before it becomes aware of the memory map.  It does *not* guarantee
+  a successful boot with only this memory, but it may be a useful
+  guideline for a relocating bootloader when it comes to selecting an
+  address to load the kernel.
+
 
 **** THE IMAGE CHECKSUM
 
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 11/14] x86, boot: use rep movsq to move kernel on 64 bits
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:26   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

rep movsq is the architecturally preferred way to move a block of
data.  It isn't the fastest way on all existing CPUs, but it it likely
to be in the future, and perhaps more importantly, we should encourage
the architecturally right thing to do.

This means saving and restoring %rsi around the copy code, which is
easily done by setting up the stack early.  However, we should not
copy .bss (which we are about to zero anyway); we should only copy up
to the *beginning* of .bss (just as on 32 bits.)

This also makes the code quite a bit more similar between 32 and 64 bits.

[ Impact: trivial optimization ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_64.S |   41 ++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 2678fdf..8bc8ed8 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -220,18 +220,30 @@ ENTRY(startup_64)
 #endif
 	leaq	z_extract_offset(%rbp), %rbx
 
-/* Copy the compressed kernel to the end of our buffer
+/*
+ * Set up the stack
+ */
+	leaq boot_stack_end(%rbx), %rsp
+
+/*
+ * Zero EFLAGS after setting rsp
+ */
+	pushq	$0
+	popfq
+
+/*
+ * Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
  */
-	leaq	_end_before_pgt(%rip), %r8
-	leaq	_end_before_pgt(%rbx), %r9
-	movq	$_end_before_pgt /* - $startup_32 */, %rcx
-1:	subq	$8, %r8
-	subq	$8, %r9
-	movq	0(%r8), %rax
-	movq	%rax, 0(%r9)
-	subq	$8, %rcx
-	jnz	1b
+	pushq	%rsi		/* Kernel structure pointer */
+	leaq	(_bss-8)(%rip), %rsi
+	leaq	(_bss-8)(%rbx), %rdi
+	movq	$_bss /* - $startup_32 */, %rcx
+	shrq	$3, %rcx
+	std
+	rep	movsq
+	cld
+	popq	%rsi
 
 /*
  * Jump to the relocated address.
@@ -243,7 +255,7 @@ ENTRY(startup_64)
 relocated:
 
 /*
- * Clear BSS
+ * Clear BSS (stack is empty at this point)
  */
 	xorl	%eax, %eax
 	leaq    _edata(%rip), %rdi
@@ -253,13 +265,6 @@ relocated:
 	cld
 	rep	stosq
 
-	/* Setup the stack */
-	leaq	boot_stack_end(%rip), %rsp
-
-	/* zero EFLAGS after setting rsp */
-	pushq	$0
-	popfq
-
 /*
  * Do the decompression, and jump to the new kernel..
  */
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 11/14] x86, boot: use rep movsq to move kernel on 64 bits
@ 2009-05-07 22:26   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

rep movsq is the architecturally preferred way to move a block of
data.  It isn't the fastest way on all existing CPUs, but it it likely
to be in the future, and perhaps more importantly, we should encourage
the architecturally right thing to do.

This means saving and restoring %rsi around the copy code, which is
easily done by setting up the stack early.  However, we should not
copy .bss (which we are about to zero anyway); we should only copy up
to the *beginning* of .bss (just as on 32 bits.)

This also makes the code quite a bit more similar between 32 and 64 bits.

[ Impact: trivial optimization ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_64.S |   41 ++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 2678fdf..8bc8ed8 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -220,18 +220,30 @@ ENTRY(startup_64)
 #endif
 	leaq	z_extract_offset(%rbp), %rbx
 
-/* Copy the compressed kernel to the end of our buffer
+/*
+ * Set up the stack
+ */
+	leaq boot_stack_end(%rbx), %rsp
+
+/*
+ * Zero EFLAGS after setting rsp
+ */
+	pushq	$0
+	popfq
+
+/*
+ * Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
  */
-	leaq	_end_before_pgt(%rip), %r8
-	leaq	_end_before_pgt(%rbx), %r9
-	movq	$_end_before_pgt /* - $startup_32 */, %rcx
-1:	subq	$8, %r8
-	subq	$8, %r9
-	movq	0(%r8), %rax
-	movq	%rax, 0(%r9)
-	subq	$8, %rcx
-	jnz	1b
+	pushq	%rsi		/* Kernel structure pointer */
+	leaq	(_bss-8)(%rip), %rsi
+	leaq	(_bss-8)(%rbx), %rdi
+	movq	$_bss /* - $startup_32 */, %rcx
+	shrq	$3, %rcx
+	std
+	rep	movsq
+	cld
+	popq	%rsi
 
 /*
  * Jump to the relocated address.
@@ -243,7 +255,7 @@ ENTRY(startup_64)
 relocated:
 
 /*
- * Clear BSS
+ * Clear BSS (stack is empty at this point)
  */
 	xorl	%eax, %eax
 	leaq    _edata(%rip), %rdi
@@ -253,13 +265,6 @@ relocated:
 	cld
 	rep	stosq
 
-	/* Setup the stack */
-	leaq	boot_stack_end(%rip), %rsp
-
-	/* zero EFLAGS after setting rsp */
-	pushq	$0
-	popfq
-
 /*
  * Do the decompression, and jump to the new kernel..
  */
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 12/14] x86, boot: zero EFLAGS on 32 bits
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:27   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

The 64-bit code already clears EFLAGS as soon as it has a stack.  This
seems like a reasonable precaution, so do it on 32 bits as well.

[ Impact: extra paranoia ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 47636b3..48c2047 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -12,9 +12,9 @@
  * the page directory. [According to comments etc elsewhere on a compressed
  * kernel it will end up at 0x1000 + 1Mb I hope so as I assume this. - AC]
  *
- * Page 0 is deliberately kept safe, since System Management Mode code in 
+ * Page 0 is deliberately kept safe, since System Management Mode code in
  * laptops may need to access the BIOS data stored there.  This is also
- * useful for future device drivers that either access the BIOS via VM86 
+ * useful for future device drivers that either access the BIOS via VM86
  * mode.
  */
 
@@ -84,6 +84,12 @@ ENTRY(startup_32)
 	leal boot_stack_end(%ebx), %esp
 
 /*
+ * Zero EFLAGS
+ */
+	pushl $0
+	popfl
+
+/*
  * Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
  */
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 12/14] x86, boot: zero EFLAGS on 32 bits
@ 2009-05-07 22:27   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

The 64-bit code already clears EFLAGS as soon as it has a stack.  This
seems like a reasonable precaution, so do it on 32 bits as well.

[ Impact: extra paranoia ]

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/compressed/head_32.S |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 47636b3..48c2047 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -12,9 +12,9 @@
  * the page directory. [According to comments etc elsewhere on a compressed
  * kernel it will end up at 0x1000 + 1Mb I hope so as I assume this. - AC]
  *
- * Page 0 is deliberately kept safe, since System Management Mode code in 
+ * Page 0 is deliberately kept safe, since System Management Mode code in
  * laptops may need to access the BIOS data stored there.  This is also
- * useful for future device drivers that either access the BIOS via VM86 
+ * useful for future device drivers that either access the BIOS via VM86
  * mode.
  */
 
@@ -84,6 +84,12 @@ ENTRY(startup_32)
 	leal boot_stack_end(%ebx), %esp
 
 /*
+ * Zero EFLAGS
+ */
+	pushl $0
+	popfl
+
+/*
  * Copy the compressed kernel to the end of our buffer
  * where decompression in place becomes safe.
  */
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 13/14] x86: make CONFIG_RELOCATABLE the default
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:27   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Remove the EXPERIMENTAL tag from CONFIG_RELOCATABLE and make it the
default.  Relocatable kernels have been used for a while now, and
should now have identical semantics to non-relocatable kernels when
loaded by a non-relocating bootloader.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index cd76de1..d3c8b0d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1500,8 +1500,8 @@ config PHYSICAL_START
 	  Don't change this unless you know what you are doing.
 
 config RELOCATABLE
-	bool "Build a relocatable kernel (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
+	bool "Build a relocatable kernel"
+	default y
 	---help---
 	  This builds a kernel image that retains relocation information
 	  so it can be loaded someplace besides the default 1MB.
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 13/14] x86: make CONFIG_RELOCATABLE the default
@ 2009-05-07 22:27   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Remove the EXPERIMENTAL tag from CONFIG_RELOCATABLE and make it the
default.  Relocatable kernels have been used for a while now, and
should now have identical semantics to non-relocatable kernels when
loaded by a non-relocating bootloader.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index cd76de1..d3c8b0d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1500,8 +1500,8 @@ config PHYSICAL_START
 	  Don't change this unless you know what you are doing.
 
 config RELOCATABLE
-	bool "Build a relocatable kernel (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
+	bool "Build a relocatable kernel"
+	default y
 	---help---
 	  This builds a kernel image that retains relocation information
 	  so it can be loaded someplace besides the default 1MB.
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 14/14] x86, defconfig: update defconfigs to relocatable
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-07 22:27   ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: vgoyal, hbabu, kexec, ying.huang, mingo, tglx, ebiederm, sam,
	H. Peter Anvin

From: H. Peter Anvin <hpa@zytor.com>

Update the defconfigs, in particular to make CONFIG_RELOCATABLE
default on, and adjust CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN
to the current default values.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/configs/i386_defconfig   |  148 ++++++++++++++++++++++++++++---------
 arch/x86/configs/x86_64_defconfig |  148 ++++++++++++++++++++++++++++---------
 2 files changed, 226 insertions(+), 70 deletions(-)

diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 235b81d..3773a73 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -1,12 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc4
-# Tue Feb 24 15:50:58 2009
+# Linux kernel version: 2.6.30-rc2
+# Thu May  7 14:22:04 2009
 #
 # CONFIG_64BIT is not set
 CONFIG_X86_32=y
 # CONFIG_X86_64 is not set
 CONFIG_X86=y
+CONFIG_OUTPUT_FORMAT="elf32-i386"
 CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CMOS_UPDATE=y
@@ -33,6 +34,7 @@ CONFIG_ARCH_HAS_CPU_RELAX=y
 CONFIG_ARCH_HAS_DEFAULT_IDLE=y
 CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
 CONFIG_HAVE_SETUP_PER_CPU_AREA=y
+CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
 # CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -40,15 +42,16 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_POPULATES_NODE_MAP=y
 # CONFIG_AUDIT_ARCH is not set
 CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
 CONFIG_USE_GENERIC_SMP_HELPERS=y
 CONFIG_X86_32_SMP=y
 CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
+CONFIG_X86_32_LAZY_GS=y
 CONFIG_KTIME_SCALAR=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -60,10 +63,17 @@ CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_BZIP2 is not set
+# CONFIG_KERNEL_LZMA is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
@@ -113,23 +123,26 @@ CONFIG_PID_NS=y
 CONFIG_NET_NS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 # CONFIG_EMBEDDED is not set
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_EXTRA_PASS=y
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_PCSPKR_PLATFORM=y
-# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
@@ -139,6 +152,7 @@ CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
+# CONFIG_COMPAT_BRK is not set
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
@@ -154,6 +168,8 @@ CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+# CONFIG_SLOW_WORK is not set
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -167,7 +183,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_STOP_MACHINE=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
-CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_BLK_DEV_BSG=y
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -194,12 +209,12 @@ CONFIG_HIGH_RES_TIMERS=y
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_SMP=y
 CONFIG_SPARSE_IRQ=y
-CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
+# CONFIG_X86_BIGSMP is not set
+CONFIG_X86_EXTENDED_PLATFORM=y
 # CONFIG_X86_ELAN is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_VSMP is not set
 # CONFIG_X86_RDC321X is not set
+# CONFIG_X86_32_NON_STANDARD is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_PARAVIRT_GUEST is not set
 # CONFIG_MEMTEST is not set
@@ -230,8 +245,10 @@ CONFIG_M686=y
 # CONFIG_GENERIC_CPU is not set
 CONFIG_X86_GENERIC=y
 CONFIG_X86_CPU=y
+CONFIG_X86_L1_CACHE_BYTES=64
+CONFIG_X86_INTERNODE_CACHE_BYTES=64
 CONFIG_X86_CMPXCHG=y
-CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_L1_CACHE_SHIFT=5
 CONFIG_X86_XADD=y
 # CONFIG_X86_PPRO_FENCE is not set
 CONFIG_X86_WP_WORKS_OK=y
@@ -247,7 +264,7 @@ CONFIG_X86_DEBUGCTLMSR=y
 CONFIG_CPU_SUP_INTEL=y
 CONFIG_CPU_SUP_CYRIX_32=y
 CONFIG_CPU_SUP_AMD=y
-CONFIG_CPU_SUP_CENTAUR_32=y
+CONFIG_CPU_SUP_CENTAUR=y
 CONFIG_CPU_SUP_TRANSMETA_32=y
 CONFIG_CPU_SUP_UMC_32=y
 CONFIG_X86_DS=y
@@ -279,6 +296,7 @@ CONFIG_MICROCODE_AMD=y
 CONFIG_MICROCODE_OLD_INTERFACE=y
 CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
+# CONFIG_X86_CPU_DEBUG is not set
 # CONFIG_NOHIGHMEM is not set
 CONFIG_HIGHMEM4G=y
 # CONFIG_HIGHMEM64G is not set
@@ -302,6 +320,8 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
 CONFIG_HIGHPTE=y
 CONFIG_X86_CHECK_BIOS_CORRUPTION=y
 CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
@@ -312,6 +332,7 @@ CONFIG_MTRR=y
 CONFIG_X86_PAT=y
 CONFIG_EFI=y
 CONFIG_SECCOMP=y
+# CONFIG_CC_STACKPROTECTOR is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
 # CONFIG_HZ_300 is not set
@@ -322,8 +343,9 @@ CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
 # CONFIG_KEXEC_JUMP is not set
 CONFIG_PHYSICAL_START=0x1000000
-# CONFIG_RELOCATABLE is not set
-CONFIG_PHYSICAL_ALIGN=0x200000
+CONFIG_RELOCATABLE=y
+CONFIG_X86_NEED_RELOCS=y
+CONFIG_PHYSICAL_ALIGN=0x400000
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_COMPAT_VDSO is not set
 # CONFIG_CMDLINE_BOOL is not set
@@ -363,7 +385,6 @@ CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 # CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_SYSTEM=y
 CONFIG_X86_PM_TIMER=y
 CONFIG_ACPI_CONTAINER=y
 # CONFIG_ACPI_SBS is not set
@@ -425,6 +446,7 @@ CONFIG_PCI_BIOS=y
 CONFIG_PCI_DIRECT=y
 CONFIG_PCI_MMCONFIG=y
 CONFIG_PCI_DOMAINS=y
+# CONFIG_DMAR is not set
 CONFIG_PCIEPORTBUS=y
 # CONFIG_HOTPLUG_PCI_PCIE is not set
 CONFIG_PCIEAER=y
@@ -435,6 +457,7 @@ CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCI_STUB is not set
 CONFIG_HT_IRQ=y
+# CONFIG_PCI_IOV is not set
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -481,7 +504,6 @@ CONFIG_NET=y
 #
 # Networking options
 #
-CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -639,6 +661,7 @@ CONFIG_LLC=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
 CONFIG_NET_SCHED=y
 
 #
@@ -696,6 +719,7 @@ CONFIG_NET_SCH_FIFO=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_NET_TCPPROBE is not set
+# CONFIG_NET_DROP_MONITOR is not set
 CONFIG_HAMRADIO=y
 
 #
@@ -706,12 +730,10 @@ CONFIG_HAMRADIO=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-# CONFIG_PHONET is not set
 CONFIG_FIB_RULES=y
 CONFIG_WIRELESS=y
 CONFIG_CFG80211=y
 # CONFIG_CFG80211_REG_DEBUG is not set
-CONFIG_NL80211=y
 CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
 CONFIG_WIRELESS_EXT_SYSFS=y
@@ -789,6 +811,7 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
 # CONFIG_HP_ILO is not set
+# CONFIG_ISL29003 is not set
 # CONFIG_C2PORT is not set
 
 #
@@ -842,6 +865,7 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_LOWLEVEL is not set
 # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
 # CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -940,6 +964,7 @@ CONFIG_DM_ZERO=y
 CONFIG_MACINTOSH_DRIVERS=y
 CONFIG_MAC_EMUMOUSEBTN=y
 CONFIG_NETDEVICES=y
+CONFIG_COMPAT_NET_DEV_OPS=y
 # CONFIG_IFB is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -977,6 +1002,8 @@ CONFIG_MII=y
 CONFIG_NET_VENDOR_3COM=y
 # CONFIG_VORTEX is not set
 # CONFIG_TYPHOON is not set
+# CONFIG_ETHOC is not set
+# CONFIG_DNET is not set
 CONFIG_NET_TULIP=y
 # CONFIG_DE2104X is not set
 # CONFIG_TULIP is not set
@@ -1026,6 +1053,7 @@ CONFIG_E1000=y
 CONFIG_E1000E=y
 # CONFIG_IP1000 is not set
 # CONFIG_IGB is not set
+# CONFIG_IGBVF is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1040,6 +1068,7 @@ CONFIG_BNX2=y
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1E is not set
+# CONFIG_ATL1C is not set
 # CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
@@ -1049,6 +1078,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_VXGE is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
 # CONFIG_NIU is not set
@@ -1058,6 +1088,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_BNX2X is not set
 # CONFIG_QLGE is not set
 # CONFIG_SFC is not set
+# CONFIG_BE2NET is not set
 CONFIG_TR=y
 # CONFIG_IBMOL is not set
 # CONFIG_IBMLS is not set
@@ -1073,8 +1104,8 @@ CONFIG_WLAN_80211=y
 # CONFIG_LIBERTAS is not set
 # CONFIG_LIBERTAS_THINFIRM is not set
 # CONFIG_AIRO is not set
-# CONFIG_HERMES is not set
 # CONFIG_ATMEL is not set
+# CONFIG_AT76C50X_USB is not set
 # CONFIG_AIRO_CS is not set
 # CONFIG_PCMCIA_WL3501 is not set
 # CONFIG_PRISM54 is not set
@@ -1084,21 +1115,21 @@ CONFIG_WLAN_80211=y
 # CONFIG_RTL8187 is not set
 # CONFIG_ADM8211 is not set
 # CONFIG_MAC80211_HWSIM is not set
+# CONFIG_MWL8K is not set
 # CONFIG_P54_COMMON is not set
 CONFIG_ATH5K=y
 # CONFIG_ATH5K_DEBUG is not set
 # CONFIG_ATH9K is not set
+# CONFIG_AR9170_USB is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2200 is not set
-# CONFIG_IWLCORE is not set
-# CONFIG_IWLWIFI_LEDS is not set
-# CONFIG_IWLAGN is not set
-# CONFIG_IWL3945 is not set
+# CONFIG_IWLWIFI is not set
 # CONFIG_HOSTAP is not set
 # CONFIG_B43 is not set
 # CONFIG_B43LEGACY is not set
 # CONFIG_ZD1211RW is not set
 # CONFIG_RT2X00 is not set
+# CONFIG_HERMES is not set
 
 #
 # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -1209,6 +1240,8 @@ CONFIG_INPUT_TABLET=y
 # CONFIG_TABLET_USB_KBTAB is not set
 # CONFIG_TABLET_USB_WACOM is not set
 CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
@@ -1303,6 +1336,7 @@ CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_IPMI_HANDLER is not set
 CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
 CONFIG_HW_RANDOM_INTEL=y
 CONFIG_HW_RANDOM_AMD=y
 CONFIG_HW_RANDOM_GEODE=y
@@ -1390,7 +1424,6 @@ CONFIG_I2C_I801=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
@@ -1424,6 +1457,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADT7475 is not set
 # CONFIG_SENSORS_K8TEMP is not set
 # CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATK0110 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_I5K_AMB is not set
@@ -1433,6 +1467,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_FSCHER is not set
 # CONFIG_SENSORS_FSCPOS is not set
 # CONFIG_SENSORS_FSCHMD is not set
+# CONFIG_SENSORS_G760A is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_CORETEMP is not set
@@ -1448,11 +1483,14 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
 # CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_MAX6650 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_DME1737 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
@@ -1643,7 +1681,6 @@ CONFIG_FB_EFI=y
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_VT8623 is not set
-# CONFIG_FB_CYBLA is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_ARK is not set
 # CONFIG_FB_PM3 is not set
@@ -1652,6 +1689,7 @@ CONFIG_FB_EFI=y
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
 # CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 # CONFIG_LCD_CLASS_DEVICE is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
@@ -1738,6 +1776,8 @@ CONFIG_SND_PCI=y
 # CONFIG_SND_INDIGO is not set
 # CONFIG_SND_INDIGOIO is not set
 # CONFIG_SND_INDIGODJ is not set
+# CONFIG_SND_INDIGOIOX is not set
+# CONFIG_SND_INDIGODJX is not set
 # CONFIG_SND_EMU10K1 is not set
 # CONFIG_SND_EMU10K1X is not set
 # CONFIG_SND_ENS1370 is not set
@@ -1811,15 +1851,17 @@ CONFIG_USB_HIDDEV=y
 #
 # Special HID drivers
 #
-CONFIG_HID_COMPAT=y
 CONFIG_HID_A4TECH=y
 CONFIG_HID_APPLE=y
 CONFIG_HID_BELKIN=y
 CONFIG_HID_CHERRY=y
 CONFIG_HID_CHICONY=y
 CONFIG_HID_CYPRESS=y
+# CONFIG_DRAGONRISE_FF is not set
 CONFIG_HID_EZKEY=y
+CONFIG_HID_KYE=y
 CONFIG_HID_GYRATION=y
+CONFIG_HID_KENSINGTON=y
 CONFIG_HID_LOGITECH=y
 CONFIG_LOGITECH_FF=y
 # CONFIG_LOGIRUMBLEPAD2_FF is not set
@@ -1885,11 +1927,11 @@ CONFIG_USB_PRINTER=y
 # CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
 #
 
 #
-# see USB_STORAGE Help for more information
+# also be needed; see USB_STORAGE Help for more info
 #
 CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1931,7 +1973,6 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
@@ -1947,6 +1988,7 @@ CONFIG_USB_LIBUSUAL=y
 #
 # OTG and related infrastructure
 #
+# CONFIG_NOP_USB_XCEIV is not set
 # CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -1958,8 +2000,10 @@ CONFIG_LEDS_CLASS=y
 #
 # CONFIG_LEDS_ALIX2 is not set
 # CONFIG_LEDS_PCA9532 is not set
+# CONFIG_LEDS_LP5521 is not set
 # CONFIG_LEDS_CLEVO_MAIL is not set
 # CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_BD2802 is not set
 
 #
 # LED Triggers
@@ -1969,6 +2013,10 @@ CONFIG_LEDS_TRIGGERS=y
 # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
 # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 CONFIG_EDAC=y
@@ -2037,6 +2085,7 @@ CONFIG_DMADEVICES=y
 # DMA Devices
 #
 # CONFIG_INTEL_IOATDMA is not set
+# CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 CONFIG_X86_PLATFORM_DEVICES=y
@@ -2071,6 +2120,7 @@ CONFIG_DMIID=y
 #
 # CONFIG_EXT2_FS is not set
 CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
@@ -2101,6 +2151,11 @@ CONFIG_AUTOFS4_FS=y
 CONFIG_GENERIC_ACL=y
 
 #
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
 # CD-ROM/DVD Filesystems
 #
 CONFIG_ISO9660_FS=y
@@ -2151,6 +2206,7 @@ CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
@@ -2164,7 +2220,6 @@ CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -2251,6 +2306,7 @@ CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 # CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_DETECT_HUNG_TASK is not set
 # CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHEDSTATS=y
 CONFIG_TIMER_STATS=y
@@ -2266,6 +2322,7 @@ CONFIG_TIMER_STATS=y
 # CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+CONFIG_STACKTRACE=y
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_HIGHMEM is not set
 CONFIG_DEBUG_BUGVERBOSE=y
@@ -2289,13 +2346,19 @@ CONFIG_FRAME_POINTER=y
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
 CONFIG_USER_STACKTRACE_SUPPORT=y
+CONFIG_NOP_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y
 CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
 CONFIG_HAVE_HW_BRANCH_TRACER=y
+CONFIG_HAVE_FTRACE_SYSCALLS=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
 
 #
 # Tracers
@@ -2305,13 +2368,21 @@ CONFIG_HAVE_HW_BRANCH_TRACER=y
 # CONFIG_SYSPROF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_FTRACE_SYSCALLS is not set
 # CONFIG_BOOT_TRACER is not set
 # CONFIG_TRACE_BRANCH_PROFILING is not set
 # CONFIG_POWER_TRACER is not set
 # CONFIG_STACK_TRACER is not set
 # CONFIG_HW_BRANCH_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_MMIOTRACE is not set
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
-# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_DMA_API_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
@@ -2321,7 +2392,6 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
 # CONFIG_X86_PTDUMP is not set
 CONFIG_DEBUG_RODATA=y
@@ -2329,7 +2399,7 @@ CONFIG_DEBUG_RODATA=y
 CONFIG_DEBUG_NX_TEST=m
 # CONFIG_4KSTACKS is not set
 CONFIG_DOUBLEFAULT=y
-# CONFIG_MMIOTRACE is not set
+CONFIG_HAVE_MMIOTRACE_SUPPORT=y
 CONFIG_IO_DELAY_TYPE_0X80=0
 CONFIG_IO_DELAY_TYPE_0XED=1
 CONFIG_IO_DELAY_TYPE_UDELAY=2
@@ -2365,6 +2435,8 @@ CONFIG_SECURITY_SELINUX_AVC_STATS=y
 CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
 # CONFIG_SECURITY_SMACK is not set
+# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_IMA is not set
 CONFIG_CRYPTO=y
 
 #
@@ -2380,10 +2452,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_AUTHENC=y
 # CONFIG_CRYPTO_TEST is not set
@@ -2456,6 +2530,7 @@ CONFIG_CRYPTO_DES=y
 # Compression
 #
 # CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
 # CONFIG_CRYPTO_LZO is not set
 
 #
@@ -2467,11 +2542,13 @@ CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_GEODE is not set
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 CONFIG_HAVE_KVM=y
+CONFIG_HAVE_KVM_IRQCHIP=y
 CONFIG_VIRTUALIZATION=y
 # CONFIG_KVM is not set
 # CONFIG_LGUEST is not set
 # CONFIG_VIRTIO_PCI is not set
 # CONFIG_VIRTIO_BALLOON is not set
+CONFIG_BINARY_PRINTF=y
 
 #
 # Library routines
@@ -2489,7 +2566,10 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_AUDIT_GENERIC=y
 CONFIG_ZLIB_INFLATE=y
-CONFIG_PLIST=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 9fe5d21..cdeb4ca 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -1,12 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc4
-# Tue Feb 24 15:44:16 2009
+# Linux kernel version: 2.6.30-rc2
+# Thu May  7 14:22:39 2009
 #
 CONFIG_64BIT=y
 # CONFIG_X86_32 is not set
 CONFIG_X86_64=y
 CONFIG_X86=y
+CONFIG_OUTPUT_FORMAT="elf64-x86-64"
 CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CMOS_UPDATE=y
@@ -34,6 +35,7 @@ CONFIG_ARCH_HAS_CPU_RELAX=y
 CONFIG_ARCH_HAS_DEFAULT_IDLE=y
 CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
 CONFIG_HAVE_SETUP_PER_CPU_AREA=y
+CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
 CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -41,14 +43,14 @@ CONFIG_ZONE_DMA32=y
 CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_AUDIT_ARCH=y
 CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
 CONFIG_USE_GENERIC_SMP_HELPERS=y
 CONFIG_X86_64_SMP=y
 CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
 # CONFIG_KTIME_SCALAR is not set
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -61,10 +63,17 @@ CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_BZIP2 is not set
+# CONFIG_KERNEL_LZMA is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
@@ -114,23 +123,26 @@ CONFIG_PID_NS=y
 CONFIG_NET_NS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 # CONFIG_EMBEDDED is not set
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_EXTRA_PASS=y
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_PCSPKR_PLATFORM=y
-# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
@@ -140,6 +152,7 @@ CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
+# CONFIG_COMPAT_BRK is not set
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
@@ -155,6 +168,8 @@ CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+# CONFIG_SLOW_WORK is not set
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -167,7 +182,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_STOP_MACHINE=y
 CONFIG_BLOCK=y
-CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_BLK_DEV_BSG=y
 # CONFIG_BLK_DEV_INTEGRITY is not set
 CONFIG_BLOCK_COMPAT=y
@@ -196,11 +210,10 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_SMP=y
 CONFIG_SPARSE_IRQ=y
 # CONFIG_NUMA_MIGRATE_IRQ_DESC is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_GENERICARCH is not set
+CONFIG_X86_EXTENDED_PLATFORM=y
 # CONFIG_X86_VSMP is not set
+# CONFIG_X86_UV is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_PARAVIRT_GUEST is not set
 # CONFIG_MEMTEST is not set
@@ -230,10 +243,10 @@ CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_MCORE2 is not set
 CONFIG_GENERIC_CPU=y
 CONFIG_X86_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
+CONFIG_X86_L1_CACHE_BYTES=64
+CONFIG_X86_INTERNODE_CACHE_BYTES=64
 CONFIG_X86_CMPXCHG=y
-CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_L1_CACHE_SHIFT=6
 CONFIG_X86_WP_WORKS_OK=y
 CONFIG_X86_TSC=y
 CONFIG_X86_CMPXCHG64=y
@@ -242,7 +255,7 @@ CONFIG_X86_MINIMUM_CPU_FAMILY=64
 CONFIG_X86_DEBUGCTLMSR=y
 CONFIG_CPU_SUP_INTEL=y
 CONFIG_CPU_SUP_AMD=y
-CONFIG_CPU_SUP_CENTAUR_64=y
+CONFIG_CPU_SUP_CENTAUR=y
 CONFIG_X86_DS=y
 CONFIG_X86_PTRACE_BTS=y
 CONFIG_HPET_TIMER=y
@@ -269,6 +282,7 @@ CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_X86_MCE=y
 CONFIG_X86_MCE_INTEL=y
 CONFIG_X86_MCE_AMD=y
+CONFIG_X86_MCE_THRESHOLD=y
 # CONFIG_I8K is not set
 CONFIG_MICROCODE=y
 CONFIG_MICROCODE_INTEL=y
@@ -276,6 +290,7 @@ CONFIG_MICROCODE_AMD=y
 CONFIG_MICROCODE_OLD_INTERFACE=y
 CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
+# CONFIG_X86_CPU_DEBUG is not set
 CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_DIRECT_GBPAGES=y
 CONFIG_NUMA=y
@@ -309,6 +324,8 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
 CONFIG_X86_CHECK_BIOS_CORRUPTION=y
 CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
 CONFIG_X86_RESERVE_LOW_64K=y
@@ -317,6 +334,7 @@ CONFIG_MTRR=y
 CONFIG_X86_PAT=y
 CONFIG_EFI=y
 CONFIG_SECCOMP=y
+# CONFIG_CC_STACKPROTECTOR is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
 # CONFIG_HZ_300 is not set
@@ -325,8 +343,9 @@ CONFIG_HZ=1000
 CONFIG_SCHED_HRTICK=y
 CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
+# CONFIG_KEXEC_JUMP is not set
 CONFIG_PHYSICAL_START=0x1000000
-# CONFIG_RELOCATABLE is not set
+CONFIG_RELOCATABLE=y
 CONFIG_PHYSICAL_ALIGN=0x200000
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_COMPAT_VDSO is not set
@@ -370,7 +389,6 @@ CONFIG_ACPI_NUMA=y
 CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 # CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_SYSTEM=y
 CONFIG_X86_PM_TIMER=y
 CONFIG_ACPI_CONTAINER=y
 # CONFIG_ACPI_SBS is not set
@@ -436,6 +454,7 @@ CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCI_STUB is not set
 CONFIG_HT_IRQ=y
+# CONFIG_PCI_IOV is not set
 CONFIG_ISA_DMA_API=y
 CONFIG_K8_NB=y
 CONFIG_PCCARD=y
@@ -481,7 +500,6 @@ CONFIG_NET=y
 #
 # Networking options
 #
-CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -639,6 +657,7 @@ CONFIG_LLC=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
 CONFIG_NET_SCHED=y
 
 #
@@ -696,6 +715,7 @@ CONFIG_NET_SCH_FIFO=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_NET_TCPPROBE is not set
+# CONFIG_NET_DROP_MONITOR is not set
 CONFIG_HAMRADIO=y
 
 #
@@ -706,12 +726,10 @@ CONFIG_HAMRADIO=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-# CONFIG_PHONET is not set
 CONFIG_FIB_RULES=y
 CONFIG_WIRELESS=y
 CONFIG_CFG80211=y
 # CONFIG_CFG80211_REG_DEBUG is not set
-CONFIG_NL80211=y
 CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
 CONFIG_WIRELESS_EXT_SYSFS=y
@@ -788,9 +806,8 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_TIFM_CORE is not set
 # CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_SGI_XP is not set
 # CONFIG_HP_ILO is not set
-# CONFIG_SGI_GRU is not set
+# CONFIG_ISL29003 is not set
 # CONFIG_C2PORT is not set
 
 #
@@ -844,6 +861,7 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_LOWLEVEL is not set
 # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
 # CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -940,6 +958,7 @@ CONFIG_DM_ZERO=y
 CONFIG_MACINTOSH_DRIVERS=y
 CONFIG_MAC_EMUMOUSEBTN=y
 CONFIG_NETDEVICES=y
+CONFIG_COMPAT_NET_DEV_OPS=y
 # CONFIG_IFB is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -977,6 +996,8 @@ CONFIG_MII=y
 CONFIG_NET_VENDOR_3COM=y
 # CONFIG_VORTEX is not set
 # CONFIG_TYPHOON is not set
+# CONFIG_ETHOC is not set
+# CONFIG_DNET is not set
 CONFIG_NET_TULIP=y
 # CONFIG_DE2104X is not set
 # CONFIG_TULIP is not set
@@ -1026,6 +1047,7 @@ CONFIG_E1000=y
 # CONFIG_E1000E is not set
 # CONFIG_IP1000 is not set
 # CONFIG_IGB is not set
+# CONFIG_IGBVF is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1040,6 +1062,7 @@ CONFIG_TIGON3=y
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1E is not set
+# CONFIG_ATL1C is not set
 # CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
@@ -1049,6 +1072,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_VXGE is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
 # CONFIG_NIU is not set
@@ -1058,6 +1082,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_BNX2X is not set
 # CONFIG_QLGE is not set
 # CONFIG_SFC is not set
+# CONFIG_BE2NET is not set
 CONFIG_TR=y
 # CONFIG_IBMOL is not set
 # CONFIG_3C359 is not set
@@ -1072,8 +1097,8 @@ CONFIG_WLAN_80211=y
 # CONFIG_LIBERTAS is not set
 # CONFIG_LIBERTAS_THINFIRM is not set
 # CONFIG_AIRO is not set
-# CONFIG_HERMES is not set
 # CONFIG_ATMEL is not set
+# CONFIG_AT76C50X_USB is not set
 # CONFIG_AIRO_CS is not set
 # CONFIG_PCMCIA_WL3501 is not set
 # CONFIG_PRISM54 is not set
@@ -1083,21 +1108,21 @@ CONFIG_WLAN_80211=y
 # CONFIG_RTL8187 is not set
 # CONFIG_ADM8211 is not set
 # CONFIG_MAC80211_HWSIM is not set
+# CONFIG_MWL8K is not set
 # CONFIG_P54_COMMON is not set
 CONFIG_ATH5K=y
 # CONFIG_ATH5K_DEBUG is not set
 # CONFIG_ATH9K is not set
+# CONFIG_AR9170_USB is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2200 is not set
-# CONFIG_IWLCORE is not set
-# CONFIG_IWLWIFI_LEDS is not set
-# CONFIG_IWLAGN is not set
-# CONFIG_IWL3945 is not set
+# CONFIG_IWLWIFI is not set
 # CONFIG_HOSTAP is not set
 # CONFIG_B43 is not set
 # CONFIG_B43LEGACY is not set
 # CONFIG_ZD1211RW is not set
 # CONFIG_RT2X00 is not set
+# CONFIG_HERMES is not set
 
 #
 # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -1208,6 +1233,8 @@ CONFIG_INPUT_TABLET=y
 # CONFIG_TABLET_USB_KBTAB is not set
 # CONFIG_TABLET_USB_WACOM is not set
 CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
@@ -1301,6 +1328,7 @@ CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_IPMI_HANDLER is not set
 CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
 # CONFIG_HW_RANDOM_INTEL is not set
 # CONFIG_HW_RANDOM_AMD is not set
 CONFIG_NVRAM=y
@@ -1382,7 +1410,6 @@ CONFIG_I2C_I801=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
@@ -1416,6 +1443,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADT7475 is not set
 # CONFIG_SENSORS_K8TEMP is not set
 # CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATK0110 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_I5K_AMB is not set
@@ -1425,6 +1453,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_FSCHER is not set
 # CONFIG_SENSORS_FSCPOS is not set
 # CONFIG_SENSORS_FSCHMD is not set
+# CONFIG_SENSORS_G760A is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_CORETEMP is not set
@@ -1440,11 +1469,14 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
 # CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_MAX6650 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_DME1737 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
@@ -1635,6 +1667,7 @@ CONFIG_FB_EFI=y
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
 # CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 # CONFIG_LCD_CLASS_DEVICE is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
@@ -1720,6 +1753,8 @@ CONFIG_SND_PCI=y
 # CONFIG_SND_INDIGO is not set
 # CONFIG_SND_INDIGOIO is not set
 # CONFIG_SND_INDIGODJ is not set
+# CONFIG_SND_INDIGOIOX is not set
+# CONFIG_SND_INDIGODJX is not set
 # CONFIG_SND_EMU10K1 is not set
 # CONFIG_SND_EMU10K1X is not set
 # CONFIG_SND_ENS1370 is not set
@@ -1792,15 +1827,17 @@ CONFIG_USB_HIDDEV=y
 #
 # Special HID drivers
 #
-CONFIG_HID_COMPAT=y
 CONFIG_HID_A4TECH=y
 CONFIG_HID_APPLE=y
 CONFIG_HID_BELKIN=y
 CONFIG_HID_CHERRY=y
 CONFIG_HID_CHICONY=y
 CONFIG_HID_CYPRESS=y
+# CONFIG_DRAGONRISE_FF is not set
 CONFIG_HID_EZKEY=y
+CONFIG_HID_KYE=y
 CONFIG_HID_GYRATION=y
+CONFIG_HID_KENSINGTON=y
 CONFIG_HID_LOGITECH=y
 CONFIG_LOGITECH_FF=y
 # CONFIG_LOGIRUMBLEPAD2_FF is not set
@@ -1866,11 +1903,11 @@ CONFIG_USB_PRINTER=y
 # CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
 #
 
 #
-# see USB_STORAGE Help for more information
+# also be needed; see USB_STORAGE Help for more info
 #
 CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1912,7 +1949,6 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
@@ -1928,6 +1964,7 @@ CONFIG_USB_LIBUSUAL=y
 #
 # OTG and related infrastructure
 #
+# CONFIG_NOP_USB_XCEIV is not set
 # CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -1939,8 +1976,10 @@ CONFIG_LEDS_CLASS=y
 #
 # CONFIG_LEDS_ALIX2 is not set
 # CONFIG_LEDS_PCA9532 is not set
+# CONFIG_LEDS_LP5521 is not set
 # CONFIG_LEDS_CLEVO_MAIL is not set
 # CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_BD2802 is not set
 
 #
 # LED Triggers
@@ -1950,6 +1989,10 @@ CONFIG_LEDS_TRIGGERS=y
 # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
 # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 CONFIG_EDAC=y
@@ -2018,6 +2061,7 @@ CONFIG_DMADEVICES=y
 # DMA Devices
 #
 # CONFIG_INTEL_IOATDMA is not set
+# CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 CONFIG_X86_PLATFORM_DEVICES=y
@@ -2051,6 +2095,7 @@ CONFIG_DMIID=y
 #
 # CONFIG_EXT2_FS is not set
 CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
@@ -2082,6 +2127,11 @@ CONFIG_AUTOFS4_FS=y
 CONFIG_GENERIC_ACL=y
 
 #
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
 # CD-ROM/DVD Filesystems
 #
 CONFIG_ISO9660_FS=y
@@ -2132,6 +2182,7 @@ CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
@@ -2145,7 +2196,6 @@ CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -2232,6 +2282,7 @@ CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 # CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_DETECT_HUNG_TASK is not set
 # CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHEDSTATS=y
 CONFIG_TIMER_STATS=y
@@ -2247,6 +2298,7 @@ CONFIG_TIMER_STATS=y
 # CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+CONFIG_STACKTRACE=y
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
@@ -2269,13 +2321,19 @@ CONFIG_FRAME_POINTER=y
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
 CONFIG_USER_STACKTRACE_SUPPORT=y
+CONFIG_NOP_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y
 CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
 CONFIG_HAVE_HW_BRANCH_TRACER=y
+CONFIG_HAVE_FTRACE_SYSCALLS=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
 
 #
 # Tracers
@@ -2285,13 +2343,21 @@ CONFIG_HAVE_HW_BRANCH_TRACER=y
 # CONFIG_SYSPROF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_FTRACE_SYSCALLS is not set
 # CONFIG_BOOT_TRACER is not set
 # CONFIG_TRACE_BRANCH_PROFILING is not set
 # CONFIG_POWER_TRACER is not set
 # CONFIG_STACK_TRACER is not set
 # CONFIG_HW_BRANCH_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_MMIOTRACE is not set
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
-# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_DMA_API_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
@@ -2301,14 +2367,13 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
 # CONFIG_X86_PTDUMP is not set
 CONFIG_DEBUG_RODATA=y
 # CONFIG_DEBUG_RODATA_TEST is not set
 CONFIG_DEBUG_NX_TEST=m
 # CONFIG_IOMMU_DEBUG is not set
-# CONFIG_MMIOTRACE is not set
+CONFIG_HAVE_MMIOTRACE_SUPPORT=y
 CONFIG_IO_DELAY_TYPE_0X80=0
 CONFIG_IO_DELAY_TYPE_0XED=1
 CONFIG_IO_DELAY_TYPE_UDELAY=2
@@ -2344,6 +2409,8 @@ CONFIG_SECURITY_SELINUX_AVC_STATS=y
 CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
 # CONFIG_SECURITY_SMACK is not set
+# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_IMA is not set
 CONFIG_CRYPTO=y
 
 #
@@ -2359,10 +2426,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_AUTHENC=y
 # CONFIG_CRYPTO_TEST is not set
@@ -2414,6 +2483,7 @@ CONFIG_CRYPTO_SHA1=y
 #
 CONFIG_CRYPTO_AES=y
 # CONFIG_CRYPTO_AES_X86_64 is not set
+# CONFIG_CRYPTO_AES_NI_INTEL is not set
 # CONFIG_CRYPTO_ANUBIS is not set
 CONFIG_CRYPTO_ARC4=y
 # CONFIG_CRYPTO_BLOWFISH is not set
@@ -2435,6 +2505,7 @@ CONFIG_CRYPTO_DES=y
 # Compression
 #
 # CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
 # CONFIG_CRYPTO_LZO is not set
 
 #
@@ -2444,10 +2515,12 @@ CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 CONFIG_HAVE_KVM=y
+CONFIG_HAVE_KVM_IRQCHIP=y
 CONFIG_VIRTUALIZATION=y
 # CONFIG_KVM is not set
 # CONFIG_VIRTIO_PCI is not set
 # CONFIG_VIRTIO_BALLOON is not set
+CONFIG_BINARY_PRINTF=y
 
 #
 # Library routines
@@ -2464,7 +2537,10 @@ CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
-CONFIG_PLIST=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 90+ messages in thread

* [PATCH 14/14] x86, defconfig: update defconfigs to relocatable
@ 2009-05-07 22:27   ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-07 22:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: H. Peter Anvin, kexec, hbabu, ebiederm, ying.huang, mingo, sam,
	tglx, vgoyal

From: H. Peter Anvin <hpa@zytor.com>

Update the defconfigs, in particular to make CONFIG_RELOCATABLE
default on, and adjust CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN
to the current default values.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/configs/i386_defconfig   |  148 ++++++++++++++++++++++++++++---------
 arch/x86/configs/x86_64_defconfig |  148 ++++++++++++++++++++++++++++---------
 2 files changed, 226 insertions(+), 70 deletions(-)

diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 235b81d..3773a73 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -1,12 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc4
-# Tue Feb 24 15:50:58 2009
+# Linux kernel version: 2.6.30-rc2
+# Thu May  7 14:22:04 2009
 #
 # CONFIG_64BIT is not set
 CONFIG_X86_32=y
 # CONFIG_X86_64 is not set
 CONFIG_X86=y
+CONFIG_OUTPUT_FORMAT="elf32-i386"
 CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CMOS_UPDATE=y
@@ -33,6 +34,7 @@ CONFIG_ARCH_HAS_CPU_RELAX=y
 CONFIG_ARCH_HAS_DEFAULT_IDLE=y
 CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
 CONFIG_HAVE_SETUP_PER_CPU_AREA=y
+CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
 # CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -40,15 +42,16 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_POPULATES_NODE_MAP=y
 # CONFIG_AUDIT_ARCH is not set
 CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
 CONFIG_USE_GENERIC_SMP_HELPERS=y
 CONFIG_X86_32_SMP=y
 CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
+CONFIG_X86_32_LAZY_GS=y
 CONFIG_KTIME_SCALAR=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -60,10 +63,17 @@ CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_BZIP2 is not set
+# CONFIG_KERNEL_LZMA is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
@@ -113,23 +123,26 @@ CONFIG_PID_NS=y
 CONFIG_NET_NS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 # CONFIG_EMBEDDED is not set
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_EXTRA_PASS=y
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_PCSPKR_PLATFORM=y
-# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
@@ -139,6 +152,7 @@ CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
+# CONFIG_COMPAT_BRK is not set
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
@@ -154,6 +168,8 @@ CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+# CONFIG_SLOW_WORK is not set
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -167,7 +183,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_STOP_MACHINE=y
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
-CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_BLK_DEV_BSG=y
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -194,12 +209,12 @@ CONFIG_HIGH_RES_TIMERS=y
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_SMP=y
 CONFIG_SPARSE_IRQ=y
-CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
+# CONFIG_X86_BIGSMP is not set
+CONFIG_X86_EXTENDED_PLATFORM=y
 # CONFIG_X86_ELAN is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_VSMP is not set
 # CONFIG_X86_RDC321X is not set
+# CONFIG_X86_32_NON_STANDARD is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_PARAVIRT_GUEST is not set
 # CONFIG_MEMTEST is not set
@@ -230,8 +245,10 @@ CONFIG_M686=y
 # CONFIG_GENERIC_CPU is not set
 CONFIG_X86_GENERIC=y
 CONFIG_X86_CPU=y
+CONFIG_X86_L1_CACHE_BYTES=64
+CONFIG_X86_INTERNODE_CACHE_BYTES=64
 CONFIG_X86_CMPXCHG=y
-CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_L1_CACHE_SHIFT=5
 CONFIG_X86_XADD=y
 # CONFIG_X86_PPRO_FENCE is not set
 CONFIG_X86_WP_WORKS_OK=y
@@ -247,7 +264,7 @@ CONFIG_X86_DEBUGCTLMSR=y
 CONFIG_CPU_SUP_INTEL=y
 CONFIG_CPU_SUP_CYRIX_32=y
 CONFIG_CPU_SUP_AMD=y
-CONFIG_CPU_SUP_CENTAUR_32=y
+CONFIG_CPU_SUP_CENTAUR=y
 CONFIG_CPU_SUP_TRANSMETA_32=y
 CONFIG_CPU_SUP_UMC_32=y
 CONFIG_X86_DS=y
@@ -279,6 +296,7 @@ CONFIG_MICROCODE_AMD=y
 CONFIG_MICROCODE_OLD_INTERFACE=y
 CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
+# CONFIG_X86_CPU_DEBUG is not set
 # CONFIG_NOHIGHMEM is not set
 CONFIG_HIGHMEM4G=y
 # CONFIG_HIGHMEM64G is not set
@@ -302,6 +320,8 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
 CONFIG_HIGHPTE=y
 CONFIG_X86_CHECK_BIOS_CORRUPTION=y
 CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
@@ -312,6 +332,7 @@ CONFIG_MTRR=y
 CONFIG_X86_PAT=y
 CONFIG_EFI=y
 CONFIG_SECCOMP=y
+# CONFIG_CC_STACKPROTECTOR is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
 # CONFIG_HZ_300 is not set
@@ -322,8 +343,9 @@ CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
 # CONFIG_KEXEC_JUMP is not set
 CONFIG_PHYSICAL_START=0x1000000
-# CONFIG_RELOCATABLE is not set
-CONFIG_PHYSICAL_ALIGN=0x200000
+CONFIG_RELOCATABLE=y
+CONFIG_X86_NEED_RELOCS=y
+CONFIG_PHYSICAL_ALIGN=0x400000
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_COMPAT_VDSO is not set
 # CONFIG_CMDLINE_BOOL is not set
@@ -363,7 +385,6 @@ CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 # CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_SYSTEM=y
 CONFIG_X86_PM_TIMER=y
 CONFIG_ACPI_CONTAINER=y
 # CONFIG_ACPI_SBS is not set
@@ -425,6 +446,7 @@ CONFIG_PCI_BIOS=y
 CONFIG_PCI_DIRECT=y
 CONFIG_PCI_MMCONFIG=y
 CONFIG_PCI_DOMAINS=y
+# CONFIG_DMAR is not set
 CONFIG_PCIEPORTBUS=y
 # CONFIG_HOTPLUG_PCI_PCIE is not set
 CONFIG_PCIEAER=y
@@ -435,6 +457,7 @@ CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCI_STUB is not set
 CONFIG_HT_IRQ=y
+# CONFIG_PCI_IOV is not set
 CONFIG_ISA_DMA_API=y
 # CONFIG_ISA is not set
 # CONFIG_MCA is not set
@@ -481,7 +504,6 @@ CONFIG_NET=y
 #
 # Networking options
 #
-CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -639,6 +661,7 @@ CONFIG_LLC=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
 CONFIG_NET_SCHED=y
 
 #
@@ -696,6 +719,7 @@ CONFIG_NET_SCH_FIFO=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_NET_TCPPROBE is not set
+# CONFIG_NET_DROP_MONITOR is not set
 CONFIG_HAMRADIO=y
 
 #
@@ -706,12 +730,10 @@ CONFIG_HAMRADIO=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-# CONFIG_PHONET is not set
 CONFIG_FIB_RULES=y
 CONFIG_WIRELESS=y
 CONFIG_CFG80211=y
 # CONFIG_CFG80211_REG_DEBUG is not set
-CONFIG_NL80211=y
 CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
 CONFIG_WIRELESS_EXT_SYSFS=y
@@ -789,6 +811,7 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
 # CONFIG_HP_ILO is not set
+# CONFIG_ISL29003 is not set
 # CONFIG_C2PORT is not set
 
 #
@@ -842,6 +865,7 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_LOWLEVEL is not set
 # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
 # CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -940,6 +964,7 @@ CONFIG_DM_ZERO=y
 CONFIG_MACINTOSH_DRIVERS=y
 CONFIG_MAC_EMUMOUSEBTN=y
 CONFIG_NETDEVICES=y
+CONFIG_COMPAT_NET_DEV_OPS=y
 # CONFIG_IFB is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -977,6 +1002,8 @@ CONFIG_MII=y
 CONFIG_NET_VENDOR_3COM=y
 # CONFIG_VORTEX is not set
 # CONFIG_TYPHOON is not set
+# CONFIG_ETHOC is not set
+# CONFIG_DNET is not set
 CONFIG_NET_TULIP=y
 # CONFIG_DE2104X is not set
 # CONFIG_TULIP is not set
@@ -1026,6 +1053,7 @@ CONFIG_E1000=y
 CONFIG_E1000E=y
 # CONFIG_IP1000 is not set
 # CONFIG_IGB is not set
+# CONFIG_IGBVF is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1040,6 +1068,7 @@ CONFIG_BNX2=y
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1E is not set
+# CONFIG_ATL1C is not set
 # CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
@@ -1049,6 +1078,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_VXGE is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
 # CONFIG_NIU is not set
@@ -1058,6 +1088,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_BNX2X is not set
 # CONFIG_QLGE is not set
 # CONFIG_SFC is not set
+# CONFIG_BE2NET is not set
 CONFIG_TR=y
 # CONFIG_IBMOL is not set
 # CONFIG_IBMLS is not set
@@ -1073,8 +1104,8 @@ CONFIG_WLAN_80211=y
 # CONFIG_LIBERTAS is not set
 # CONFIG_LIBERTAS_THINFIRM is not set
 # CONFIG_AIRO is not set
-# CONFIG_HERMES is not set
 # CONFIG_ATMEL is not set
+# CONFIG_AT76C50X_USB is not set
 # CONFIG_AIRO_CS is not set
 # CONFIG_PCMCIA_WL3501 is not set
 # CONFIG_PRISM54 is not set
@@ -1084,21 +1115,21 @@ CONFIG_WLAN_80211=y
 # CONFIG_RTL8187 is not set
 # CONFIG_ADM8211 is not set
 # CONFIG_MAC80211_HWSIM is not set
+# CONFIG_MWL8K is not set
 # CONFIG_P54_COMMON is not set
 CONFIG_ATH5K=y
 # CONFIG_ATH5K_DEBUG is not set
 # CONFIG_ATH9K is not set
+# CONFIG_AR9170_USB is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2200 is not set
-# CONFIG_IWLCORE is not set
-# CONFIG_IWLWIFI_LEDS is not set
-# CONFIG_IWLAGN is not set
-# CONFIG_IWL3945 is not set
+# CONFIG_IWLWIFI is not set
 # CONFIG_HOSTAP is not set
 # CONFIG_B43 is not set
 # CONFIG_B43LEGACY is not set
 # CONFIG_ZD1211RW is not set
 # CONFIG_RT2X00 is not set
+# CONFIG_HERMES is not set
 
 #
 # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -1209,6 +1240,8 @@ CONFIG_INPUT_TABLET=y
 # CONFIG_TABLET_USB_KBTAB is not set
 # CONFIG_TABLET_USB_WACOM is not set
 CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
@@ -1303,6 +1336,7 @@ CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_IPMI_HANDLER is not set
 CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
 CONFIG_HW_RANDOM_INTEL=y
 CONFIG_HW_RANDOM_AMD=y
 CONFIG_HW_RANDOM_GEODE=y
@@ -1390,7 +1424,6 @@ CONFIG_I2C_I801=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
@@ -1424,6 +1457,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADT7475 is not set
 # CONFIG_SENSORS_K8TEMP is not set
 # CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATK0110 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_I5K_AMB is not set
@@ -1433,6 +1467,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_FSCHER is not set
 # CONFIG_SENSORS_FSCPOS is not set
 # CONFIG_SENSORS_FSCHMD is not set
+# CONFIG_SENSORS_G760A is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_CORETEMP is not set
@@ -1448,11 +1483,14 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
 # CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_MAX6650 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_DME1737 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
@@ -1643,7 +1681,6 @@ CONFIG_FB_EFI=y
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_VT8623 is not set
-# CONFIG_FB_CYBLA is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_ARK is not set
 # CONFIG_FB_PM3 is not set
@@ -1652,6 +1689,7 @@ CONFIG_FB_EFI=y
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
 # CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 # CONFIG_LCD_CLASS_DEVICE is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
@@ -1738,6 +1776,8 @@ CONFIG_SND_PCI=y
 # CONFIG_SND_INDIGO is not set
 # CONFIG_SND_INDIGOIO is not set
 # CONFIG_SND_INDIGODJ is not set
+# CONFIG_SND_INDIGOIOX is not set
+# CONFIG_SND_INDIGODJX is not set
 # CONFIG_SND_EMU10K1 is not set
 # CONFIG_SND_EMU10K1X is not set
 # CONFIG_SND_ENS1370 is not set
@@ -1811,15 +1851,17 @@ CONFIG_USB_HIDDEV=y
 #
 # Special HID drivers
 #
-CONFIG_HID_COMPAT=y
 CONFIG_HID_A4TECH=y
 CONFIG_HID_APPLE=y
 CONFIG_HID_BELKIN=y
 CONFIG_HID_CHERRY=y
 CONFIG_HID_CHICONY=y
 CONFIG_HID_CYPRESS=y
+# CONFIG_DRAGONRISE_FF is not set
 CONFIG_HID_EZKEY=y
+CONFIG_HID_KYE=y
 CONFIG_HID_GYRATION=y
+CONFIG_HID_KENSINGTON=y
 CONFIG_HID_LOGITECH=y
 CONFIG_LOGITECH_FF=y
 # CONFIG_LOGIRUMBLEPAD2_FF is not set
@@ -1885,11 +1927,11 @@ CONFIG_USB_PRINTER=y
 # CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
 #
 
 #
-# see USB_STORAGE Help for more information
+# also be needed; see USB_STORAGE Help for more info
 #
 CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1931,7 +1973,6 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
@@ -1947,6 +1988,7 @@ CONFIG_USB_LIBUSUAL=y
 #
 # OTG and related infrastructure
 #
+# CONFIG_NOP_USB_XCEIV is not set
 # CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -1958,8 +2000,10 @@ CONFIG_LEDS_CLASS=y
 #
 # CONFIG_LEDS_ALIX2 is not set
 # CONFIG_LEDS_PCA9532 is not set
+# CONFIG_LEDS_LP5521 is not set
 # CONFIG_LEDS_CLEVO_MAIL is not set
 # CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_BD2802 is not set
 
 #
 # LED Triggers
@@ -1969,6 +2013,10 @@ CONFIG_LEDS_TRIGGERS=y
 # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
 # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 CONFIG_EDAC=y
@@ -2037,6 +2085,7 @@ CONFIG_DMADEVICES=y
 # DMA Devices
 #
 # CONFIG_INTEL_IOATDMA is not set
+# CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 CONFIG_X86_PLATFORM_DEVICES=y
@@ -2071,6 +2120,7 @@ CONFIG_DMIID=y
 #
 # CONFIG_EXT2_FS is not set
 CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
@@ -2101,6 +2151,11 @@ CONFIG_AUTOFS4_FS=y
 CONFIG_GENERIC_ACL=y
 
 #
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
 # CD-ROM/DVD Filesystems
 #
 CONFIG_ISO9660_FS=y
@@ -2151,6 +2206,7 @@ CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
@@ -2164,7 +2220,6 @@ CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -2251,6 +2306,7 @@ CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 # CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_DETECT_HUNG_TASK is not set
 # CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHEDSTATS=y
 CONFIG_TIMER_STATS=y
@@ -2266,6 +2322,7 @@ CONFIG_TIMER_STATS=y
 # CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+CONFIG_STACKTRACE=y
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_HIGHMEM is not set
 CONFIG_DEBUG_BUGVERBOSE=y
@@ -2289,13 +2346,19 @@ CONFIG_FRAME_POINTER=y
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
 CONFIG_USER_STACKTRACE_SUPPORT=y
+CONFIG_NOP_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y
 CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
 CONFIG_HAVE_HW_BRANCH_TRACER=y
+CONFIG_HAVE_FTRACE_SYSCALLS=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
 
 #
 # Tracers
@@ -2305,13 +2368,21 @@ CONFIG_HAVE_HW_BRANCH_TRACER=y
 # CONFIG_SYSPROF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_FTRACE_SYSCALLS is not set
 # CONFIG_BOOT_TRACER is not set
 # CONFIG_TRACE_BRANCH_PROFILING is not set
 # CONFIG_POWER_TRACER is not set
 # CONFIG_STACK_TRACER is not set
 # CONFIG_HW_BRANCH_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_MMIOTRACE is not set
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
-# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_DMA_API_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
@@ -2321,7 +2392,6 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
 # CONFIG_X86_PTDUMP is not set
 CONFIG_DEBUG_RODATA=y
@@ -2329,7 +2399,7 @@ CONFIG_DEBUG_RODATA=y
 CONFIG_DEBUG_NX_TEST=m
 # CONFIG_4KSTACKS is not set
 CONFIG_DOUBLEFAULT=y
-# CONFIG_MMIOTRACE is not set
+CONFIG_HAVE_MMIOTRACE_SUPPORT=y
 CONFIG_IO_DELAY_TYPE_0X80=0
 CONFIG_IO_DELAY_TYPE_0XED=1
 CONFIG_IO_DELAY_TYPE_UDELAY=2
@@ -2365,6 +2435,8 @@ CONFIG_SECURITY_SELINUX_AVC_STATS=y
 CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
 # CONFIG_SECURITY_SMACK is not set
+# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_IMA is not set
 CONFIG_CRYPTO=y
 
 #
@@ -2380,10 +2452,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_AUTHENC=y
 # CONFIG_CRYPTO_TEST is not set
@@ -2456,6 +2530,7 @@ CONFIG_CRYPTO_DES=y
 # Compression
 #
 # CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
 # CONFIG_CRYPTO_LZO is not set
 
 #
@@ -2467,11 +2542,13 @@ CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_GEODE is not set
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 CONFIG_HAVE_KVM=y
+CONFIG_HAVE_KVM_IRQCHIP=y
 CONFIG_VIRTUALIZATION=y
 # CONFIG_KVM is not set
 # CONFIG_LGUEST is not set
 # CONFIG_VIRTIO_PCI is not set
 # CONFIG_VIRTIO_BALLOON is not set
+CONFIG_BINARY_PRINTF=y
 
 #
 # Library routines
@@ -2489,7 +2566,10 @@ CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_AUDIT_GENERIC=y
 CONFIG_ZLIB_INFLATE=y
-CONFIG_PLIST=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 9fe5d21..cdeb4ca 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -1,12 +1,13 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc4
-# Tue Feb 24 15:44:16 2009
+# Linux kernel version: 2.6.30-rc2
+# Thu May  7 14:22:39 2009
 #
 CONFIG_64BIT=y
 # CONFIG_X86_32 is not set
 CONFIG_X86_64=y
 CONFIG_X86=y
+CONFIG_OUTPUT_FORMAT="elf64-x86-64"
 CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CMOS_UPDATE=y
@@ -34,6 +35,7 @@ CONFIG_ARCH_HAS_CPU_RELAX=y
 CONFIG_ARCH_HAS_DEFAULT_IDLE=y
 CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
 CONFIG_HAVE_SETUP_PER_CPU_AREA=y
+CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y
 CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -41,14 +43,14 @@ CONFIG_ZONE_DMA32=y
 CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_AUDIT_ARCH=y
 CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
 CONFIG_USE_GENERIC_SMP_HELPERS=y
 CONFIG_X86_64_SMP=y
 CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
 # CONFIG_KTIME_SCALAR is not set
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -61,10 +63,17 @@ CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_BZIP2 is not set
+# CONFIG_KERNEL_LZMA is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_TASKSTATS=y
@@ -114,23 +123,26 @@ CONFIG_PID_NS=y
 CONFIG_NET_NS=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 # CONFIG_EMBEDDED is not set
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_EXTRA_PASS=y
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_PCSPKR_PLATFORM=y
-# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
@@ -140,6 +152,7 @@ CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
+# CONFIG_COMPAT_BRK is not set
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
@@ -155,6 +168,8 @@ CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+# CONFIG_SLOW_WORK is not set
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -167,7 +182,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_STOP_MACHINE=y
 CONFIG_BLOCK=y
-CONFIG_BLK_DEV_IO_TRACE=y
 CONFIG_BLK_DEV_BSG=y
 # CONFIG_BLK_DEV_INTEGRITY is not set
 CONFIG_BLOCK_COMPAT=y
@@ -196,11 +210,10 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_SMP=y
 CONFIG_SPARSE_IRQ=y
 # CONFIG_NUMA_MIGRATE_IRQ_DESC is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_GENERICARCH is not set
+CONFIG_X86_EXTENDED_PLATFORM=y
 # CONFIG_X86_VSMP is not set
+# CONFIG_X86_UV is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_PARAVIRT_GUEST is not set
 # CONFIG_MEMTEST is not set
@@ -230,10 +243,10 @@ CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_MCORE2 is not set
 CONFIG_GENERIC_CPU=y
 CONFIG_X86_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
+CONFIG_X86_L1_CACHE_BYTES=64
+CONFIG_X86_INTERNODE_CACHE_BYTES=64
 CONFIG_X86_CMPXCHG=y
-CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_L1_CACHE_SHIFT=6
 CONFIG_X86_WP_WORKS_OK=y
 CONFIG_X86_TSC=y
 CONFIG_X86_CMPXCHG64=y
@@ -242,7 +255,7 @@ CONFIG_X86_MINIMUM_CPU_FAMILY=64
 CONFIG_X86_DEBUGCTLMSR=y
 CONFIG_CPU_SUP_INTEL=y
 CONFIG_CPU_SUP_AMD=y
-CONFIG_CPU_SUP_CENTAUR_64=y
+CONFIG_CPU_SUP_CENTAUR=y
 CONFIG_X86_DS=y
 CONFIG_X86_PTRACE_BTS=y
 CONFIG_HPET_TIMER=y
@@ -269,6 +282,7 @@ CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
 CONFIG_X86_MCE=y
 CONFIG_X86_MCE_INTEL=y
 CONFIG_X86_MCE_AMD=y
+CONFIG_X86_MCE_THRESHOLD=y
 # CONFIG_I8K is not set
 CONFIG_MICROCODE=y
 CONFIG_MICROCODE_INTEL=y
@@ -276,6 +290,7 @@ CONFIG_MICROCODE_AMD=y
 CONFIG_MICROCODE_OLD_INTERFACE=y
 CONFIG_X86_MSR=y
 CONFIG_X86_CPUID=y
+# CONFIG_X86_CPU_DEBUG is not set
 CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_DIRECT_GBPAGES=y
 CONFIG_NUMA=y
@@ -309,6 +324,8 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
 CONFIG_X86_CHECK_BIOS_CORRUPTION=y
 CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
 CONFIG_X86_RESERVE_LOW_64K=y
@@ -317,6 +334,7 @@ CONFIG_MTRR=y
 CONFIG_X86_PAT=y
 CONFIG_EFI=y
 CONFIG_SECCOMP=y
+# CONFIG_CC_STACKPROTECTOR is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
 # CONFIG_HZ_300 is not set
@@ -325,8 +343,9 @@ CONFIG_HZ=1000
 CONFIG_SCHED_HRTICK=y
 CONFIG_KEXEC=y
 CONFIG_CRASH_DUMP=y
+# CONFIG_KEXEC_JUMP is not set
 CONFIG_PHYSICAL_START=0x1000000
-# CONFIG_RELOCATABLE is not set
+CONFIG_RELOCATABLE=y
 CONFIG_PHYSICAL_ALIGN=0x200000
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_COMPAT_VDSO is not set
@@ -370,7 +389,6 @@ CONFIG_ACPI_NUMA=y
 CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 # CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_SYSTEM=y
 CONFIG_X86_PM_TIMER=y
 CONFIG_ACPI_CONTAINER=y
 # CONFIG_ACPI_SBS is not set
@@ -436,6 +454,7 @@ CONFIG_PCI_MSI=y
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCI_STUB is not set
 CONFIG_HT_IRQ=y
+# CONFIG_PCI_IOV is not set
 CONFIG_ISA_DMA_API=y
 CONFIG_K8_NB=y
 CONFIG_PCCARD=y
@@ -481,7 +500,6 @@ CONFIG_NET=y
 #
 # Networking options
 #
-CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -639,6 +657,7 @@ CONFIG_LLC=y
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
 CONFIG_NET_SCHED=y
 
 #
@@ -696,6 +715,7 @@ CONFIG_NET_SCH_FIFO=y
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_NET_TCPPROBE is not set
+# CONFIG_NET_DROP_MONITOR is not set
 CONFIG_HAMRADIO=y
 
 #
@@ -706,12 +726,10 @@ CONFIG_HAMRADIO=y
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-# CONFIG_PHONET is not set
 CONFIG_FIB_RULES=y
 CONFIG_WIRELESS=y
 CONFIG_CFG80211=y
 # CONFIG_CFG80211_REG_DEBUG is not set
-CONFIG_NL80211=y
 CONFIG_WIRELESS_OLD_REGULATORY=y
 CONFIG_WIRELESS_EXT=y
 CONFIG_WIRELESS_EXT_SYSFS=y
@@ -788,9 +806,8 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_TIFM_CORE is not set
 # CONFIG_ICS932S401 is not set
 # CONFIG_ENCLOSURE_SERVICES is not set
-# CONFIG_SGI_XP is not set
 # CONFIG_HP_ILO is not set
-# CONFIG_SGI_GRU is not set
+# CONFIG_ISL29003 is not set
 # CONFIG_C2PORT is not set
 
 #
@@ -844,6 +861,7 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_LOWLEVEL is not set
 # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
 # CONFIG_SCSI_DH is not set
+# CONFIG_SCSI_OSD_INITIATOR is not set
 CONFIG_ATA=y
 # CONFIG_ATA_NONSTANDARD is not set
 CONFIG_ATA_ACPI=y
@@ -940,6 +958,7 @@ CONFIG_DM_ZERO=y
 CONFIG_MACINTOSH_DRIVERS=y
 CONFIG_MAC_EMUMOUSEBTN=y
 CONFIG_NETDEVICES=y
+CONFIG_COMPAT_NET_DEV_OPS=y
 # CONFIG_IFB is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
@@ -977,6 +996,8 @@ CONFIG_MII=y
 CONFIG_NET_VENDOR_3COM=y
 # CONFIG_VORTEX is not set
 # CONFIG_TYPHOON is not set
+# CONFIG_ETHOC is not set
+# CONFIG_DNET is not set
 CONFIG_NET_TULIP=y
 # CONFIG_DE2104X is not set
 # CONFIG_TULIP is not set
@@ -1026,6 +1047,7 @@ CONFIG_E1000=y
 # CONFIG_E1000E is not set
 # CONFIG_IP1000 is not set
 # CONFIG_IGB is not set
+# CONFIG_IGBVF is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -1040,6 +1062,7 @@ CONFIG_TIGON3=y
 # CONFIG_QLA3XXX is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1E is not set
+# CONFIG_ATL1C is not set
 # CONFIG_JME is not set
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
@@ -1049,6 +1072,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
+# CONFIG_VXGE is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
 # CONFIG_NIU is not set
@@ -1058,6 +1082,7 @@ CONFIG_CHELSIO_T3_DEPENDS=y
 # CONFIG_BNX2X is not set
 # CONFIG_QLGE is not set
 # CONFIG_SFC is not set
+# CONFIG_BE2NET is not set
 CONFIG_TR=y
 # CONFIG_IBMOL is not set
 # CONFIG_3C359 is not set
@@ -1072,8 +1097,8 @@ CONFIG_WLAN_80211=y
 # CONFIG_LIBERTAS is not set
 # CONFIG_LIBERTAS_THINFIRM is not set
 # CONFIG_AIRO is not set
-# CONFIG_HERMES is not set
 # CONFIG_ATMEL is not set
+# CONFIG_AT76C50X_USB is not set
 # CONFIG_AIRO_CS is not set
 # CONFIG_PCMCIA_WL3501 is not set
 # CONFIG_PRISM54 is not set
@@ -1083,21 +1108,21 @@ CONFIG_WLAN_80211=y
 # CONFIG_RTL8187 is not set
 # CONFIG_ADM8211 is not set
 # CONFIG_MAC80211_HWSIM is not set
+# CONFIG_MWL8K is not set
 # CONFIG_P54_COMMON is not set
 CONFIG_ATH5K=y
 # CONFIG_ATH5K_DEBUG is not set
 # CONFIG_ATH9K is not set
+# CONFIG_AR9170_USB is not set
 # CONFIG_IPW2100 is not set
 # CONFIG_IPW2200 is not set
-# CONFIG_IWLCORE is not set
-# CONFIG_IWLWIFI_LEDS is not set
-# CONFIG_IWLAGN is not set
-# CONFIG_IWL3945 is not set
+# CONFIG_IWLWIFI is not set
 # CONFIG_HOSTAP is not set
 # CONFIG_B43 is not set
 # CONFIG_B43LEGACY is not set
 # CONFIG_ZD1211RW is not set
 # CONFIG_RT2X00 is not set
+# CONFIG_HERMES is not set
 
 #
 # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -1208,6 +1233,8 @@ CONFIG_INPUT_TABLET=y
 # CONFIG_TABLET_USB_KBTAB is not set
 # CONFIG_TABLET_USB_WACOM is not set
 CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
+# CONFIG_TOUCHSCREEN_AD7879 is not set
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
@@ -1301,6 +1328,7 @@ CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_IPMI_HANDLER is not set
 CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM_TIMERIOMEM is not set
 # CONFIG_HW_RANDOM_INTEL is not set
 # CONFIG_HW_RANDOM_AMD is not set
 CONFIG_NVRAM=y
@@ -1382,7 +1410,6 @@ CONFIG_I2C_I801=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
@@ -1416,6 +1443,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_ADT7475 is not set
 # CONFIG_SENSORS_K8TEMP is not set
 # CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATK0110 is not set
 # CONFIG_SENSORS_ATXP1 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_I5K_AMB is not set
@@ -1425,6 +1453,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_FSCHER is not set
 # CONFIG_SENSORS_FSCPOS is not set
 # CONFIG_SENSORS_FSCHMD is not set
+# CONFIG_SENSORS_G760A is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_CORETEMP is not set
@@ -1440,11 +1469,14 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
 # CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_MAX6650 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_DME1737 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
@@ -1635,6 +1667,7 @@ CONFIG_FB_EFI=y
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
 # CONFIG_FB_MB862XX is not set
+# CONFIG_FB_BROADSHEET is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 # CONFIG_LCD_CLASS_DEVICE is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
@@ -1720,6 +1753,8 @@ CONFIG_SND_PCI=y
 # CONFIG_SND_INDIGO is not set
 # CONFIG_SND_INDIGOIO is not set
 # CONFIG_SND_INDIGODJ is not set
+# CONFIG_SND_INDIGOIOX is not set
+# CONFIG_SND_INDIGODJX is not set
 # CONFIG_SND_EMU10K1 is not set
 # CONFIG_SND_EMU10K1X is not set
 # CONFIG_SND_ENS1370 is not set
@@ -1792,15 +1827,17 @@ CONFIG_USB_HIDDEV=y
 #
 # Special HID drivers
 #
-CONFIG_HID_COMPAT=y
 CONFIG_HID_A4TECH=y
 CONFIG_HID_APPLE=y
 CONFIG_HID_BELKIN=y
 CONFIG_HID_CHERRY=y
 CONFIG_HID_CHICONY=y
 CONFIG_HID_CYPRESS=y
+# CONFIG_DRAGONRISE_FF is not set
 CONFIG_HID_EZKEY=y
+CONFIG_HID_KYE=y
 CONFIG_HID_GYRATION=y
+CONFIG_HID_KENSINGTON=y
 CONFIG_HID_LOGITECH=y
 CONFIG_LOGITECH_FF=y
 # CONFIG_LOGIRUMBLEPAD2_FF is not set
@@ -1866,11 +1903,11 @@ CONFIG_USB_PRINTER=y
 # CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
 #
 
 #
-# see USB_STORAGE Help for more information
+# also be needed; see USB_STORAGE Help for more info
 #
 CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1912,7 +1949,6 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
@@ -1928,6 +1964,7 @@ CONFIG_USB_LIBUSUAL=y
 #
 # OTG and related infrastructure
 #
+# CONFIG_NOP_USB_XCEIV is not set
 # CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -1939,8 +1976,10 @@ CONFIG_LEDS_CLASS=y
 #
 # CONFIG_LEDS_ALIX2 is not set
 # CONFIG_LEDS_PCA9532 is not set
+# CONFIG_LEDS_LP5521 is not set
 # CONFIG_LEDS_CLEVO_MAIL is not set
 # CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_BD2802 is not set
 
 #
 # LED Triggers
@@ -1950,6 +1989,10 @@ CONFIG_LEDS_TRIGGERS=y
 # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
 # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+
+#
+# iptables trigger is under Netfilter config (LED target)
+#
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 CONFIG_EDAC=y
@@ -2018,6 +2061,7 @@ CONFIG_DMADEVICES=y
 # DMA Devices
 #
 # CONFIG_INTEL_IOATDMA is not set
+# CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 CONFIG_X86_PLATFORM_DEVICES=y
@@ -2051,6 +2095,7 @@ CONFIG_DMIID=y
 #
 # CONFIG_EXT2_FS is not set
 CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
@@ -2082,6 +2127,11 @@ CONFIG_AUTOFS4_FS=y
 CONFIG_GENERIC_ACL=y
 
 #
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
 # CD-ROM/DVD Filesystems
 #
 CONFIG_ISO9660_FS=y
@@ -2132,6 +2182,7 @@ CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
@@ -2145,7 +2196,6 @@ CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
-# CONFIG_SUNRPC_REGISTER_V4 is not set
 CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -2232,6 +2282,7 @@ CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 # CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_DETECT_HUNG_TASK is not set
 # CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHEDSTATS=y
 CONFIG_TIMER_STATS=y
@@ -2247,6 +2298,7 @@ CONFIG_TIMER_STATS=y
 # CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+CONFIG_STACKTRACE=y
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
@@ -2269,13 +2321,19 @@ CONFIG_FRAME_POINTER=y
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
 CONFIG_USER_STACKTRACE_SUPPORT=y
+CONFIG_NOP_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y
 CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
 CONFIG_HAVE_HW_BRANCH_TRACER=y
+CONFIG_HAVE_FTRACE_SYSCALLS=y
+CONFIG_RING_BUFFER=y
+CONFIG_TRACING=y
+CONFIG_TRACING_SUPPORT=y
 
 #
 # Tracers
@@ -2285,13 +2343,21 @@ CONFIG_HAVE_HW_BRANCH_TRACER=y
 # CONFIG_SYSPROF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_EVENT_TRACER is not set
+# CONFIG_FTRACE_SYSCALLS is not set
 # CONFIG_BOOT_TRACER is not set
 # CONFIG_TRACE_BRANCH_PROFILING is not set
 # CONFIG_POWER_TRACER is not set
 # CONFIG_STACK_TRACER is not set
 # CONFIG_HW_BRANCH_TRACER is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+CONFIG_BLK_DEV_IO_TRACE=y
+# CONFIG_FTRACE_STARTUP_TEST is not set
+# CONFIG_MMIOTRACE is not set
 CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
-# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_DYNAMIC_DEBUG is not set
+# CONFIG_DMA_API_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
@@ -2301,14 +2367,13 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
 # CONFIG_X86_PTDUMP is not set
 CONFIG_DEBUG_RODATA=y
 # CONFIG_DEBUG_RODATA_TEST is not set
 CONFIG_DEBUG_NX_TEST=m
 # CONFIG_IOMMU_DEBUG is not set
-# CONFIG_MMIOTRACE is not set
+CONFIG_HAVE_MMIOTRACE_SUPPORT=y
 CONFIG_IO_DELAY_TYPE_0X80=0
 CONFIG_IO_DELAY_TYPE_0XED=1
 CONFIG_IO_DELAY_TYPE_UDELAY=2
@@ -2344,6 +2409,8 @@ CONFIG_SECURITY_SELINUX_AVC_STATS=y
 CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
 # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
 # CONFIG_SECURITY_SMACK is not set
+# CONFIG_SECURITY_TOMOYO is not set
+# CONFIG_IMA is not set
 CONFIG_CRYPTO=y
 
 #
@@ -2359,10 +2426,12 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_PCOMP=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_MANAGER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_WORKQUEUE=y
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_AUTHENC=y
 # CONFIG_CRYPTO_TEST is not set
@@ -2414,6 +2483,7 @@ CONFIG_CRYPTO_SHA1=y
 #
 CONFIG_CRYPTO_AES=y
 # CONFIG_CRYPTO_AES_X86_64 is not set
+# CONFIG_CRYPTO_AES_NI_INTEL is not set
 # CONFIG_CRYPTO_ANUBIS is not set
 CONFIG_CRYPTO_ARC4=y
 # CONFIG_CRYPTO_BLOWFISH is not set
@@ -2435,6 +2505,7 @@ CONFIG_CRYPTO_DES=y
 # Compression
 #
 # CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_ZLIB is not set
 # CONFIG_CRYPTO_LZO is not set
 
 #
@@ -2444,10 +2515,12 @@ CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 CONFIG_HAVE_KVM=y
+CONFIG_HAVE_KVM_IRQCHIP=y
 CONFIG_VIRTUALIZATION=y
 # CONFIG_KVM is not set
 # CONFIG_VIRTIO_PCI is not set
 # CONFIG_VIRTIO_BALLOON is not set
+CONFIG_BINARY_PRINTF=y
 
 #
 # Library routines
@@ -2464,7 +2537,10 @@ CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
-CONFIG_PLIST=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
+CONFIG_NLATTR=y
-- 
1.6.0.6


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
  2009-05-07 22:26 ` H. Peter Anvin
@ 2009-05-08  1:23   ` Eric W. Biederman
  -1 siblings, 0 replies; 90+ messages in thread
From: Eric W. Biederman @ 2009-05-08  1:23 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx, sam


Peter do you plan to update pxelinux or other bootloaders to use the
relocatable kernel feature?

Can we please kill the gosh awful impact lines?  They keep breaking my
concentration whenever I try and review these patches.  They are
horrible.  Something of very minimal significance jumping up and
screaming at me. 

The impact lines also fail to capture any of the significant ways I
can easily think of that this patch could cause problems.  A little
screw up could cause the kernel to fail to boot for a random portion
of our user base, and the patch as constructed will require changes
to existing bootloaders.

The direction of this patch seems reasonable.  The details are broken.
The common case for relocatable kernels today is kdump.  A situation
with very minimal memory.  In that situation the kernel needs to run
where we put it, modifying the kernel to not run where it gets put
is a problem.

With the code as it is today you can get the exact same behavior
by simply bumping up the minimum alignment to 16MB, and a lot less code
and no changes needed to any bootloaders.

Is your goal to setup a scenario where on small memory systems a bootloader
like pxelinux can support a relocatable kernel and load it a lower
address?  If so that seems reasonable.

With that said how about we change the logic to:

if (load_addr == legacy_load_addr) /* 0x100000 */
	use config_physical_start
else if aligned
	noop
else
        /* Crap this is bad align the kernel and hope something works. */

That gets the desired behavior we override bootloaders that are not
smart and taking relocation into account.  I am really not comfortable
with having code that will override a bootloader doing something
reasonable.

I expect we will still want to update kexec to be able to take
advantage of loadtime_size (runtime_size seems like the wrong name).

Eric

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
@ 2009-05-08  1:23   ` Eric W. Biederman
  0 siblings, 0 replies; 90+ messages in thread
From: Eric W. Biederman @ 2009-05-08  1:23 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: kexec, linux-kernel, hbabu, ying.huang, mingo, sam, tglx, vgoyal


Peter do you plan to update pxelinux or other bootloaders to use the
relocatable kernel feature?

Can we please kill the gosh awful impact lines?  They keep breaking my
concentration whenever I try and review these patches.  They are
horrible.  Something of very minimal significance jumping up and
screaming at me. 

The impact lines also fail to capture any of the significant ways I
can easily think of that this patch could cause problems.  A little
screw up could cause the kernel to fail to boot for a random portion
of our user base, and the patch as constructed will require changes
to existing bootloaders.

The direction of this patch seems reasonable.  The details are broken.
The common case for relocatable kernels today is kdump.  A situation
with very minimal memory.  In that situation the kernel needs to run
where we put it, modifying the kernel to not run where it gets put
is a problem.

With the code as it is today you can get the exact same behavior
by simply bumping up the minimum alignment to 16MB, and a lot less code
and no changes needed to any bootloaders.

Is your goal to setup a scenario where on small memory systems a bootloader
like pxelinux can support a relocatable kernel and load it a lower
address?  If so that seems reasonable.

With that said how about we change the logic to:

if (load_addr == legacy_load_addr) /* 0x100000 */
	use config_physical_start
else if aligned
	noop
else
        /* Crap this is bad align the kernel and hope something works. */

That gets the desired behavior we override bootloaders that are not
smart and taking relocation into account.  I am really not comfortable
with having code that will override a bootloader doing something
reasonable.

I expect we will still want to update kexec to be able to take
advantage of loadtime_size (runtime_size seems like the wrong name).

Eric

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
  2009-05-08  1:23   ` Eric W. Biederman
@ 2009-05-08  5:31     ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08  5:31 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, sam

Eric W. Biederman wrote:
> Peter do you plan to update pxelinux or other bootloaders to use the
> relocatable kernel feature?

Yes.

> The direction of this patch seems reasonable.  The details are broken.
> The common case for relocatable kernels today is kdump.  A situation
> with very minimal memory.  In that situation the kernel needs to run
> where we put it, modifying the kernel to not run where it gets put
> is a problem.

I thought in the kdump case you typically loaded it pretty high?  Either
which way, kdump is always loaded by kexec, so it should just be a
matter of updating kexec to zero the runtime_start field, no?  Basically
this is the bootloader saying "do what I say, dammit."  Since the
existing protocol doesn't have a way to unambiguously communicate one
direction versus another (see below), it seems like a relatively small
issue involving only one tool.  Suboptimal, yes.

> With the code as it is today you can get the exact same behavior
> by simply bumping up the minimum alignment to 16MB, and a lot less code
> and no changes needed to any bootloaders.
> 
> Is your goal to setup a scenario where on small memory systems a bootloader
> like pxelinux can support a relocatable kernel and load it a lower
> address?  If so that seems reasonable.

Yes.

> With that said how about we change the logic to:
> 
> if (load_addr == legacy_load_addr) /* 0x100000 */
> 	use config_physical_start
> else if aligned
> 	noop
> else
>         /* Crap this is bad align the kernel and hope something works. */
> 
> That gets the desired behavior we override bootloaders that are not
> smart and taking relocation into account.  I am really not comfortable
> with having code that will override a bootloader doing something
> reasonable.

I'm not sure that is quite right either, because if alignment is
configured to be 1 MB or less then 1 MB is a perfectly legitimate
address for a relocating bootloader to want to use, even if it is not
configured in.  It would be more than a bit odd to not have that be
permitted.

> I expect we will still want to update kexec to be able to take
> advantage of loadtime_size (runtime_size seems like the wrong name).

Well, it is the amount of memory the kernel needs during runtime (as
opposed to during loading.)  I admit it's not an ideal name, though.  On
the other hand, simply calling it kernel_start and kernel_size seemed
ambiguous.

	-hpa


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
@ 2009-05-08  5:31     ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08  5:31 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: kexec, linux-kernel, hbabu, ying.huang, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

Eric W. Biederman wrote:
> Peter do you plan to update pxelinux or other bootloaders to use the
> relocatable kernel feature?

Yes.

> The direction of this patch seems reasonable.  The details are broken.
> The common case for relocatable kernels today is kdump.  A situation
> with very minimal memory.  In that situation the kernel needs to run
> where we put it, modifying the kernel to not run where it gets put
> is a problem.

I thought in the kdump case you typically loaded it pretty high?  Either
which way, kdump is always loaded by kexec, so it should just be a
matter of updating kexec to zero the runtime_start field, no?  Basically
this is the bootloader saying "do what I say, dammit."  Since the
existing protocol doesn't have a way to unambiguously communicate one
direction versus another (see below), it seems like a relatively small
issue involving only one tool.  Suboptimal, yes.

> With the code as it is today you can get the exact same behavior
> by simply bumping up the minimum alignment to 16MB, and a lot less code
> and no changes needed to any bootloaders.
> 
> Is your goal to setup a scenario where on small memory systems a bootloader
> like pxelinux can support a relocatable kernel and load it a lower
> address?  If so that seems reasonable.

Yes.

> With that said how about we change the logic to:
> 
> if (load_addr == legacy_load_addr) /* 0x100000 */
> 	use config_physical_start
> else if aligned
> 	noop
> else
>         /* Crap this is bad align the kernel and hope something works. */
> 
> That gets the desired behavior we override bootloaders that are not
> smart and taking relocation into account.  I am really not comfortable
> with having code that will override a bootloader doing something
> reasonable.

I'm not sure that is quite right either, because if alignment is
configured to be 1 MB or less then 1 MB is a perfectly legitimate
address for a relocating bootloader to want to use, even if it is not
configured in.  It would be more than a bit odd to not have that be
permitted.

> I expect we will still want to update kexec to be able to take
> advantage of loadtime_size (runtime_size seems like the wrong name).

Well, it is the amount of memory the kernel needs during runtime (as
opposed to during loading.)  I admit it's not an ideal name, though.  On
the other hand, simply calling it kernel_start and kernel_size seemed
ambiguous.

	-hpa


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
  2009-05-08  5:31     ` H. Peter Anvin
@ 2009-05-08  6:54       ` Eric W. Biederman
  -1 siblings, 0 replies; 90+ messages in thread
From: Eric W. Biederman @ 2009-05-08  6:54 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, sam

"H. Peter Anvin" <h.peter.anvin@intel.com> writes:

> Eric W. Biederman wrote:
>> Peter do you plan to update pxelinux or other bootloaders to use the
>> relocatable kernel feature?
>
> Yes.
>
>> The direction of this patch seems reasonable.  The details are broken.
>> The common case for relocatable kernels today is kdump.  A situation
>> with very minimal memory.  In that situation the kernel needs to run
>> where we put it, modifying the kernel to not run where it gets put
>> is a problem.
>
> I thought in the kdump case you typically loaded it pretty high?  Either
> which way, kdump is always loaded by kexec, so it should just be a
> matter of updating kexec to zero the runtime_start field, no?

Yes.  In practice it doesn't matter. I just don't want to get into a
contest with the kernel about who knows better how to put the kernel
in memory the bootloader or the kernel decompressor.

> Basically
> this is the bootloader saying "do what I say, dammit."  Since the
> existing protocol doesn't have a way to unambiguously communicate one
> direction versus another (see below), it seems like a relatively small
> issue involving only one tool.  Suboptimal, yes.

The existing protocol doesn't have the option of anything else.

Physical start has always been <= the alignment for x86 and x86_64,
in any real world configuration.

Something goofy may have happened during unification, I thought I had
removed physical start as totally unnecessary from x86_64.

Hmmm....

In the non-kdump case this is interesting.  I know of instances where
kexec is burned in firmware.  So I am strongly reluctant to make anything
that feels like a true backwards incompatible change.

Those systems also don't have the stupid 15MB hole either.

>> With the code as it is today you can get the exact same behavior
>> by simply bumping up the minimum alignment to 16MB, and a lot less code
>> and no changes needed to any bootloaders.
>> 
>> Is your goal to setup a scenario where on small memory systems a bootloader
>> like pxelinux can support a relocatable kernel and load it a lower
>> address?  If so that seems reasonable.
>
> Yes.
>
>> With that said how about we change the logic to:
>> 
>> if (load_addr == legacy_load_addr) /* 0x100000 */
>> 	use config_physical_start
>> else if aligned
>> 	noop
>> else
>>         /* Crap this is bad, align the kernel and hope something works. */
>> 
>> That gets the desired behavior we override bootloaders that are not
>> smart and taking relocation into account.  I am really not comfortable
>> with having code that will override a bootloader doing something
>> reasonable.
>
> I'm not sure that is quite right either, because if alignment is
> configured to be 1 MB or less then 1 MB is a perfectly legitimate
> address for a relocating bootloader to want to use, even if it is not
> configured in.  It would be more than a bit odd to not have that be
> permitted.

On the 64bit kernel 2MB really is required.  We run at a fixed virtual
address and use 2MB pages. So anything less that 2MB really won't work.

So I think it would be a bad idea if we had bootloaders ignoring the
alignment.

With the suggested start address, it probably make sense to only
export our true alignment requirement.

>> I expect we will still want to update kexec to be able to take
>> advantage of loadtime_size (runtime_size seems like the wrong name).
>
> Well, it is the amount of memory the kernel needs during runtime (as
> opposed to during loading.)  I admit it's not an ideal name, though.  On
> the other hand, simply calling it kernel_start and kernel_size seemed
> ambiguous.

It is the amount of memory we need before a true memory allocator is
initialized.  Essentially text+data+bss.  How about we call it init_size?

Perhaps we should have:
init_size
best start (As a 64bit field please)
optimum align  (Or we flip it around)

Eric

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
@ 2009-05-08  6:54       ` Eric W. Biederman
  0 siblings, 0 replies; 90+ messages in thread
From: Eric W. Biederman @ 2009-05-08  6:54 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: kexec, linux-kernel, hbabu, ying.huang, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

"H. Peter Anvin" <h.peter.anvin@intel.com> writes:

> Eric W. Biederman wrote:
>> Peter do you plan to update pxelinux or other bootloaders to use the
>> relocatable kernel feature?
>
> Yes.
>
>> The direction of this patch seems reasonable.  The details are broken.
>> The common case for relocatable kernels today is kdump.  A situation
>> with very minimal memory.  In that situation the kernel needs to run
>> where we put it, modifying the kernel to not run where it gets put
>> is a problem.
>
> I thought in the kdump case you typically loaded it pretty high?  Either
> which way, kdump is always loaded by kexec, so it should just be a
> matter of updating kexec to zero the runtime_start field, no?

Yes.  In practice it doesn't matter. I just don't want to get into a
contest with the kernel about who knows better how to put the kernel
in memory the bootloader or the kernel decompressor.

> Basically
> this is the bootloader saying "do what I say, dammit."  Since the
> existing protocol doesn't have a way to unambiguously communicate one
> direction versus another (see below), it seems like a relatively small
> issue involving only one tool.  Suboptimal, yes.

The existing protocol doesn't have the option of anything else.

Physical start has always been <= the alignment for x86 and x86_64,
in any real world configuration.

Something goofy may have happened during unification, I thought I had
removed physical start as totally unnecessary from x86_64.

Hmmm....

In the non-kdump case this is interesting.  I know of instances where
kexec is burned in firmware.  So I am strongly reluctant to make anything
that feels like a true backwards incompatible change.

Those systems also don't have the stupid 15MB hole either.

>> With the code as it is today you can get the exact same behavior
>> by simply bumping up the minimum alignment to 16MB, and a lot less code
>> and no changes needed to any bootloaders.
>> 
>> Is your goal to setup a scenario where on small memory systems a bootloader
>> like pxelinux can support a relocatable kernel and load it a lower
>> address?  If so that seems reasonable.
>
> Yes.
>
>> With that said how about we change the logic to:
>> 
>> if (load_addr == legacy_load_addr) /* 0x100000 */
>> 	use config_physical_start
>> else if aligned
>> 	noop
>> else
>>         /* Crap this is bad, align the kernel and hope something works. */
>> 
>> That gets the desired behavior we override bootloaders that are not
>> smart and taking relocation into account.  I am really not comfortable
>> with having code that will override a bootloader doing something
>> reasonable.
>
> I'm not sure that is quite right either, because if alignment is
> configured to be 1 MB or less then 1 MB is a perfectly legitimate
> address for a relocating bootloader to want to use, even if it is not
> configured in.  It would be more than a bit odd to not have that be
> permitted.

On the 64bit kernel 2MB really is required.  We run at a fixed virtual
address and use 2MB pages. So anything less that 2MB really won't work.

So I think it would be a bad idea if we had bootloaders ignoring the
alignment.

With the suggested start address, it probably make sense to only
export our true alignment requirement.

>> I expect we will still want to update kexec to be able to take
>> advantage of loadtime_size (runtime_size seems like the wrong name).
>
> Well, it is the amount of memory the kernel needs during runtime (as
> opposed to during loading.)  I admit it's not an ideal name, though.  On
> the other hand, simply calling it kernel_start and kernel_size seemed
> ambiguous.

It is the amount of memory we need before a true memory allocator is
initialized.  Essentially text+data+bss.  How about we call it init_size?

Perhaps we should have:
init_size
best start (As a 64bit field please)
optimum align  (Or we flip it around)

Eric

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-07 22:26   ` H. Peter Anvin
@ 2009-05-08  7:17     ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:17 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin

On Thu, May 07, 2009 at 03:26:49PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Aligning the .bss section makes it trivially faster, and makes using
> larger transfers for the clear slightly easier.
> 
> [ Impact: trivial performance enhancement, future patch prep ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> ---
>  arch/x86/boot/compressed/vmlinux.lds.S |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
> index 0d26c92..27c168d 100644
> --- a/arch/x86/boot/compressed/vmlinux.lds.S
> +++ b/arch/x86/boot/compressed/vmlinux.lds.S
> @@ -42,6 +42,7 @@ SECTIONS
>  		*(.data.*)
>  		_edata = . ;
>  	}
> +	. = ALIGN(32);

Where does this magic 32 comes from?
I would assume the better choice would be:
	. = ALIGN(L1_CACHE_BYTES);

So we match the relevant CPU.

In general for alignmnet of output sections I see the need for:
1) Function call
2) L1_CACHE_BYTES
3) PAGE_SIZE
4) 2*PAGE_SIZE

But I see magic constant used here and there that does not match
the above (when looking at all archs).
So I act when I see a new 'magic' number..

	Sam

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-08  7:17     ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:17 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, tglx, vgoyal

On Thu, May 07, 2009 at 03:26:49PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Aligning the .bss section makes it trivially faster, and makes using
> larger transfers for the clear slightly easier.
> 
> [ Impact: trivial performance enhancement, future patch prep ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> ---
>  arch/x86/boot/compressed/vmlinux.lds.S |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
> index 0d26c92..27c168d 100644
> --- a/arch/x86/boot/compressed/vmlinux.lds.S
> +++ b/arch/x86/boot/compressed/vmlinux.lds.S
> @@ -42,6 +42,7 @@ SECTIONS
>  		*(.data.*)
>  		_edata = . ;
>  	}
> +	. = ALIGN(32);

Where does this magic 32 comes from?
I would assume the better choice would be:
	. = ALIGN(L1_CACHE_BYTES);

So we match the relevant CPU.

In general for alignmnet of output sections I see the need for:
1) Function call
2) L1_CACHE_BYTES
3) PAGE_SIZE
4) 2*PAGE_SIZE

But I see magic constant used here and there that does not match
the above (when looking at all archs).
So I act when I see a new 'magic' number..

	Sam

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
  2009-05-07 22:26   ` H. Peter Anvin
@ 2009-05-08  7:34     ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:34 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin

On Thu, May 07, 2009 at 03:26:50PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Currently, when building a relocatable kernel, CONFIG_PHYSICAL_START
> is ignored.  This is undesirable, as we would like to keep the kernel
> out of ZONE_DMA and away from the possible memory hole at 15 MB (which
> some vendors for some bizarre reason still have.)
> 
> With this patch, CONFIG_PHYSICAL_START is considered the *minimum*
> address at which the kernel can be located; a relocating bootloader
> can locate it higher, but not lower.  This also restores the
> originally intended behavior that CONFIG_RELOCATABLE is functionally a
> noop if used with a non-relocating bootloader.
> 
> This patch also change movsb and stosb to movsl, stosl and stosq, to
> shave a small fraction off the boot time.

On the coding style side of thing...
> +     movl %ebp, %ebx
> +     cmpl %ebx, %eax
> +     jbe 1f
> +     movl %eax, %ebx

This looks messy with different idention of the operand.

Compare it to this:
> +	movl	%ebp, %ebx
> +	cmpl	%ebx, %eax
> +	jbe	1f
> +	movl	%eax, %ebx


I like the latter more with vertical alignment of the operand.
I see that you add spaces around operators (,) - good.



>   */
>  
>  #ifdef CONFIG_RELOCATABLE
> -	movl 	%ebp, %ebx
> -	addl    $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
> -	andl    $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
> +	movl $LOAD_PHYSICAL_ADDR, %eax
> +	movl %ebp, %ebx
> +	cmpl %ebx, %eax
> +	jbe 1f
> +	movl %eax, %ebx
> +1:
> +	addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
> +	andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
>  #else
>  	movl $LOAD_PHYSICAL_ADDR, %ebx
>  #endif
> +	movl %ebx, %edi		/* Save kernel target address */
>  
>  	/* Replace the compressed data size with the uncompressed size */
>  	subl input_len(%ebp), %ebx
> @@ -84,27 +90,30 @@ ENTRY(startup_32)
>  	addl $4095, %ebx
>  	andl $~4095, %ebx

Not part of your patch...
But this is most likely (PAGE_SIZE - 1) so it would be better to write so.


>  
> -/* Copy the compressed kernel to the end of our buffer
> +/*
> + * Set up the stack
> + */
> +	leal boot_stack_end(%ebx), %esp
> +	pushl %edi		/* Saved kernel target address */
> +
> +/*
> + * Copy the compressed kernel to the end of our buffer
>   * where decompression in place becomes safe.
>   */
>  	pushl %esi
> -	leal _ebss(%ebp), %esi
> -	leal _ebss(%ebx), %edi
> -	movl $(_ebss - startup_32), %ecx
> +	leal (_bss-4)(%ebp), %esi
> +	leal (_bss-4)(%ebx), %edi
> +	movl $(_bss - startup_32), %ecx
> +	shrl $2, %ecx

I do not see why you mess around with _bss here?
Do you use .bss for decompression?


Note: I do not speak x86 assembler so I have not tried to
      understand the functionality.

      I tired to grasp the changes around clear bss - but faild :-(

	Sam

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
@ 2009-05-08  7:34     ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:34 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, tglx, vgoyal

On Thu, May 07, 2009 at 03:26:50PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Currently, when building a relocatable kernel, CONFIG_PHYSICAL_START
> is ignored.  This is undesirable, as we would like to keep the kernel
> out of ZONE_DMA and away from the possible memory hole at 15 MB (which
> some vendors for some bizarre reason still have.)
> 
> With this patch, CONFIG_PHYSICAL_START is considered the *minimum*
> address at which the kernel can be located; a relocating bootloader
> can locate it higher, but not lower.  This also restores the
> originally intended behavior that CONFIG_RELOCATABLE is functionally a
> noop if used with a non-relocating bootloader.
> 
> This patch also change movsb and stosb to movsl, stosl and stosq, to
> shave a small fraction off the boot time.

On the coding style side of thing...
> +     movl %ebp, %ebx
> +     cmpl %ebx, %eax
> +     jbe 1f
> +     movl %eax, %ebx

This looks messy with different idention of the operand.

Compare it to this:
> +	movl	%ebp, %ebx
> +	cmpl	%ebx, %eax
> +	jbe	1f
> +	movl	%eax, %ebx


I like the latter more with vertical alignment of the operand.
I see that you add spaces around operators (,) - good.



>   */
>  
>  #ifdef CONFIG_RELOCATABLE
> -	movl 	%ebp, %ebx
> -	addl    $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
> -	andl    $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
> +	movl $LOAD_PHYSICAL_ADDR, %eax
> +	movl %ebp, %ebx
> +	cmpl %ebx, %eax
> +	jbe 1f
> +	movl %eax, %ebx
> +1:
> +	addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
> +	andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
>  #else
>  	movl $LOAD_PHYSICAL_ADDR, %ebx
>  #endif
> +	movl %ebx, %edi		/* Save kernel target address */
>  
>  	/* Replace the compressed data size with the uncompressed size */
>  	subl input_len(%ebp), %ebx
> @@ -84,27 +90,30 @@ ENTRY(startup_32)
>  	addl $4095, %ebx
>  	andl $~4095, %ebx

Not part of your patch...
But this is most likely (PAGE_SIZE - 1) so it would be better to write so.


>  
> -/* Copy the compressed kernel to the end of our buffer
> +/*
> + * Set up the stack
> + */
> +	leal boot_stack_end(%ebx), %esp
> +	pushl %edi		/* Saved kernel target address */
> +
> +/*
> + * Copy the compressed kernel to the end of our buffer
>   * where decompression in place becomes safe.
>   */
>  	pushl %esi
> -	leal _ebss(%ebp), %esi
> -	leal _ebss(%ebx), %edi
> -	movl $(_ebss - startup_32), %ecx
> +	leal (_bss-4)(%ebp), %esi
> +	leal (_bss-4)(%ebx), %edi
> +	movl $(_bss - startup_32), %ecx
> +	shrl $2, %ecx

I do not see why you mess around with _bss here?
Do you use .bss for decompression?


Note: I do not speak x86 assembler so I have not tried to
      understand the functionality.

      I tired to grasp the changes around clear bss - but faild :-(

	Sam

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
  2009-05-07 22:26   ` H. Peter Anvin
@ 2009-05-08  7:36     ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:36 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin

On Thu, May 07, 2009 at 03:26:51PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Change the default for CONFIG_PHYSICAL_START to 16 MB; 4 MB if
> EMBEDDED.  Change the default for CONFIG_PHYSICAL_ALIGN to match up
> with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)
> 
> The default of 16 MB is designed to avoid occupying ZONE_DMA, as well
> as avoiding a 15-16 MB memory hole, which some vendors inexplicably
> still have in their systems.
> 
> [ Impact: minor performance improvement, leave ZONE_DMA free ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> ---
>  arch/x86/Kconfig |   19 +++++++++++--------
>  1 files changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 039c3f0..13b3a5a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1455,17 +1455,20 @@ config KEXEC_JUMP
>  
>  config PHYSICAL_START
>  	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
> -	default "0x1000000" if X86_NUMAQ
> -	default "0x200000" if X86_64
> -	default "0x100000"
> +	default "0x400000" if EMBEDDED
> +	default "0x1000000"
>  	---help---
>  	  This gives the physical address where the kernel is loaded.
>  
>  	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
>  	  bzImage will decompress itself to above physical address and
> -	  run from there. Otherwise, bzImage will run from the address where
> -	  it has been loaded by the boot loader and will ignore above physical
> -	  address.
> +	  run from there. Otherwise, bzImage will run from the either
> +	  the above physical address or where it has been loaded by
> +	  the boot loader, whichever is higher.
> +
> +	  For embedded machines with very small memory (less than
> +	  about 24 MB) this may need to be adjusted downward from the
> +	  default value of 0x1000000 (16 MB).

But in the above you say that default is "0x400000" if EMBEDDED
That is in contradiction with the help - no?

	Sam

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
@ 2009-05-08  7:36     ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:36 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, tglx, vgoyal

On Thu, May 07, 2009 at 03:26:51PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Change the default for CONFIG_PHYSICAL_START to 16 MB; 4 MB if
> EMBEDDED.  Change the default for CONFIG_PHYSICAL_ALIGN to match up
> with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)
> 
> The default of 16 MB is designed to avoid occupying ZONE_DMA, as well
> as avoiding a 15-16 MB memory hole, which some vendors inexplicably
> still have in their systems.
> 
> [ Impact: minor performance improvement, leave ZONE_DMA free ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> ---
>  arch/x86/Kconfig |   19 +++++++++++--------
>  1 files changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 039c3f0..13b3a5a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1455,17 +1455,20 @@ config KEXEC_JUMP
>  
>  config PHYSICAL_START
>  	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
> -	default "0x1000000" if X86_NUMAQ
> -	default "0x200000" if X86_64
> -	default "0x100000"
> +	default "0x400000" if EMBEDDED
> +	default "0x1000000"
>  	---help---
>  	  This gives the physical address where the kernel is loaded.
>  
>  	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
>  	  bzImage will decompress itself to above physical address and
> -	  run from there. Otherwise, bzImage will run from the address where
> -	  it has been loaded by the boot loader and will ignore above physical
> -	  address.
> +	  run from there. Otherwise, bzImage will run from the either
> +	  the above physical address or where it has been loaded by
> +	  the boot loader, whichever is higher.
> +
> +	  For embedded machines with very small memory (less than
> +	  about 24 MB) this may need to be adjusted downward from the
> +	  default value of 0x1000000 (16 MB).

But in the above you say that default is "0x400000" if EMBEDDED
That is in contradiction with the help - no?

	Sam

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
  2009-05-07 22:26   ` H. Peter Anvin
@ 2009-05-08  7:42     ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:42 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin

On Thu, May 07, 2009 at 03:26:53PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Allow the compression commands in Kbuild (i.e. gzip, bzip2, lzma) to
> take multiple input files and emit the concatenated compressed
> output.  This avoids an intermediate step when a kernel image is built
> from multiple components, such as the relocatable x86-32 kernel.
> 
> [ Impact: new build feature, not yet used ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  scripts/Makefile.lib |   11 ++++++++---
>  scripts/bin_size     |    8 ++++++--
>  2 files changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 9796195..35dfdf6 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -183,7 +183,8 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_gzip = GZIP    $@
> -cmd_gzip = gzip -f -9 < $< > $@
> +cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
> +	(rm -f $@ ; false)
>  
>  
>  # Bzip2
> @@ -193,10 +194,14 @@ cmd_gzip = gzip -f -9 < $< > $@
>  size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
>  
>  quiet_cmd_bzip2 = BZIP2    $@
> -cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
> +cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
> +	bzip2 -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
> +	(rm -f $@ ; false)
>  
>  # Lzma
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_lzma = LZMA    $@
> -cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
> +cmd_lzma = (cat $(filter-out FORCE,$^) | \
> +	lzma -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
> +	(rm -f $@ ; false)
> diff --git a/scripts/bin_size b/scripts/bin_size
> index 43e1b36..55f2161 100644
> --- a/scripts/bin_size
> +++ b/scripts/bin_size
> @@ -1,10 +1,14 @@
>  #!/bin/sh
>  
>  if [ $# = 0 ] ; then
> -   echo Usage: $0 file
> +   echo Usage: $0 file...
>  fi
>  
> -size_dec=`stat -c "%s" $1`
> +size_dec=0
> +for file; do
> +  fsize=`stat -c "%s" $file`
> +  size_dec=`expr $size_dec + $fsize`
> +done
>  size_hex_echo_string=`printf "%08x" $size_dec |
>       sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
>  /bin/echo -ne $size_hex_echo_string

But I would rather have had this inside makefile.lib...

	Sam

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
@ 2009-05-08  7:42     ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:42 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, tglx, vgoyal

On Thu, May 07, 2009 at 03:26:53PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Allow the compression commands in Kbuild (i.e. gzip, bzip2, lzma) to
> take multiple input files and emit the concatenated compressed
> output.  This avoids an intermediate step when a kernel image is built
> from multiple components, such as the relocatable x86-32 kernel.
> 
> [ Impact: new build feature, not yet used ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  scripts/Makefile.lib |   11 ++++++++---
>  scripts/bin_size     |    8 ++++++--
>  2 files changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 9796195..35dfdf6 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -183,7 +183,8 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_gzip = GZIP    $@
> -cmd_gzip = gzip -f -9 < $< > $@
> +cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
> +	(rm -f $@ ; false)
>  
>  
>  # Bzip2
> @@ -193,10 +194,14 @@ cmd_gzip = gzip -f -9 < $< > $@
>  size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
>  
>  quiet_cmd_bzip2 = BZIP2    $@
> -cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
> +cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
> +	bzip2 -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
> +	(rm -f $@ ; false)
>  
>  # Lzma
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_lzma = LZMA    $@
> -cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
> +cmd_lzma = (cat $(filter-out FORCE,$^) | \
> +	lzma -9 && $(size_append) $(filter-out FORCE,$^)) > $@ || \
> +	(rm -f $@ ; false)
> diff --git a/scripts/bin_size b/scripts/bin_size
> index 43e1b36..55f2161 100644
> --- a/scripts/bin_size
> +++ b/scripts/bin_size
> @@ -1,10 +1,14 @@
>  #!/bin/sh
>  
>  if [ $# = 0 ] ; then
> -   echo Usage: $0 file
> +   echo Usage: $0 file...
>  fi
>  
> -size_dec=`stat -c "%s" $1`
> +size_dec=0
> +for file; do
> +  fsize=`stat -c "%s" $file`
> +  size_dec=`expr $size_dec + $fsize`
> +done
>  size_hex_echo_string=`printf "%08x" $size_dec |
>       sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
>  /bin/echo -ne $size_hex_echo_string

But I would rather have had this inside makefile.lib...

	Sam

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 07/14] x86, boot: simplify arch/x86/boot/compressed/Makefile
  2009-05-07 22:26   ` H. Peter Anvin
@ 2009-05-08  7:45     ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:45 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin

On Thu, May 07, 2009 at 03:26:55PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Simplify the arch/x86/boot/compressed/Makefile, by using the new
> capability of specifying multiple inputs to a compressor, and the
> CONFIG_X86_NEED_RELOCS Kconfig symbol.
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

Very nice cleanup!

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 07/14] x86, boot: simplify arch/x86/boot/compressed/Makefile
@ 2009-05-08  7:45     ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:45 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, tglx, vgoyal

On Thu, May 07, 2009 at 03:26:55PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Simplify the arch/x86/boot/compressed/Makefile, by using the new
> capability of specifying multiple inputs to a compressor, and the
> CONFIG_X86_NEED_RELOCS Kconfig symbol.
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

Very nice cleanup!

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-07 22:26   ` H. Peter Anvin
@ 2009-05-08  7:53     ` Cyrill Gorcunov
  -1 siblings, 0 replies; 90+ messages in thread
From: Cyrill Gorcunov @ 2009-05-08  7:53 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, sam, H. Peter Anvin

[H. Peter Anvin - Thu, May 07, 2009 at 03:26:49PM -0700]
| From: H. Peter Anvin <hpa@zytor.com>
| 
| Aligning the .bss section makes it trivially faster, and makes using
| larger transfers for the clear slightly easier.
| 
| [ Impact: trivial performance enhancement, future patch prep ]
| 
| Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| ---
|  arch/x86/boot/compressed/vmlinux.lds.S |    1 +
|  1 files changed, 1 insertions(+), 0 deletions(-)
| 
| diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
| index 0d26c92..27c168d 100644
| --- a/arch/x86/boot/compressed/vmlinux.lds.S
| +++ b/arch/x86/boot/compressed/vmlinux.lds.S
| @@ -42,6 +42,7 @@ SECTIONS
|  		*(.data.*)
|  		_edata = . ;
|  	}
| +	. = ALIGN(32);
|  	.bss : {
|  		_bss = . ;
|  		*(.bss)
| -- 
| 1.6.0.6
| 

Hi Peter, should not it be ALIGN(8) rather? I thought
we keep these sections as tight as possible in a sake
of limitation of setup code size. Perhaps I miss something.

	-- Cyrill

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-08  7:53     ` Cyrill Gorcunov
  0 siblings, 0 replies; 90+ messages in thread
From: Cyrill Gorcunov @ 2009-05-08  7:53 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, sam, tglx, vgoyal

[H. Peter Anvin - Thu, May 07, 2009 at 03:26:49PM -0700]
| From: H. Peter Anvin <hpa@zytor.com>
| 
| Aligning the .bss section makes it trivially faster, and makes using
| larger transfers for the clear slightly easier.
| 
| [ Impact: trivial performance enhancement, future patch prep ]
| 
| Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| ---
|  arch/x86/boot/compressed/vmlinux.lds.S |    1 +
|  1 files changed, 1 insertions(+), 0 deletions(-)
| 
| diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
| index 0d26c92..27c168d 100644
| --- a/arch/x86/boot/compressed/vmlinux.lds.S
| +++ b/arch/x86/boot/compressed/vmlinux.lds.S
| @@ -42,6 +42,7 @@ SECTIONS
|  		*(.data.*)
|  		_edata = . ;
|  	}
| +	. = ALIGN(32);
|  	.bss : {
|  		_bss = . ;
|  		*(.bss)
| -- 
| 1.6.0.6
| 

Hi Peter, should not it be ALIGN(8) rather? I thought
we keep these sections as tight as possible in a sake
of limitation of setup code size. Perhaps I miss something.

	-- Cyrill

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
  2009-05-07 22:26   ` H. Peter Anvin
@ 2009-05-08  7:55     ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:55 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin, Jeremy Fitzhardinge

On Thu, May 07, 2009 at 03:26:57PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Make the (minimum) runtime address and the required amount of linear
> address space available to the boot loader.  A relocating boot loader
> can use this information to select a kernel location; furthermore, it
> is permitted to modify the minimum runtime address field in order for
> the boot loader to force a specific location for the kernel (as long
> as it fits the alignment constraints.)
> 
> This means that the address space layout for the kernel compressor has
> to be determined at compile time.  Since we have to do that, we might
> as well reap the benefit and remove some runtime calculations in
> assembly.
> 
> Note: bounding the amount of linear address space (not necessarily
> bounding the amount of memory needed, but the amount that has to be
> linearly contiguous before the memory map is consulted) was only
> possible since Jeremy Fitzhardinge's brk support work.
> 
> [ Impact: new feature; simplication of compressed/head_*.S ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/x86/boot/Makefile               |   24 ++++++---
>  arch/x86/boot/compressed/Makefile    |   14 ++++--
>  arch/x86/boot/compressed/head_32.S   |   54 ++++++-------------
>  arch/x86/boot/compressed/head_64.S   |   52 +++++-------------
>  arch/x86/boot/compressed/mkpiggy.c   |   97 ++++++++++++++++++++++++++++++++++
>  arch/x86/boot/compressed/vmlinux.scr |   10 ----
>  arch/x86/boot/header.S               |   19 +++++--
>  arch/x86/include/asm/bootparam.h     |    2 +
>  arch/x86/kernel/asm-offsets_32.c     |    1 +
>  arch/x86/kernel/asm-offsets_64.c     |    1 +
>  10 files changed, 173 insertions(+), 101 deletions(-)
>  create mode 100644 arch/x86/boot/compressed/mkpiggy.c
>  delete mode 100644 arch/x86/boot/compressed/vmlinux.scr
> 
> diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
> index 6633b6e..3332d22 100644
> --- a/arch/x86/boot/Makefile
> +++ b/arch/x86/boot/Makefile
> @@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
>  
>  SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
>  
> -sed-offsets := -e 's/^00*/0/' \
> -        -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
> +sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p'
>  
> -quiet_cmd_offsets = OFFSETS $@
> -      cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
> +quiet_cmd_voffset = VOFFSET $@
> +      cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@
>  
> -$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
> -	$(call if_changed,offsets)
> +targets += voffset.h
> +$(obj)/voffset.h: vmlinux FORCE
> +	$(call if_changed,voffset)
> +
> +sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_ebss\|z_.*\)$$/\#define ZO_\2 0x\1/p'
> +
> +quiet_cmd_zoffset = ZOFFSET $@
> +      cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
> +
> +targets += zoffset.h
> +$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
> +	$(call if_changed,zoffset)
>  
> -targets += offsets.h
>  
>  AFLAGS_header.o += -I$(obj)
> -$(obj)/header.o: $(obj)/offsets.h
> +$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
>  
>  LDFLAGS_setup.elf	:= -T
>  $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
> diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
> index b35c3bb..6f4d7ba 100644
> --- a/arch/x86/boot/compressed/Makefile
> +++ b/arch/x86/boot/compressed/Makefile
> @@ -4,7 +4,8 @@
>  # create a compressed vmlinux image from the original vmlinux
>  #
>  
> -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
> +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
> +	   vmlinux.bin.lzma head_$(BITS).o misc.o

You still have a piggy.o target.

>  
>  KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
>  KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
> @@ -19,6 +20,8 @@ KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
>  LDFLAGS := -m elf_$(UTS_MACHINE)
>  LDFLAGS_vmlinux := -T
>  
> +hostprogs-y	:= mkpiggy
> +
>  $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
>  	$(call if_changed,ld)
>  	@:
> @@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
>  suffix_$(CONFIG_KERNEL_BZIP2) = bz2
>  suffix_$(CONFIG_KERNEL_LZMA)  = lzma

No need for a recursive assignment here. Use ":="
Ann we usually uses "-y" not "_y".

>  
> -LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T
> -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
> -	$(call if_changed,ld)
> +quiet_cmd_mkpiggy = MKPIGGY $@
> +      cmd_mkpiggy = $(obj)/mkpiggy $< > $@


> +      cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || (rm -f $@; false)

So we delete the file on error.

> +
> +targets += piggy.S
> +$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix_y) $(obj)/mkpiggy FORCE
> +	$(call if_changed,mkpiggy)


	Sam  

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
@ 2009-05-08  7:55     ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08  7:55 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Jeremy Fitzhardinge, H. Peter Anvin, kexec, linux-kernel, hbabu,
	ebiederm, ying.huang, mingo, tglx, vgoyal

On Thu, May 07, 2009 at 03:26:57PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@zytor.com>
> 
> Make the (minimum) runtime address and the required amount of linear
> address space available to the boot loader.  A relocating boot loader
> can use this information to select a kernel location; furthermore, it
> is permitted to modify the minimum runtime address field in order for
> the boot loader to force a specific location for the kernel (as long
> as it fits the alignment constraints.)
> 
> This means that the address space layout for the kernel compressor has
> to be determined at compile time.  Since we have to do that, we might
> as well reap the benefit and remove some runtime calculations in
> assembly.
> 
> Note: bounding the amount of linear address space (not necessarily
> bounding the amount of memory needed, but the amount that has to be
> linearly contiguous before the memory map is consulted) was only
> possible since Jeremy Fitzhardinge's brk support work.
> 
> [ Impact: new feature; simplication of compressed/head_*.S ]
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/x86/boot/Makefile               |   24 ++++++---
>  arch/x86/boot/compressed/Makefile    |   14 ++++--
>  arch/x86/boot/compressed/head_32.S   |   54 ++++++-------------
>  arch/x86/boot/compressed/head_64.S   |   52 +++++-------------
>  arch/x86/boot/compressed/mkpiggy.c   |   97 ++++++++++++++++++++++++++++++++++
>  arch/x86/boot/compressed/vmlinux.scr |   10 ----
>  arch/x86/boot/header.S               |   19 +++++--
>  arch/x86/include/asm/bootparam.h     |    2 +
>  arch/x86/kernel/asm-offsets_32.c     |    1 +
>  arch/x86/kernel/asm-offsets_64.c     |    1 +
>  10 files changed, 173 insertions(+), 101 deletions(-)
>  create mode 100644 arch/x86/boot/compressed/mkpiggy.c
>  delete mode 100644 arch/x86/boot/compressed/vmlinux.scr
> 
> diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
> index 6633b6e..3332d22 100644
> --- a/arch/x86/boot/Makefile
> +++ b/arch/x86/boot/Makefile
> @@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
>  
>  SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
>  
> -sed-offsets := -e 's/^00*/0/' \
> -        -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
> +sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p'
>  
> -quiet_cmd_offsets = OFFSETS $@
> -      cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
> +quiet_cmd_voffset = VOFFSET $@
> +      cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@
>  
> -$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
> -	$(call if_changed,offsets)
> +targets += voffset.h
> +$(obj)/voffset.h: vmlinux FORCE
> +	$(call if_changed,voffset)
> +
> +sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_ebss\|z_.*\)$$/\#define ZO_\2 0x\1/p'
> +
> +quiet_cmd_zoffset = ZOFFSET $@
> +      cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
> +
> +targets += zoffset.h
> +$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
> +	$(call if_changed,zoffset)
>  
> -targets += offsets.h
>  
>  AFLAGS_header.o += -I$(obj)
> -$(obj)/header.o: $(obj)/offsets.h
> +$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
>  
>  LDFLAGS_setup.elf	:= -T
>  $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
> diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
> index b35c3bb..6f4d7ba 100644
> --- a/arch/x86/boot/compressed/Makefile
> +++ b/arch/x86/boot/compressed/Makefile
> @@ -4,7 +4,8 @@
>  # create a compressed vmlinux image from the original vmlinux
>  #
>  
> -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
> +targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
> +	   vmlinux.bin.lzma head_$(BITS).o misc.o

You still have a piggy.o target.

>  
>  KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
>  KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
> @@ -19,6 +20,8 @@ KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
>  LDFLAGS := -m elf_$(UTS_MACHINE)
>  LDFLAGS_vmlinux := -T
>  
> +hostprogs-y	:= mkpiggy
> +
>  $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE
>  	$(call if_changed,ld)
>  	@:
> @@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
>  suffix_$(CONFIG_KERNEL_BZIP2) = bz2
>  suffix_$(CONFIG_KERNEL_LZMA)  = lzma

No need for a recursive assignment here. Use ":="
Ann we usually uses "-y" not "_y".

>  
> -LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T
> -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
> -	$(call if_changed,ld)
> +quiet_cmd_mkpiggy = MKPIGGY $@
> +      cmd_mkpiggy = $(obj)/mkpiggy $< > $@


> +      cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || (rm -f $@; false)

So we delete the file on error.

> +
> +targets += piggy.S
> +$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix_y) $(obj)/mkpiggy FORCE
> +	$(call if_changed,mkpiggy)


	Sam  

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-08  7:17     ` Sam Ravnborg
@ 2009-05-08  8:18       ` Eric Dumazet
  -1 siblings, 0 replies; 90+ messages in thread
From: Eric Dumazet @ 2009-05-08  8:18 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm, H. Peter Anvin

Sam Ravnborg a écrit :
> On Thu, May 07, 2009 at 03:26:49PM -0700, H. Peter Anvin wrote:
>> From: H. Peter Anvin <hpa@zytor.com>
>>
>> Aligning the .bss section makes it trivially faster, and makes using
>> larger transfers for the clear slightly easier.
>>
>> [ Impact: trivial performance enhancement, future patch prep ]
>>
>> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
>> ---
>>  arch/x86/boot/compressed/vmlinux.lds.S |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
>> index 0d26c92..27c168d 100644
>> --- a/arch/x86/boot/compressed/vmlinux.lds.S
>> +++ b/arch/x86/boot/compressed/vmlinux.lds.S
>> @@ -42,6 +42,7 @@ SECTIONS
>>  		*(.data.*)
>>  		_edata = . ;
>>  	}
>> +	. = ALIGN(32);
> 
> Where does this magic 32 comes from?
> I would assume the better choice would be:
> 	. = ALIGN(L1_CACHE_BYTES);
> 
> So we match the relevant CPU.
> 
> In general for alignmnet of output sections I see the need for:
> 1) Function call
> 2) L1_CACHE_BYTES
> 3) PAGE_SIZE
> 4) 2*PAGE_SIZE
> 
> But I see magic constant used here and there that does not match
> the above (when looking at all archs).
> So I act when I see a new 'magic' number..
> 

I totally agree

gcc itself has a strange 32 bytes alignement rule (unless using -Os) for 
object of a >= 32 bytes size. Did you know that ?

$ cat try.c
char foo[32] = {1};
$ gcc -O -S try.c
        .file   "try.c"
.globl foo
        .data
        .align 32            <<< HERE , what a mess >>
        .type   foo, @object
        .size   foo, 32
foo:
        .byte   1
        .zero   31
        .ident  "GCC: (GNU) 4.4.0"
        .section        .note.GNU-stack,"",@progbits


It makes many .o kernel files marked with a 2**5 alignement of .data or percpudata
At link time, it creates many holes.

In my opinion, gcc should have a separate option than -Os, as this as too expensive
side effects on the code speed.

I can save lot of data space if I patch gcc-4.4.0/config/i386/i386.c

to :

/* Compute the alignment for a static variable.
   TYPE is the data type, and ALIGN is the alignment that
   the object would ordinarily have.  The value of this function is used
   instead of that alignment to align the object.  */

int
ix86_data_alignment (tree type, int align)
{
-  int max_align = optimize_size ? BITS_PER_WORD : MIN (256, MAX_OFILE_ALIGNMENT);
+  int max_align = BITS_PER_WORD;

  if (AGGREGATE_TYPE_P (type)
      && TYPE_SIZE (type)
      && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
      && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= (unsigned) max_align
          || TREE_INT_CST_HIGH (TYPE_SIZE (type)))
      && align < max_align)
    align = max_align;

  /* x86-64 ABI requires arrays greater than 16 bytes to be aligned
     to 16byte boundary.  */
  if (TARGET_64BIT)
    {
      if (AGGREGATE_TYPE_P (type)
           && TYPE_SIZE (type)
           && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
           && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
               || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
        return 128;



^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-08  8:18       ` Eric Dumazet
  0 siblings, 0 replies; 90+ messages in thread
From: Eric Dumazet @ 2009-05-08  8:18 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, H. Peter Anvin, tglx, vgoyal

Sam Ravnborg a écrit :
> On Thu, May 07, 2009 at 03:26:49PM -0700, H. Peter Anvin wrote:
>> From: H. Peter Anvin <hpa@zytor.com>
>>
>> Aligning the .bss section makes it trivially faster, and makes using
>> larger transfers for the clear slightly easier.
>>
>> [ Impact: trivial performance enhancement, future patch prep ]
>>
>> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
>> ---
>>  arch/x86/boot/compressed/vmlinux.lds.S |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
>> index 0d26c92..27c168d 100644
>> --- a/arch/x86/boot/compressed/vmlinux.lds.S
>> +++ b/arch/x86/boot/compressed/vmlinux.lds.S
>> @@ -42,6 +42,7 @@ SECTIONS
>>  		*(.data.*)
>>  		_edata = . ;
>>  	}
>> +	. = ALIGN(32);
> 
> Where does this magic 32 comes from?
> I would assume the better choice would be:
> 	. = ALIGN(L1_CACHE_BYTES);
> 
> So we match the relevant CPU.
> 
> In general for alignmnet of output sections I see the need for:
> 1) Function call
> 2) L1_CACHE_BYTES
> 3) PAGE_SIZE
> 4) 2*PAGE_SIZE
> 
> But I see magic constant used here and there that does not match
> the above (when looking at all archs).
> So I act when I see a new 'magic' number..
> 

I totally agree

gcc itself has a strange 32 bytes alignement rule (unless using -Os) for 
object of a >= 32 bytes size. Did you know that ?

$ cat try.c
char foo[32] = {1};
$ gcc -O -S try.c
        .file   "try.c"
.globl foo
        .data
        .align 32            <<< HERE , what a mess >>
        .type   foo, @object
        .size   foo, 32
foo:
        .byte   1
        .zero   31
        .ident  "GCC: (GNU) 4.4.0"
        .section        .note.GNU-stack,"",@progbits


It makes many .o kernel files marked with a 2**5 alignement of .data or percpudata
At link time, it creates many holes.

In my opinion, gcc should have a separate option than -Os, as this as too expensive
side effects on the code speed.

I can save lot of data space if I patch gcc-4.4.0/config/i386/i386.c

to :

/* Compute the alignment for a static variable.
   TYPE is the data type, and ALIGN is the alignment that
   the object would ordinarily have.  The value of this function is used
   instead of that alignment to align the object.  */

int
ix86_data_alignment (tree type, int align)
{
-  int max_align = optimize_size ? BITS_PER_WORD : MIN (256, MAX_OFILE_ALIGNMENT);
+  int max_align = BITS_PER_WORD;

  if (AGGREGATE_TYPE_P (type)
      && TYPE_SIZE (type)
      && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
      && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= (unsigned) max_align
          || TREE_INT_CST_HIGH (TYPE_SIZE (type)))
      && align < max_align)
    align = max_align;

  /* x86-64 ABI requires arrays greater than 16 bytes to be aligned
     to 16byte boundary.  */
  if (TARGET_64BIT)
    {
      if (AGGREGATE_TYPE_P (type)
           && TYPE_SIZE (type)
           && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
           && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
               || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
        return 128;



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
  2009-05-08  7:36     ` Sam Ravnborg
@ 2009-05-08  9:47       ` Ingo Molnar
  -1 siblings, 0 replies; 90+ messages in thread
From: Ingo Molnar @ 2009-05-08  9:47 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	tglx, ebiederm, H. Peter Anvin


* Sam Ravnborg <sam@ravnborg.org> wrote:

> On Thu, May 07, 2009 at 03:26:51PM -0700, H. Peter Anvin wrote:
> > From: H. Peter Anvin <hpa@zytor.com>
> > 
> > Change the default for CONFIG_PHYSICAL_START to 16 MB; 4 MB if
> > EMBEDDED.  Change the default for CONFIG_PHYSICAL_ALIGN to match up
> > with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)
> > 
> > The default of 16 MB is designed to avoid occupying ZONE_DMA, as well
> > as avoiding a 15-16 MB memory hole, which some vendors inexplicably
> > still have in their systems.
> > 
> > [ Impact: minor performance improvement, leave ZONE_DMA free ]
> > 
> > Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> > ---
> >  arch/x86/Kconfig |   19 +++++++++++--------
> >  1 files changed, 11 insertions(+), 8 deletions(-)
> > 
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index 039c3f0..13b3a5a 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -1455,17 +1455,20 @@ config KEXEC_JUMP
> >  
> >  config PHYSICAL_START
> >  	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
> > -	default "0x1000000" if X86_NUMAQ
> > -	default "0x200000" if X86_64
> > -	default "0x100000"
> > +	default "0x400000" if EMBEDDED
> > +	default "0x1000000"
> >  	---help---
> >  	  This gives the physical address where the kernel is loaded.
> >  
> >  	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
> >  	  bzImage will decompress itself to above physical address and
> > -	  run from there. Otherwise, bzImage will run from the address where
> > -	  it has been loaded by the boot loader and will ignore above physical
> > -	  address.
> > +	  run from there. Otherwise, bzImage will run from the either
> > +	  the above physical address or where it has been loaded by
> > +	  the boot loader, whichever is higher.
> > +
> > +	  For embedded machines with very small memory (less than
> > +	  about 24 MB) this may need to be adjusted downward from the
> > +	  default value of 0x1000000 (16 MB).
> 
> But in the above you say that default is "0x400000" if EMBEDDED
> That is in contradiction with the help - no?

Yes, the help text is wrong.

	Ingo

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
@ 2009-05-08  9:47       ` Ingo Molnar
  0 siblings, 0 replies; 90+ messages in thread
From: Ingo Molnar @ 2009-05-08  9:47 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	tglx, H. Peter Anvin, vgoyal


* Sam Ravnborg <sam@ravnborg.org> wrote:

> On Thu, May 07, 2009 at 03:26:51PM -0700, H. Peter Anvin wrote:
> > From: H. Peter Anvin <hpa@zytor.com>
> > 
> > Change the default for CONFIG_PHYSICAL_START to 16 MB; 4 MB if
> > EMBEDDED.  Change the default for CONFIG_PHYSICAL_ALIGN to match up
> > with a large page alignment datum (4 MB for non-PAE, 2 MB for PAE.)
> > 
> > The default of 16 MB is designed to avoid occupying ZONE_DMA, as well
> > as avoiding a 15-16 MB memory hole, which some vendors inexplicably
> > still have in their systems.
> > 
> > [ Impact: minor performance improvement, leave ZONE_DMA free ]
> > 
> > Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> > ---
> >  arch/x86/Kconfig |   19 +++++++++++--------
> >  1 files changed, 11 insertions(+), 8 deletions(-)
> > 
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index 039c3f0..13b3a5a 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -1455,17 +1455,20 @@ config KEXEC_JUMP
> >  
> >  config PHYSICAL_START
> >  	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
> > -	default "0x1000000" if X86_NUMAQ
> > -	default "0x200000" if X86_64
> > -	default "0x100000"
> > +	default "0x400000" if EMBEDDED
> > +	default "0x1000000"
> >  	---help---
> >  	  This gives the physical address where the kernel is loaded.
> >  
> >  	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
> >  	  bzImage will decompress itself to above physical address and
> > -	  run from there. Otherwise, bzImage will run from the address where
> > -	  it has been loaded by the boot loader and will ignore above physical
> > -	  address.
> > +	  run from there. Otherwise, bzImage will run from the either
> > +	  the above physical address or where it has been loaded by
> > +	  the boot loader, whichever is higher.
> > +
> > +	  For embedded machines with very small memory (less than
> > +	  about 24 MB) this may need to be adjusted downward from the
> > +	  default value of 0x1000000 (16 MB).
> 
> But in the above you say that default is "0x400000" if EMBEDDED
> That is in contradiction with the help - no?

Yes, the help text is wrong.

	Ingo

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-08  7:17     ` Sam Ravnborg
@ 2009-05-08 16:54       ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 16:54 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm

Sam Ravnborg wrote:
>>  	}
>> +	. = ALIGN(32);
> 
> Where does this magic 32 comes from?
> I would assume the better choice would be:
> 	. = ALIGN(L1_CACHE_BYTES);
> 
> So we match the relevant CPU.
> 
> In general for alignmnet of output sections I see the need for:
> 1) Function call
> 2) L1_CACHE_BYTES
> 3) PAGE_SIZE
> 4) 2*PAGE_SIZE
> 
> But I see magic constant used here and there that does not match
> the above (when looking at all archs).
> So I act when I see a new 'magic' number..
> 

I picked 32 as being larger than the maximum known size that affects rep
performance, but L1_CACHE_BYTES really would make more sense, you're right.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-08 16:54       ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 16:54 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, tglx, vgoyal

Sam Ravnborg wrote:
>>  	}
>> +	. = ALIGN(32);
> 
> Where does this magic 32 comes from?
> I would assume the better choice would be:
> 	. = ALIGN(L1_CACHE_BYTES);
> 
> So we match the relevant CPU.
> 
> In general for alignmnet of output sections I see the need for:
> 1) Function call
> 2) L1_CACHE_BYTES
> 3) PAGE_SIZE
> 4) 2*PAGE_SIZE
> 
> But I see magic constant used here and there that does not match
> the above (when looking at all archs).
> So I act when I see a new 'magic' number..
> 

I picked 32 as being larger than the maximum known size that affects rep
performance, but L1_CACHE_BYTES really would make more sense, you're right.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
  2009-05-08  7:34     ` Sam Ravnborg
@ 2009-05-08 16:58       ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 16:58 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm

Sam Ravnborg wrote:
> 
> On the coding style side of thing...
>> +     movl %ebp, %ebx
>> +     cmpl %ebx, %eax
>> +     jbe 1f
>> +     movl %eax, %ebx
> 
> This looks messy with different idention of the operand.
> 
> Compare it to this:
>> +	movl	%ebp, %ebx
>> +	cmpl	%ebx, %eax
>> +	jbe	1f
>> +	movl	%eax, %ebx
> 
> 
> I like the latter more with vertical alignment of the operand.
> I see that you add spaces around operators (,) - good.

head_32.S was already written in the style with space (rather than tab)
between opcode and operands.  There was a total of three instructions
that didn't follow the pattern.  Re-styling the whole file is possible,
of course, but should be a separate patch entirely.

>>  	pushl %esi
>> -	leal _ebss(%ebp), %esi
>> -	leal _ebss(%ebx), %edi
>> -	movl $(_ebss - startup_32), %ecx
>> +	leal (_bss-4)(%ebp), %esi
>> +	leal (_bss-4)(%ebx), %edi
>> +	movl $(_bss - startup_32), %ecx
>> +	shrl $2, %ecx
> 
> I do not see why you mess around with _bss here?
> Do you use .bss for decompression?

This chunk of code is about moving the initialized segments into place.
 Moving the contents of the bss is a bug (and it clobbers the stack, the
setup of which I moved earlier in the code.)

However, using _edata would give an unaligned symbol, so use _bss
instead as being an aligned symbol at the beginning of the _bss; we thus
move the range from startup_32 to _bss.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable
@ 2009-05-08 16:58       ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 16:58 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, tglx, vgoyal

Sam Ravnborg wrote:
> 
> On the coding style side of thing...
>> +     movl %ebp, %ebx
>> +     cmpl %ebx, %eax
>> +     jbe 1f
>> +     movl %eax, %ebx
> 
> This looks messy with different idention of the operand.
> 
> Compare it to this:
>> +	movl	%ebp, %ebx
>> +	cmpl	%ebx, %eax
>> +	jbe	1f
>> +	movl	%eax, %ebx
> 
> 
> I like the latter more with vertical alignment of the operand.
> I see that you add spaces around operators (,) - good.

head_32.S was already written in the style with space (rather than tab)
between opcode and operands.  There was a total of three instructions
that didn't follow the pattern.  Re-styling the whole file is possible,
of course, but should be a separate patch entirely.

>>  	pushl %esi
>> -	leal _ebss(%ebp), %esi
>> -	leal _ebss(%ebx), %edi
>> -	movl $(_ebss - startup_32), %ecx
>> +	leal (_bss-4)(%ebp), %esi
>> +	leal (_bss-4)(%ebx), %edi
>> +	movl $(_bss - startup_32), %ecx
>> +	shrl $2, %ecx
> 
> I do not see why you mess around with _bss here?
> Do you use .bss for decompression?

This chunk of code is about moving the initialized segments into place.
 Moving the contents of the bss is a bug (and it clobbers the stack, the
setup of which I moved earlier in the code.)

However, using _edata would give an unaligned symbol, so use _bss
instead as being an aligned symbol at the beginning of the _bss; we thus
move the range from startup_32 to _bss.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
  2009-05-08  7:36     ` Sam Ravnborg
@ 2009-05-08 17:01       ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 17:01 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm

Sam Ravnborg wrote:
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index 039c3f0..13b3a5a 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -1455,17 +1455,20 @@ config KEXEC_JUMP
>>  
>>  config PHYSICAL_START
>>  	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
>> -	default "0x1000000" if X86_NUMAQ
>> -	default "0x200000" if X86_64
>> -	default "0x100000"
>> +	default "0x400000" if EMBEDDED
>> +	default "0x1000000"
>>  	---help---
>>  	  This gives the physical address where the kernel is loaded.
>>  
>>  	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
>>  	  bzImage will decompress itself to above physical address and
>> -	  run from there. Otherwise, bzImage will run from the address where
>> -	  it has been loaded by the boot loader and will ignore above physical
>> -	  address.
>> +	  run from there. Otherwise, bzImage will run from the either
>> +	  the above physical address or where it has been loaded by
>> +	  the boot loader, whichever is higher.
>> +
>> +	  For embedded machines with very small memory (less than
>> +	  about 24 MB) this may need to be adjusted downward from the
>> +	  default value of 0x1000000 (16 MB).
> 
> But in the above you say that default is "0x400000" if EMBEDDED
> That is in contradiction with the help - no?
> 

0x1000000 really should be the default value.  The "0x400000" if
EMBEDDED I put in to make the risk of throwing something surprising on
embedded people somewhat smaller; I'm not sure if it should go away
entirely.  Even if it doesn't, I do think referring to 16 MB as the
"default value" is right.

BTW, it would be nice to have Kconfig deal with:

a) numbers that must be powers of 2;
b) suffixes like "16M" instead of "0x1000000".  ;)

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN
@ 2009-05-08 17:01       ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 17:01 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, tglx, vgoyal

Sam Ravnborg wrote:
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index 039c3f0..13b3a5a 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -1455,17 +1455,20 @@ config KEXEC_JUMP
>>  
>>  config PHYSICAL_START
>>  	hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
>> -	default "0x1000000" if X86_NUMAQ
>> -	default "0x200000" if X86_64
>> -	default "0x100000"
>> +	default "0x400000" if EMBEDDED
>> +	default "0x1000000"
>>  	---help---
>>  	  This gives the physical address where the kernel is loaded.
>>  
>>  	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
>>  	  bzImage will decompress itself to above physical address and
>> -	  run from there. Otherwise, bzImage will run from the address where
>> -	  it has been loaded by the boot loader and will ignore above physical
>> -	  address.
>> +	  run from there. Otherwise, bzImage will run from the either
>> +	  the above physical address or where it has been loaded by
>> +	  the boot loader, whichever is higher.
>> +
>> +	  For embedded machines with very small memory (less than
>> +	  about 24 MB) this may need to be adjusted downward from the
>> +	  default value of 0x1000000 (16 MB).
> 
> But in the above you say that default is "0x400000" if EMBEDDED
> That is in contradiction with the help - no?
> 

0x1000000 really should be the default value.  The "0x400000" if
EMBEDDED I put in to make the risk of throwing something surprising on
embedded people somewhat smaller; I'm not sure if it should go away
entirely.  Even if it doesn't, I do think referring to 16 MB as the
"default value" is right.

BTW, it would be nice to have Kconfig deal with:

a) numbers that must be powers of 2;
b) suffixes like "16M" instead of "0x1000000".  ;)

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-08  7:53     ` Cyrill Gorcunov
@ 2009-05-08 17:03       ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 17:03 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm, sam

Cyrill Gorcunov wrote:
> | 
> | diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
> | index 0d26c92..27c168d 100644
> | --- a/arch/x86/boot/compressed/vmlinux.lds.S
> | +++ b/arch/x86/boot/compressed/vmlinux.lds.S
> | @@ -42,6 +42,7 @@ SECTIONS
> |  		*(.data.*)
> |  		_edata = . ;
> |  	}
> | +	. = ALIGN(32);
> |  	.bss : {
> |  		_bss = . ;
> |  		*(.bss)
> | -- 
> | 1.6.0.6
> | 
> 
> Hi Peter, should not it be ALIGN(8) rather? I thought
> we keep these sections as tight as possible in a sake
> of limitation of setup code size. Perhaps I miss something.
> 

This isn't the setup code at all.  This is the actual kernel, although
in its compressed form.  Furthermore, this is the bss, so it doesn't
affect the compressed image size.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-08 17:03       ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 17:03 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, sam, tglx, vgoyal

Cyrill Gorcunov wrote:
> | 
> | diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
> | index 0d26c92..27c168d 100644
> | --- a/arch/x86/boot/compressed/vmlinux.lds.S
> | +++ b/arch/x86/boot/compressed/vmlinux.lds.S
> | @@ -42,6 +42,7 @@ SECTIONS
> |  		*(.data.*)
> |  		_edata = . ;
> |  	}
> | +	. = ALIGN(32);
> |  	.bss : {
> |  		_bss = . ;
> |  		*(.bss)
> | -- 
> | 1.6.0.6
> | 
> 
> Hi Peter, should not it be ALIGN(8) rather? I thought
> we keep these sections as tight as possible in a sake
> of limitation of setup code size. Perhaps I miss something.
> 

This isn't the setup code at all.  This is the actual kernel, although
in its compressed form.  Furthermore, this is the bss, so it doesn't
affect the compressed image size.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-08 17:03       ` H. Peter Anvin
@ 2009-05-08 17:15         ` Cyrill Gorcunov
  -1 siblings, 0 replies; 90+ messages in thread
From: Cyrill Gorcunov @ 2009-05-08 17:15 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm, sam

[H. Peter Anvin - Fri, May 08, 2009 at 10:03:34AM -0700]
| Cyrill Gorcunov wrote:
| > | 
| > | diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
| > | index 0d26c92..27c168d 100644
| > | --- a/arch/x86/boot/compressed/vmlinux.lds.S
| > | +++ b/arch/x86/boot/compressed/vmlinux.lds.S
| > | @@ -42,6 +42,7 @@ SECTIONS
| > |  		*(.data.*)
| > |  		_edata = . ;
| > |  	}
| > | +	. = ALIGN(32);
| > |  	.bss : {
| > |  		_bss = . ;
| > |  		*(.bss)
| > | -- 
| > | 1.6.0.6
| > | 
| > 
| > Hi Peter, should not it be ALIGN(8) rather? I thought
| > we keep these sections as tight as possible in a sake
| > of limitation of setup code size. Perhaps I miss something.
| > 
| 
| This isn't the setup code at all.  This is the actual kernel, although
| in its compressed form.  Furthermore, this is the bss, so it doesn't
| affect the compressed image size.
| 
| 	-hpa
| 

yeah, unfortunately I reveal that when my mail already gone.
though I don't understand why 32 is there... could you please?

	-- Cyrill

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-08 17:15         ` Cyrill Gorcunov
  0 siblings, 0 replies; 90+ messages in thread
From: Cyrill Gorcunov @ 2009-05-08 17:15 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, sam, tglx, vgoyal

[H. Peter Anvin - Fri, May 08, 2009 at 10:03:34AM -0700]
| Cyrill Gorcunov wrote:
| > | 
| > | diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
| > | index 0d26c92..27c168d 100644
| > | --- a/arch/x86/boot/compressed/vmlinux.lds.S
| > | +++ b/arch/x86/boot/compressed/vmlinux.lds.S
| > | @@ -42,6 +42,7 @@ SECTIONS
| > |  		*(.data.*)
| > |  		_edata = . ;
| > |  	}
| > | +	. = ALIGN(32);
| > |  	.bss : {
| > |  		_bss = . ;
| > |  		*(.bss)
| > | -- 
| > | 1.6.0.6
| > | 
| > 
| > Hi Peter, should not it be ALIGN(8) rather? I thought
| > we keep these sections as tight as possible in a sake
| > of limitation of setup code size. Perhaps I miss something.
| > 
| 
| This isn't the setup code at all.  This is the actual kernel, although
| in its compressed form.  Furthermore, this is the bss, so it doesn't
| affect the compressed image size.
| 
| 	-hpa
| 

yeah, unfortunately I reveal that when my mail already gone.
though I don't understand why 32 is there... could you please?

	-- Cyrill

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
  2009-05-08 17:15         ` Cyrill Gorcunov
@ 2009-05-08 17:21           ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 17:21 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm, sam

Cyrill Gorcunov wrote:
> 
> yeah, unfortunately I reveal that when my mail already gone.
> though I don't understand why 32 is there... could you please?
> 

See my answer to Sam asking the same question.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
@ 2009-05-08 17:21           ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 17:21 UTC (permalink / raw)
  To: Cyrill Gorcunov
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, sam, tglx, vgoyal

Cyrill Gorcunov wrote:
> 
> yeah, unfortunately I reveal that when my mail already gone.
> though I don't understand why 32 is there... could you please?
> 

See my answer to Sam asking the same question.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
  2009-05-08  6:54       ` Eric W. Biederman
@ 2009-05-08 18:04         ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 18:04 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, sam

Eric W. Biederman wrote:
>>
>>> The direction of this patch seems reasonable.  The details are broken.
>>> The common case for relocatable kernels today is kdump.  A situation
>>> with very minimal memory.  In that situation the kernel needs to run
>>> where we put it, modifying the kernel to not run where it gets put
>>> is a problem.
>> I thought in the kdump case you typically loaded it pretty high?  Either
>> which way, kdump is always loaded by kexec, so it should just be a
>> matter of updating kexec to zero the runtime_start field, no?
> 
> Yes.  In practice it doesn't matter. I just don't want to get into a
> contest with the kernel about who knows better how to put the kernel
> in memory the bootloader or the kernel decompressor.
> 
>> Basically
>> this is the bootloader saying "do what I say, dammit."  Since the
>> existing protocol doesn't have a way to unambiguously communicate one
>> direction versus another (see below), it seems like a relatively small
>> issue involving only one tool.  Suboptimal, yes.
> 
> The existing protocol doesn't have the option of anything else.
> 
> Physical start has always been <= the alignment for x86 and x86_64,
> in any real world configuration.

That assumption seems to be the fundamental flaw of the relocation
protocol as written, and rather quite what provoked this whole thing.
We really would want to run at above 16 MB for not just 15 MB hole but
also for ZONE_DMA reasons.

> Something goofy may have happened during unification, I thought I had
> removed physical start as totally unnecessary from x86_64.
> 
> In the non-kdump case this is interesting.  I know of instances where
> kexec is burned in firmware.  So I am strongly reluctant to make anything
> that feels like a true backwards incompatible change.
> 
> Those systems also don't have the stupid 15MB hole either.

OK, kexec in firmware is probably a showstopper... assuming *those*
kexec instances care about the exact final location of the code.
Otherwise, if all they are doing is loading the kernel and want it to
take over the machine, the proposed behavior (realign the kernel to a
more optimal point) is pretty much The Right Thing.  Could you expand on
this use case?  This seems like a key piece of the puzzle.

It's pretty well understood that we can't require changes for the tons
of deployed bootloaders, but at the same time we're stuck in a case with
overloading semantics that have to be disambiguated.

> On the 64bit kernel 2MB really is required.  We run at a fixed virtual
> address and use 2MB pages. So anything less that 2MB really won't work.
> 
> So I think it would be a bad idea if we had bootloaders ignoring the
> alignment.
> 
> With the suggested start address, it probably make sense to only
> export our true alignment requirement.

On 32 bits (which is the only case where one megabyte could possibly
matter) we *can* run at 1 MB, and that was the main case I was worrying
about there.  On the other hand, even very early Linux just barely ran
in 4 MB of RAM, and perhaps an alignment restriction of 4 MB (the
non-PAE case) handles even the smallest configurations?  If so we can
probably get away with just disallowing alignment < 2 MB and use your
solution.

>>> I expect we will still want to update kexec to be able to take
>>> advantage of loadtime_size (runtime_size seems like the wrong name).
>> Well, it is the amount of memory the kernel needs during runtime (as
>> opposed to during loading.)  I admit it's not an ideal name, though.  On
>> the other hand, simply calling it kernel_start and kernel_size seemed
>> ambiguous.
> 
> It is the amount of memory we need before a true memory allocator is
> initialized.  Essentially text+data+bss.  How about we call it init_size?
> 
> Perhaps we should have:
> init_size
> best start (As a 64bit field please)
> optimum align  (Or we flip it around)

I did think about that (64 bits), but I came to the conclusion that in
any case were we're supporting loading over 4 GB we need to be fully
relocatable anyway -- plus we need a whole bunch of other protocol
changes.  This is not in itself a reason not to do it, but the size of
the initialized header is limited to just over 127 bytes without a much
bigger change (since the size of the structure has to fit inside a
single signed byte at 0x201).

	-hpa

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
@ 2009-05-08 18:04         ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 18:04 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: kexec, linux-kernel, hbabu, ying.huang, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

Eric W. Biederman wrote:
>>
>>> The direction of this patch seems reasonable.  The details are broken.
>>> The common case for relocatable kernels today is kdump.  A situation
>>> with very minimal memory.  In that situation the kernel needs to run
>>> where we put it, modifying the kernel to not run where it gets put
>>> is a problem.
>> I thought in the kdump case you typically loaded it pretty high?  Either
>> which way, kdump is always loaded by kexec, so it should just be a
>> matter of updating kexec to zero the runtime_start field, no?
> 
> Yes.  In practice it doesn't matter. I just don't want to get into a
> contest with the kernel about who knows better how to put the kernel
> in memory the bootloader or the kernel decompressor.
> 
>> Basically
>> this is the bootloader saying "do what I say, dammit."  Since the
>> existing protocol doesn't have a way to unambiguously communicate one
>> direction versus another (see below), it seems like a relatively small
>> issue involving only one tool.  Suboptimal, yes.
> 
> The existing protocol doesn't have the option of anything else.
> 
> Physical start has always been <= the alignment for x86 and x86_64,
> in any real world configuration.

That assumption seems to be the fundamental flaw of the relocation
protocol as written, and rather quite what provoked this whole thing.
We really would want to run at above 16 MB for not just 15 MB hole but
also for ZONE_DMA reasons.

> Something goofy may have happened during unification, I thought I had
> removed physical start as totally unnecessary from x86_64.
> 
> In the non-kdump case this is interesting.  I know of instances where
> kexec is burned in firmware.  So I am strongly reluctant to make anything
> that feels like a true backwards incompatible change.
> 
> Those systems also don't have the stupid 15MB hole either.

OK, kexec in firmware is probably a showstopper... assuming *those*
kexec instances care about the exact final location of the code.
Otherwise, if all they are doing is loading the kernel and want it to
take over the machine, the proposed behavior (realign the kernel to a
more optimal point) is pretty much The Right Thing.  Could you expand on
this use case?  This seems like a key piece of the puzzle.

It's pretty well understood that we can't require changes for the tons
of deployed bootloaders, but at the same time we're stuck in a case with
overloading semantics that have to be disambiguated.

> On the 64bit kernel 2MB really is required.  We run at a fixed virtual
> address and use 2MB pages. So anything less that 2MB really won't work.
> 
> So I think it would be a bad idea if we had bootloaders ignoring the
> alignment.
> 
> With the suggested start address, it probably make sense to only
> export our true alignment requirement.

On 32 bits (which is the only case where one megabyte could possibly
matter) we *can* run at 1 MB, and that was the main case I was worrying
about there.  On the other hand, even very early Linux just barely ran
in 4 MB of RAM, and perhaps an alignment restriction of 4 MB (the
non-PAE case) handles even the smallest configurations?  If so we can
probably get away with just disallowing alignment < 2 MB and use your
solution.

>>> I expect we will still want to update kexec to be able to take
>>> advantage of loadtime_size (runtime_size seems like the wrong name).
>> Well, it is the amount of memory the kernel needs during runtime (as
>> opposed to during loading.)  I admit it's not an ideal name, though.  On
>> the other hand, simply calling it kernel_start and kernel_size seemed
>> ambiguous.
> 
> It is the amount of memory we need before a true memory allocator is
> initialized.  Essentially text+data+bss.  How about we call it init_size?
> 
> Perhaps we should have:
> init_size
> best start (As a 64bit field please)
> optimum align  (Or we flip it around)

I did think about that (64 bits), but I came to the conclusion that in
any case were we're supporting loading over 4 GB we need to be fully
relocatable anyway -- plus we need a whole bunch of other protocol
changes.  This is not in itself a reason not to do it, but the size of
the initialized header is limited to just over 127 bytes without a much
bigger change (since the size of the structure has to fit inside a
single signed byte at 0x201).

	-hpa

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
  2009-05-08  6:54       ` Eric W. Biederman
@ 2009-05-08 18:47         ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 18:47 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, Huang, Ying,
	mingo, tglx, sam

Eric W. Biederman wrote:
> 
> Perhaps we should have:
> init_size
> best start (As a 64bit field please)
> optimum align  (Or we flip it around)
> 

Thinking about this some more, I think you have a very good idea here.

Specifically, if we retcon the existing kernel_alignment field as 
"preferred alignment" (ignoring the naming issue for a bit), we can set 
that to 16 MB, which should give us correct behavior for all previously 
existing bootloaders.  Then we create a new "minimum alignment" field 
that newer bootloaders can use to relax the alignment requirement -- all 
the way down to 4K in the case of i386.  We document this field 
indicating that the bootloader should find the highest power of 2 <= 
preferred alignment, but down to this number.

The preferred address field becomes a readonly, advisory field; with it 
being readonly there aren't any funny issues with a strange loader 
writing a 64-bit address for a kernel which can't handle it (64-bit 
loading will still need substantial protocol changes, including how to 
find the entry point.)

Does that work for you?  That *should* address all your concerns, right?

	-hpa


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 00/14] RFC: x86: relocatable kernel changes
@ 2009-05-08 18:47         ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 18:47 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: kexec, linux-kernel, hbabu, Huang, Ying, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

Eric W. Biederman wrote:
> 
> Perhaps we should have:
> init_size
> best start (As a 64bit field please)
> optimum align  (Or we flip it around)
> 

Thinking about this some more, I think you have a very good idea here.

Specifically, if we retcon the existing kernel_alignment field as 
"preferred alignment" (ignoring the naming issue for a bit), we can set 
that to 16 MB, which should give us correct behavior for all previously 
existing bootloaders.  Then we create a new "minimum alignment" field 
that newer bootloaders can use to relax the alignment requirement -- all 
the way down to 4K in the case of i386.  We document this field 
indicating that the bootloader should find the highest power of 2 <= 
preferred alignment, but down to this number.

The preferred address field becomes a readonly, advisory field; with it 
being readonly there aren't any funny issues with a strange loader 
writing a 64-bit address for a kernel which can't handle it (64-bit 
loading will still need substantial protocol changes, including how to 
find the entry point.)

Does that work for you?  That *should* address all your concerns, right?

	-hpa


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
  2009-05-08  7:42     ` Sam Ravnborg
@ 2009-05-08 20:18       ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 20:18 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin

Sam Ravnborg wrote:
>> diff --git a/scripts/bin_size b/scripts/bin_size
>> index 43e1b36..55f2161 100644
>> --- a/scripts/bin_size
>> +++ b/scripts/bin_size
>> @@ -1,10 +1,14 @@
>>  #!/bin/sh
>>  
>>  if [ $# = 0 ] ; then
>> -   echo Usage: $0 file
>> +   echo Usage: $0 file...
>>  fi
>>  
>> -size_dec=`stat -c "%s" $1`
>> +size_dec=0
>> +for file; do
>> +  fsize=`stat -c "%s" $file`
>> +  size_dec=`expr $size_dec + $fsize`
>> +done
>>  size_hex_echo_string=`printf "%08x" $size_dec |
>>       sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
>>  /bin/echo -ne $size_hex_echo_string
> 
> But I would rather have had this inside makefile.lib...
> 

It's messy enough as a shell script... it seems like baking it into 
Makefile syntax would make it even worse.

	-hpa


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
@ 2009-05-08 20:18       ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 20:18 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, tglx, vgoyal

Sam Ravnborg wrote:
>> diff --git a/scripts/bin_size b/scripts/bin_size
>> index 43e1b36..55f2161 100644
>> --- a/scripts/bin_size
>> +++ b/scripts/bin_size
>> @@ -1,10 +1,14 @@
>>  #!/bin/sh
>>  
>>  if [ $# = 0 ] ; then
>> -   echo Usage: $0 file
>> +   echo Usage: $0 file...
>>  fi
>>  
>> -size_dec=`stat -c "%s" $1`
>> +size_dec=0
>> +for file; do
>> +  fsize=`stat -c "%s" $file`
>> +  size_dec=`expr $size_dec + $fsize`
>> +done
>>  size_hex_echo_string=`printf "%08x" $size_dec |
>>       sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
>>  /bin/echo -ne $size_hex_echo_string
> 
> But I would rather have had this inside makefile.lib...
> 

It's messy enough as a shell script... it seems like baking it into 
Makefile syntax would make it even worse.

	-hpa


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
  2009-05-08 20:18       ` H. Peter Anvin
@ 2009-05-08 20:47         ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08 20:47 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, vgoyal, hbabu, kexec, ying.huang, mingo, tglx,
	ebiederm, H. Peter Anvin

On Fri, May 08, 2009 at 01:18:56PM -0700, H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> >>diff --git a/scripts/bin_size b/scripts/bin_size
> >>index 43e1b36..55f2161 100644
> >>--- a/scripts/bin_size
> >>+++ b/scripts/bin_size
> >>@@ -1,10 +1,14 @@
> >> #!/bin/sh
> >> 
> >> if [ $# = 0 ] ; then
> >>-   echo Usage: $0 file
> >>+   echo Usage: $0 file...
> >> fi
> >> 
> >>-size_dec=`stat -c "%s" $1`
> >>+size_dec=0
> >>+for file; do
> >>+  fsize=`stat -c "%s" $file`
> >>+  size_dec=`expr $size_dec + $fsize`
> >>+done
> >> size_hex_echo_string=`printf "%08x" $size_dec |
> >>      sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
> >> /bin/echo -ne $size_hex_echo_string
> >
> >But I would rather have had this inside makefile.lib...
> >
> 
> It's messy enough as a shell script... it seems like baking it into 
> Makefile syntax would make it even worse.

I did a quick attempt to integrate it in the Makefile - not pretty.
So I dropped that idea.

It is mainly that we should not fill up scripts/ with small
undocumented scripts.

Could you add something like this in the top of the file:

# Find the sum of the size of all files specified and
# output the size as an escaped hex string.
#
# Sample:
# $ ls -l foo
# $ -rw-rw-r-- 1 xxx xxx 146 May  8 22:28 foo
# $ bin_size foo
# $ \\x92\\x00\\x00\\x00
# 146 equals 92 hex

	Sam

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
@ 2009-05-08 20:47         ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08 20:47 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, kexec, linux-kernel, hbabu, ebiederm, ying.huang,
	mingo, tglx, vgoyal

On Fri, May 08, 2009 at 01:18:56PM -0700, H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> >>diff --git a/scripts/bin_size b/scripts/bin_size
> >>index 43e1b36..55f2161 100644
> >>--- a/scripts/bin_size
> >>+++ b/scripts/bin_size
> >>@@ -1,10 +1,14 @@
> >> #!/bin/sh
> >> 
> >> if [ $# = 0 ] ; then
> >>-   echo Usage: $0 file
> >>+   echo Usage: $0 file...
> >> fi
> >> 
> >>-size_dec=`stat -c "%s" $1`
> >>+size_dec=0
> >>+for file; do
> >>+  fsize=`stat -c "%s" $file`
> >>+  size_dec=`expr $size_dec + $fsize`
> >>+done
> >> size_hex_echo_string=`printf "%08x" $size_dec |
> >>      sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
> >> /bin/echo -ne $size_hex_echo_string
> >
> >But I would rather have had this inside makefile.lib...
> >
> 
> It's messy enough as a shell script... it seems like baking it into 
> Makefile syntax would make it even worse.

I did a quick attempt to integrate it in the Makefile - not pretty.
So I dropped that idea.

It is mainly that we should not fill up scripts/ with small
undocumented scripts.

Could you add something like this in the top of the file:

# Find the sum of the size of all files specified and
# output the size as an escaped hex string.
#
# Sample:
# $ ls -l foo
# $ -rw-rw-r-- 1 xxx xxx 146 May  8 22:28 foo
# $ bin_size foo
# $ \\x92\\x00\\x00\\x00
# 146 equals 92 hex

	Sam

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
  2009-05-08 20:47         ` Sam Ravnborg
@ 2009-05-08 20:49           ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 20:49 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm

Sam Ravnborg wrote:
> 
> I did a quick attempt to integrate it in the Makefile - not pretty.
> So I dropped that idea.
> 
> It is mainly that we should not fill up scripts/ with small
> undocumented scripts.
> 
> Could you add something like this in the top of the file:
> 
> # Find the sum of the size of all files specified and
> # output the size as an escaped hex string.
> #
> # Sample:
> # $ ls -l foo
> # $ -rw-rw-r-- 1 xxx xxx 146 May  8 22:28 foo
> # $ bin_size foo
> # $ \\x92\\x00\\x00\\x00
> # 146 equals 92 hex
> 

OK, I see your point (especially since that's not what it does.)

To be honest, how ugly would it be to get a C program in here?  Doing 
this in shell is horrid, and people tend to whine about Perl (which is 
perfect for this kind of job.)

	-hpa


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
@ 2009-05-08 20:49           ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 20:49 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, tglx, vgoyal

Sam Ravnborg wrote:
> 
> I did a quick attempt to integrate it in the Makefile - not pretty.
> So I dropped that idea.
> 
> It is mainly that we should not fill up scripts/ with small
> undocumented scripts.
> 
> Could you add something like this in the top of the file:
> 
> # Find the sum of the size of all files specified and
> # output the size as an escaped hex string.
> #
> # Sample:
> # $ ls -l foo
> # $ -rw-rw-r-- 1 xxx xxx 146 May  8 22:28 foo
> # $ bin_size foo
> # $ \\x92\\x00\\x00\\x00
> # 146 equals 92 hex
> 

OK, I see your point (especially since that's not what it does.)

To be honest, how ugly would it be to get a C program in here?  Doing 
this in shell is horrid, and people tend to whine about Perl (which is 
perfect for this kind of job.)

	-hpa


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
  2009-05-08  7:55     ` Sam Ravnborg
@ 2009-05-08 21:09       ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 21:09 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm, Jeremy Fitzhardinge

Sam Ravnborg wrote:
>>  	@:
>> @@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
>>  suffix_$(CONFIG_KERNEL_BZIP2) = bz2
>>  suffix_$(CONFIG_KERNEL_LZMA)  = lzma
> 
> No need for a recursive assignment here. Use ":="
> Ann we usually uses "-y" not "_y".
> 

Wasn't part of the patch, but OK :)

	-hpa

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
@ 2009-05-08 21:09       ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-08 21:09 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Jeremy Fitzhardinge, kexec, linux-kernel, hbabu, ebiederm,
	ying.huang, mingo, H. Peter Anvin, tglx, vgoyal

Sam Ravnborg wrote:
>>  	@:
>> @@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
>>  suffix_$(CONFIG_KERNEL_BZIP2) = bz2
>>  suffix_$(CONFIG_KERNEL_LZMA)  = lzma
> 
> No need for a recursive assignment here. Use ":="
> Ann we usually uses "-y" not "_y".
> 

Wasn't part of the patch, but OK :)

	-hpa

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
  2009-05-08 20:49           ` H. Peter Anvin
@ 2009-05-08 21:33             ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08 21:33 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm

On Fri, May 08, 2009 at 01:49:57PM -0700, H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> >
> >I did a quick attempt to integrate it in the Makefile - not pretty.
> >So I dropped that idea.
> >
> >It is mainly that we should not fill up scripts/ with small
> >undocumented scripts.
> >
> >Could you add something like this in the top of the file:
> >
> ># Find the sum of the size of all files specified and
> ># output the size as an escaped hex string.
> >#
> ># Sample:
> ># $ ls -l foo
> ># $ -rw-rw-r-- 1 xxx xxx 146 May  8 22:28 foo
> ># $ bin_size foo
> ># $ \\x92\\x00\\x00\\x00
> ># 146 equals 92 hex
> >
> 
> OK, I see your point (especially since that's not what it does.)
> 
> To be honest, how ugly would it be to get a C program in here?  Doing 
> this in shell is horrid, and people tend to whine about Perl (which is 
> perfect for this kind of job.)

Lets just include it in the Makefile and be done with it.
I took our patch and ended up with this - untested - patch.

If you are OK with this you can add my:
Acked-by: Sam Ravnborg <sam@ravnborg.org>


I forgot to delete bin_size - it is no longer needed...

	Sam


diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index cba61ca..827ebf6 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -188,20 +188,34 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
 # ---------------------------------------------------------------------------
 
 quiet_cmd_gzip = GZIP    $@
-cmd_gzip = gzip -f -9 < $< > $@
+cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
+	(rm -f $@ ; false)
 
 
 # Bzip2
 # ---------------------------------------------------------------------------
 
 # Bzip2 does not include size in file... so we have to fake that
-size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
+size_append = $(shell                                             \
+dec_size=0;                                                       \
+for F in $1; do                                                   \
+	fsize=$$(stat -c "%s" $$F);                               \
+	dec_size=$$(expr $$dec_size + $$fsize);                   \
+done;                                                             \
+hex=$$(printf "%08x" $$dec_size |                                 \
+sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'); \
+echo -ne $$hex                                                    \
+)
 
 quiet_cmd_bzip2 = BZIP2    $@
-cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
+cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
+	bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
+	(rm -f $@ ; false)
 
 # Lzma
 # ---------------------------------------------------------------------------
 
 quiet_cmd_lzma = LZMA    $@
-cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
+cmd_lzma = (cat $(filter-out FORCE,$^) | \
+	lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
+	(rm -f $@ ; false)

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* Re: [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
@ 2009-05-08 21:33             ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08 21:33 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: kexec, linux-kernel, hbabu, ebiederm, ying.huang, mingo,
	H. Peter Anvin, tglx, vgoyal

On Fri, May 08, 2009 at 01:49:57PM -0700, H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> >
> >I did a quick attempt to integrate it in the Makefile - not pretty.
> >So I dropped that idea.
> >
> >It is mainly that we should not fill up scripts/ with small
> >undocumented scripts.
> >
> >Could you add something like this in the top of the file:
> >
> ># Find the sum of the size of all files specified and
> ># output the size as an escaped hex string.
> >#
> ># Sample:
> ># $ ls -l foo
> ># $ -rw-rw-r-- 1 xxx xxx 146 May  8 22:28 foo
> ># $ bin_size foo
> ># $ \\x92\\x00\\x00\\x00
> ># 146 equals 92 hex
> >
> 
> OK, I see your point (especially since that's not what it does.)
> 
> To be honest, how ugly would it be to get a C program in here?  Doing 
> this in shell is horrid, and people tend to whine about Perl (which is 
> perfect for this kind of job.)

Lets just include it in the Makefile and be done with it.
I took our patch and ended up with this - untested - patch.

If you are OK with this you can add my:
Acked-by: Sam Ravnborg <sam@ravnborg.org>


I forgot to delete bin_size - it is no longer needed...

	Sam


diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index cba61ca..827ebf6 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -188,20 +188,34 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
 # ---------------------------------------------------------------------------
 
 quiet_cmd_gzip = GZIP    $@
-cmd_gzip = gzip -f -9 < $< > $@
+cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
+	(rm -f $@ ; false)
 
 
 # Bzip2
 # ---------------------------------------------------------------------------
 
 # Bzip2 does not include size in file... so we have to fake that
-size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
+size_append = $(shell                                             \
+dec_size=0;                                                       \
+for F in $1; do                                                   \
+	fsize=$$(stat -c "%s" $$F);                               \
+	dec_size=$$(expr $$dec_size + $$fsize);                   \
+done;                                                             \
+hex=$$(printf "%08x" $$dec_size |                                 \
+sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'); \
+echo -ne $$hex                                                    \
+)
 
 quiet_cmd_bzip2 = BZIP2    $@
-cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
+cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
+	bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
+	(rm -f $@ ; false)
 
 # Lzma
 # ---------------------------------------------------------------------------
 
 quiet_cmd_lzma = LZMA    $@
-cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
+cmd_lzma = (cat $(filter-out FORCE,$^) | \
+	lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
+	(rm -f $@ ; false)

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
  2009-05-08 21:09       ` H. Peter Anvin
@ 2009-05-08 21:35         ` Sam Ravnborg
  -1 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08 21:35 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, ying.huang,
	mingo, tglx, ebiederm, Jeremy Fitzhardinge

On Fri, May 08, 2009 at 02:09:20PM -0700, H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> >> 	@:
> >>@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
> >> suffix_$(CONFIG_KERNEL_BZIP2) = bz2
> >> suffix_$(CONFIG_KERNEL_LZMA)  = lzma
> >
> >No need for a recursive assignment here. Use ":="
> >Ann we usually uses "-y" not "_y".
> >
> 
> Wasn't part of the patch, but OK :)

I overlooked that fact - I often just review what I can see.
(In other words - I should have caught that detail when the original
patch was posted...)

	Sam

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields
@ 2009-05-08 21:35         ` Sam Ravnborg
  0 siblings, 0 replies; 90+ messages in thread
From: Sam Ravnborg @ 2009-05-08 21:35 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Jeremy Fitzhardinge, kexec, linux-kernel, hbabu, ebiederm,
	ying.huang, mingo, H. Peter Anvin, tglx, vgoyal

On Fri, May 08, 2009 at 02:09:20PM -0700, H. Peter Anvin wrote:
> Sam Ravnborg wrote:
> >> 	@:
> >>@@ -50,6 +53,9 @@ suffix_$(CONFIG_KERNEL_GZIP)  = gz
> >> suffix_$(CONFIG_KERNEL_BZIP2) = bz2
> >> suffix_$(CONFIG_KERNEL_LZMA)  = lzma
> >
> >No need for a recursive assignment here. Use ":="
> >Ann we usually uses "-y" not "_y".
> >
> 
> Wasn't part of the patch, but OK :)

I overlooked that fact - I often just review what I can see.
(In other words - I should have caught that detail when the original
patch was posted...)

	Sam

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* RFC: x86: relocatable kernel changes (revised spec)
  2009-05-08 18:47         ` H. Peter Anvin
@ 2009-05-11  5:18           ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-11  5:18 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, Huang, Ying,
	mingo, tglx, sam

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

Revised proposal to address Eric's comments.  This is intended to
provide full backwards compatibility while at the same time giving us
the future flexibility.

The intent will be to set by default:

	kernel_alignment	= 16 MB
	min_alignment		= log2(4K) or log2(2M)
	pref_address		= 16 MB

The reason to represent min_alignment as a logarithm is that I'm getting
very concerned about the diminishing space that is left without a
fundamental change to the initialized part of the header; specifically,
right now we rely on the signed byte at offset 0x201 to contain the
(additional) size of the header, which means end at 0x281 without a
major format change of some sort.

Comments appreciated.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 3886 bytes --]

diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index e020366..ccc1bd4 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -50,6 +50,11 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
 Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
 		pointer to single linked list of struct	setup_data.
 
+Protocol 2.10:	(Kernel 2.6.31?) A protocol for relaxed alignment
+	 	beyond the kernel_alignment added, new init_size and
+	 	pref_address fields.
+	 	
+
 **** MEMORY LAYOUT
 
 The traditional memory map for the kernel loader, used for Image or
@@ -173,7 +178,7 @@ Offset	Proto	Name		Meaning
 022C/4	2.03+	ramdisk_max	Highest legal initrd address
 0230/4	2.05+	kernel_alignment Physical addr alignment required for kernel
 0234/1	2.05+	relocatable_kernel Whether kernel is relocatable or not
-0235/1	N/A	pad2		Unused
+0235/1	2.10+	min_alignment	Minimum alignment, as a power of 2
 0236/2	N/A	pad3		Unused
 0238/4	2.06+	cmdline_size	Maximum size of the kernel command line
 023C/4	2.07+	hardware_subarch Hardware subarchitecture
@@ -182,6 +187,8 @@ Offset	Proto	Name		Meaning
 024C/4	2.08+	payload_length	Length of kernel payload
 0250/8	2.09+	setup_data	64-bit physical pointer to linked list
 				of struct setup_data
+0258/8	2.10+	pref_address	Preferred loading address
+0260/4	2.10+	init_size	Linear memory required during initialization
 
 (1) For backwards compatibility, if the setup_sects field contains 0, the
     real value is 4.
@@ -482,11 +489,15 @@ Protocol:	2.03+
   0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
 
 Field name:	kernel_alignment
-Type:		read (reloc)
+Type:		read/modify (reloc)
 Offset/size:	0x230/4
-Protocol:	2.05+
+Protocol:	2.05+ (read), 2.10+ (modify)
 
-  Alignment unit required by the kernel (if relocatable_kernel is true.)
+  Alignment unit required by the kernel (if relocatable_kernel is
+  true.)  Starting with protocol version 2.10, this reflects the
+  kernel alignment preferred for optimal performance and can be
+  modified by the loader; see the min_alignment and pref_address field
+  below.
 
 Field name:	relocatable_kernel
 Type:		read (reloc)
@@ -498,6 +509,22 @@ Protocol:	2.05+
   After loading, the boot loader must set the code32_start field to
   point to the loaded code, or to a boot loader hook.
 
+Field name:	min_alignment
+Type:		read (reloc)
+Offset/size:	0x235/1
+Protocol:	2.10+
+
+  This field, if nonzero, indicates as a power of 2 the minimum
+  alignment required, as opposed to preferred, by the kernel to boot.
+  If a boot loader makes use of this field, it should update the
+  kernel_alignment field with the alignment unit desired; typically:
+
+	kernel_alignment = 1 << min_alignment
+
+  There may be a considerable performance cost with an excessively
+  misaligned kernel.  Therefore, a loader should typically try each
+  power-of-two alignment from kernel_alignment down to this alignment.
+
 Field name:	cmdline_size
 Type:		read
 Offset/size:	0x238/4
@@ -582,6 +609,27 @@ Protocol:	2.09+
   sure to consider the case where the linked list already contains
   entries.
 
+Field name:	pref_address
+Type:		read (reloc)
+Offset/size:	0x258/8
+Protocol:	2.10+
+
+  This field, if nonzero, represents a preferred load address for the
+  kernel.  A relocating bootloader should attempt to load at this
+  address if possible.
+
+
+Field name:	init_size
+Type:		read
+Offset/size:	0x25c/4
+
+  This field indicates the amount of linear contiguous memory starting
+  at the kernel load address (rounded up to kernel_alignment) that the
+  kernel needs before it is capable of examining its memory map.  This
+  is not the same thing as the total amount of memory the kernel needs
+  to boot, but it can be used by a relocating boot loader to help
+  select a safe load address for the kernel.
+
 
 **** THE IMAGE CHECKSUM
 

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* RFC: x86: relocatable kernel changes (revised spec)
@ 2009-05-11  5:18           ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-11  5:18 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: kexec, linux-kernel, hbabu, Huang, Ying, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

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

Revised proposal to address Eric's comments.  This is intended to
provide full backwards compatibility while at the same time giving us
the future flexibility.

The intent will be to set by default:

	kernel_alignment	= 16 MB
	min_alignment		= log2(4K) or log2(2M)
	pref_address		= 16 MB

The reason to represent min_alignment as a logarithm is that I'm getting
very concerned about the diminishing space that is left without a
fundamental change to the initialized part of the header; specifically,
right now we rely on the signed byte at offset 0x201 to contain the
(additional) size of the header, which means end at 0x281 without a
major format change of some sort.

Comments appreciated.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 3886 bytes --]

diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index e020366..ccc1bd4 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -50,6 +50,11 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
 Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
 		pointer to single linked list of struct	setup_data.
 
+Protocol 2.10:	(Kernel 2.6.31?) A protocol for relaxed alignment
+	 	beyond the kernel_alignment added, new init_size and
+	 	pref_address fields.
+	 	
+
 **** MEMORY LAYOUT
 
 The traditional memory map for the kernel loader, used for Image or
@@ -173,7 +178,7 @@ Offset	Proto	Name		Meaning
 022C/4	2.03+	ramdisk_max	Highest legal initrd address
 0230/4	2.05+	kernel_alignment Physical addr alignment required for kernel
 0234/1	2.05+	relocatable_kernel Whether kernel is relocatable or not
-0235/1	N/A	pad2		Unused
+0235/1	2.10+	min_alignment	Minimum alignment, as a power of 2
 0236/2	N/A	pad3		Unused
 0238/4	2.06+	cmdline_size	Maximum size of the kernel command line
 023C/4	2.07+	hardware_subarch Hardware subarchitecture
@@ -182,6 +187,8 @@ Offset	Proto	Name		Meaning
 024C/4	2.08+	payload_length	Length of kernel payload
 0250/8	2.09+	setup_data	64-bit physical pointer to linked list
 				of struct setup_data
+0258/8	2.10+	pref_address	Preferred loading address
+0260/4	2.10+	init_size	Linear memory required during initialization
 
 (1) For backwards compatibility, if the setup_sects field contains 0, the
     real value is 4.
@@ -482,11 +489,15 @@ Protocol:	2.03+
   0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
 
 Field name:	kernel_alignment
-Type:		read (reloc)
+Type:		read/modify (reloc)
 Offset/size:	0x230/4
-Protocol:	2.05+
+Protocol:	2.05+ (read), 2.10+ (modify)
 
-  Alignment unit required by the kernel (if relocatable_kernel is true.)
+  Alignment unit required by the kernel (if relocatable_kernel is
+  true.)  Starting with protocol version 2.10, this reflects the
+  kernel alignment preferred for optimal performance and can be
+  modified by the loader; see the min_alignment and pref_address field
+  below.
 
 Field name:	relocatable_kernel
 Type:		read (reloc)
@@ -498,6 +509,22 @@ Protocol:	2.05+
   After loading, the boot loader must set the code32_start field to
   point to the loaded code, or to a boot loader hook.
 
+Field name:	min_alignment
+Type:		read (reloc)
+Offset/size:	0x235/1
+Protocol:	2.10+
+
+  This field, if nonzero, indicates as a power of 2 the minimum
+  alignment required, as opposed to preferred, by the kernel to boot.
+  If a boot loader makes use of this field, it should update the
+  kernel_alignment field with the alignment unit desired; typically:
+
+	kernel_alignment = 1 << min_alignment
+
+  There may be a considerable performance cost with an excessively
+  misaligned kernel.  Therefore, a loader should typically try each
+  power-of-two alignment from kernel_alignment down to this alignment.
+
 Field name:	cmdline_size
 Type:		read
 Offset/size:	0x238/4
@@ -582,6 +609,27 @@ Protocol:	2.09+
   sure to consider the case where the linked list already contains
   entries.
 
+Field name:	pref_address
+Type:		read (reloc)
+Offset/size:	0x258/8
+Protocol:	2.10+
+
+  This field, if nonzero, represents a preferred load address for the
+  kernel.  A relocating bootloader should attempt to load at this
+  address if possible.
+
+
+Field name:	init_size
+Type:		read
+Offset/size:	0x25c/4
+
+  This field indicates the amount of linear contiguous memory starting
+  at the kernel load address (rounded up to kernel_alignment) that the
+  kernel needs before it is capable of examining its memory map.  This
+  is not the same thing as the total amount of memory the kernel needs
+  to boot, but it can be used by a relocating boot loader to help
+  select a safe load address for the kernel.
+
 
 **** THE IMAGE CHECKSUM
 

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* Re: RFC: x86: relocatable kernel changes (revised spec)
  2009-05-11  5:18           ` H. Peter Anvin
@ 2009-05-11 11:54             ` Eric W. Biederman
  -1 siblings, 0 replies; 90+ messages in thread
From: Eric W. Biederman @ 2009-05-11 11:54 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, Huang, Ying,
	mingo, tglx, sam

"H. Peter Anvin" <hpa@zytor.com> writes:

> Revised proposal to address Eric's comments.  This is intended to
> provide full backwards compatibility while at the same time giving us
> the future flexibility.
>
> The intent will be to set by default:
>
> 	kernel_alignment	= 16 MB
> 	min_alignment		= log2(4K) or log2(2M)
> 	pref_address		= 16 MB
>
> The reason to represent min_alignment as a logarithm is that I'm getting
> very concerned about the diminishing space that is left without a
> fundamental change to the initialized part of the header; specifically,
> right now we rely on the signed byte at offset 0x201 to contain the
> (additional) size of the header, which means end at 0x281 without a
> major format change of some sort.

Thanks for concentrating on this.

Here is my first round of comments.


> Comments appreciated.
>
> 	-hpa
>
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
>
> diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
> index e020366..ccc1bd4 100644
> --- a/Documentation/x86/boot.txt
> +++ b/Documentation/x86/boot.txt
> @@ -50,6 +50,11 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
>  Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
>  		pointer to single linked list of struct	setup_data.
>  
> +Protocol 2.10:	(Kernel 2.6.31?) A protocol for relaxed alignment
> +	 	beyond the kernel_alignment added, new init_size and
> +	 	pref_address fields.
> +	 	
> +
>  **** MEMORY LAYOUT
>  
>  The traditional memory map for the kernel loader, used for Image or
> @@ -173,7 +178,7 @@ Offset	Proto	Name		Meaning
>  022C/4	2.03+	ramdisk_max	Highest legal initrd address
>  0230/4	2.05+	kernel_alignment Physical addr alignment required for kernel
>  0234/1	2.05+	relocatable_kernel Whether kernel is relocatable or not
> -0235/1	N/A	pad2		Unused
> +0235/1	2.10+	min_alignment	Minimum alignment, as a power of 2
>  0236/2	N/A	pad3		Unused
>  0238/4	2.06+	cmdline_size	Maximum size of the kernel command line
>  023C/4	2.07+	hardware_subarch Hardware subarchitecture
> @@ -182,6 +187,8 @@ Offset	Proto	Name		Meaning
>  024C/4	2.08+	payload_length	Length of kernel payload
>  0250/8	2.09+	setup_data	64-bit physical pointer to linked list
>  				of struct setup_data
> +0258/8	2.10+	pref_address	Preferred loading address
> +0260/4	2.10+	init_size	Linear memory required during initialization
>  
>  (1) For backwards compatibility, if the setup_sects field contains 0, the
>      real value is 4.
> @@ -482,11 +489,15 @@ Protocol:	2.03+
>    0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
>  
>  Field name:	kernel_alignment
> -Type:		read (reloc)
> +Type:		read/modify (reloc)
>  Offset/size:	0x230/4
> -Protocol:	2.05+
> +Protocol:	2.05+ (read), 2.10+ (modify)
>  
> -  Alignment unit required by the kernel (if relocatable_kernel is true.)
> +  Alignment unit required by the kernel (if relocatable_kernel is
> +  true.)  Starting with protocol version 2.10, this reflects the
> +  kernel alignment preferred for optimal performance and can be
> +  modified by the loader; see the min_alignment and pref_address field
> +  below.
>  

Can we say:

   This reflects the kernel alignment preferred for optimal performance.
   
   A relocatable kernel will always run with the alignment specified in
   this field so a relocating bootloader that loads the kernel at a
   lesser alignment must update this field.

>  Field name:	relocatable_kernel
>  Type:		read (reloc)
> @@ -498,6 +509,22 @@ Protocol:	2.05+
>    After loading, the boot loader must set the code32_start field to
>    point to the loaded code, or to a boot loader hook.
>  
> +Field name:	min_alignment
> +Type:		read (reloc)
> +Offset/size:	0x235/1
> +Protocol:	2.10+
> +
> +  This field, if nonzero, indicates as a power of 2 the minimum
> +  alignment required, as opposed to preferred, by the kernel to boot.
> +  If a boot loader makes use of this field, it should update the
> +  kernel_alignment field with the alignment unit desired; typically:
> +
> +	kernel_alignment = 1 << min_alignment
> +
> +  There may be a considerable performance cost with an excessively
> +  misaligned kernel.  Therefore, a loader should typically try each
> +  power-of-two alignment from kernel_alignment down to this alignment.
> +
>  Field name:	cmdline_size
>  Type:		read
>  Offset/size:	0x238/4
> @@ -582,6 +609,27 @@ Protocol:	2.09+
>    sure to consider the case where the linked list already contains
>    entries.
>  
> +Field name:	pref_address
> +Type:		read (reloc)
> +Offset/size:	0x258/8
> +Protocol:	2.10+
> +
> +  This field, if nonzero, represents a preferred load address for the
> +  kernel.  A relocating bootloader should attempt to load at this
> +  address if possible.

We should document that a non-relocating kernel moves itself here.


> +Field name:	init_size
> +Type:		read
> +Offset/size:	0x25c/4
> +
> +  This field indicates the amount of linear contiguous memory starting
> +  at the kernel load address (rounded up to kernel_alignment) that the
> +  kernel needs before it is capable of examining its memory map.  This
> +  is not the same thing as the total amount of memory the kernel needs
> +  to boot, but it can be used by a relocating boot loader to help
> +  select a safe load address for the kernel.

This wording is a bit unclear.

Can we finally say that it is safe to put the initrd immediately after
the kernel?

The rounding up part of that comment is unclear.

...

Peter did your implementation of init_size take into account the maximum expansion
during decompression?  At a quick glance at your previous patches I couldn't
tell.  I know were in that direction with zoffset.h and voffset.h but I don't
recognize the formula for where I put the pic decompressor in your calculation
of this.

Eric

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: RFC: x86: relocatable kernel changes (revised spec)
@ 2009-05-11 11:54             ` Eric W. Biederman
  0 siblings, 0 replies; 90+ messages in thread
From: Eric W. Biederman @ 2009-05-11 11:54 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: kexec, linux-kernel, hbabu, Huang, Ying, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

"H. Peter Anvin" <hpa@zytor.com> writes:

> Revised proposal to address Eric's comments.  This is intended to
> provide full backwards compatibility while at the same time giving us
> the future flexibility.
>
> The intent will be to set by default:
>
> 	kernel_alignment	= 16 MB
> 	min_alignment		= log2(4K) or log2(2M)
> 	pref_address		= 16 MB
>
> The reason to represent min_alignment as a logarithm is that I'm getting
> very concerned about the diminishing space that is left without a
> fundamental change to the initialized part of the header; specifically,
> right now we rely on the signed byte at offset 0x201 to contain the
> (additional) size of the header, which means end at 0x281 without a
> major format change of some sort.

Thanks for concentrating on this.

Here is my first round of comments.


> Comments appreciated.
>
> 	-hpa
>
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
>
> diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
> index e020366..ccc1bd4 100644
> --- a/Documentation/x86/boot.txt
> +++ b/Documentation/x86/boot.txt
> @@ -50,6 +50,11 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
>  Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
>  		pointer to single linked list of struct	setup_data.
>  
> +Protocol 2.10:	(Kernel 2.6.31?) A protocol for relaxed alignment
> +	 	beyond the kernel_alignment added, new init_size and
> +	 	pref_address fields.
> +	 	
> +
>  **** MEMORY LAYOUT
>  
>  The traditional memory map for the kernel loader, used for Image or
> @@ -173,7 +178,7 @@ Offset	Proto	Name		Meaning
>  022C/4	2.03+	ramdisk_max	Highest legal initrd address
>  0230/4	2.05+	kernel_alignment Physical addr alignment required for kernel
>  0234/1	2.05+	relocatable_kernel Whether kernel is relocatable or not
> -0235/1	N/A	pad2		Unused
> +0235/1	2.10+	min_alignment	Minimum alignment, as a power of 2
>  0236/2	N/A	pad3		Unused
>  0238/4	2.06+	cmdline_size	Maximum size of the kernel command line
>  023C/4	2.07+	hardware_subarch Hardware subarchitecture
> @@ -182,6 +187,8 @@ Offset	Proto	Name		Meaning
>  024C/4	2.08+	payload_length	Length of kernel payload
>  0250/8	2.09+	setup_data	64-bit physical pointer to linked list
>  				of struct setup_data
> +0258/8	2.10+	pref_address	Preferred loading address
> +0260/4	2.10+	init_size	Linear memory required during initialization
>  
>  (1) For backwards compatibility, if the setup_sects field contains 0, the
>      real value is 4.
> @@ -482,11 +489,15 @@ Protocol:	2.03+
>    0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
>  
>  Field name:	kernel_alignment
> -Type:		read (reloc)
> +Type:		read/modify (reloc)
>  Offset/size:	0x230/4
> -Protocol:	2.05+
> +Protocol:	2.05+ (read), 2.10+ (modify)
>  
> -  Alignment unit required by the kernel (if relocatable_kernel is true.)
> +  Alignment unit required by the kernel (if relocatable_kernel is
> +  true.)  Starting with protocol version 2.10, this reflects the
> +  kernel alignment preferred for optimal performance and can be
> +  modified by the loader; see the min_alignment and pref_address field
> +  below.
>  

Can we say:

   This reflects the kernel alignment preferred for optimal performance.
   
   A relocatable kernel will always run with the alignment specified in
   this field so a relocating bootloader that loads the kernel at a
   lesser alignment must update this field.

>  Field name:	relocatable_kernel
>  Type:		read (reloc)
> @@ -498,6 +509,22 @@ Protocol:	2.05+
>    After loading, the boot loader must set the code32_start field to
>    point to the loaded code, or to a boot loader hook.
>  
> +Field name:	min_alignment
> +Type:		read (reloc)
> +Offset/size:	0x235/1
> +Protocol:	2.10+
> +
> +  This field, if nonzero, indicates as a power of 2 the minimum
> +  alignment required, as opposed to preferred, by the kernel to boot.
> +  If a boot loader makes use of this field, it should update the
> +  kernel_alignment field with the alignment unit desired; typically:
> +
> +	kernel_alignment = 1 << min_alignment
> +
> +  There may be a considerable performance cost with an excessively
> +  misaligned kernel.  Therefore, a loader should typically try each
> +  power-of-two alignment from kernel_alignment down to this alignment.
> +
>  Field name:	cmdline_size
>  Type:		read
>  Offset/size:	0x238/4
> @@ -582,6 +609,27 @@ Protocol:	2.09+
>    sure to consider the case where the linked list already contains
>    entries.
>  
> +Field name:	pref_address
> +Type:		read (reloc)
> +Offset/size:	0x258/8
> +Protocol:	2.10+
> +
> +  This field, if nonzero, represents a preferred load address for the
> +  kernel.  A relocating bootloader should attempt to load at this
> +  address if possible.

We should document that a non-relocating kernel moves itself here.


> +Field name:	init_size
> +Type:		read
> +Offset/size:	0x25c/4
> +
> +  This field indicates the amount of linear contiguous memory starting
> +  at the kernel load address (rounded up to kernel_alignment) that the
> +  kernel needs before it is capable of examining its memory map.  This
> +  is not the same thing as the total amount of memory the kernel needs
> +  to boot, but it can be used by a relocating boot loader to help
> +  select a safe load address for the kernel.

This wording is a bit unclear.

Can we finally say that it is safe to put the initrd immediately after
the kernel?

The rounding up part of that comment is unclear.

...

Peter did your implementation of init_size take into account the maximum expansion
during decompression?  At a quick glance at your previous patches I couldn't
tell.  I know were in that direction with zoffset.h and voffset.h but I don't
recognize the formula for where I put the pic decompressor in your calculation
of this.

Eric

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: RFC: x86: relocatable kernel changes (revised spec)
  2009-05-11 11:54             ` Eric W. Biederman
@ 2009-05-11 16:03               ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-11 16:03 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, Huang, Ying,
	mingo, tglx, sam

Eric W. Biederman wrote:
> 
>> +Field name:	init_size
>> +Type:		read
>> +Offset/size:	0x25c/4
>> +
>> +  This field indicates the amount of linear contiguous memory starting
>> +  at the kernel load address (rounded up to kernel_alignment) that the
>> +  kernel needs before it is capable of examining its memory map.  This
>> +  is not the same thing as the total amount of memory the kernel needs
>> +  to boot, but it can be used by a relocating boot loader to help
>> +  select a safe load address for the kernel.
> 
> This wording is a bit unclear.
> 
> Can we finally say that it is safe to put the initrd immediately after
> the kernel?
> 

I *believe* we can, as the brk limit checking should catch overruns.
The only question is whether or not there will me memory allocated off
the memory map before the initrd is reserved; I *think* the answer is no
but I haven't done the audit.

> The rounding up part of that comment is unclear.

The rounding up was to reflect the automatic moving upwards from the
load address to the next kernel_alignment datum.

> Peter did your implementation of init_size take into account the maximum expansion
> during decompression?  At a quick glance at your previous patches I couldn't
> tell.  I know were in that direction with zoffset.h and voffset.h but I don't
> recognize the formula for where I put the pic decompressor in your calculation
> of this.

It does take it into account.  The pic decompressor is located at
(ZO_)z_extract_offset; the actual formula moved into mkpiggy.c.

I have regenerated the tip:x86/kbuild-phys branch to be only cleanups
(with the intent of putting the policy changes cleanly on top), and much
better structured.  I hadn't originally expected this to turn into so
much of a cleanup effort.

http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=shortlog;h=x86/kbuild-phys

This checkin, in particular, should answer that question, I believe:

http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commitdiff;h=02a884c0fe7ec8459d00d34b7d4101af21fc4a86

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: RFC: x86: relocatable kernel changes (revised spec)
@ 2009-05-11 16:03               ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-11 16:03 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: kexec, linux-kernel, hbabu, Huang, Ying, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

Eric W. Biederman wrote:
> 
>> +Field name:	init_size
>> +Type:		read
>> +Offset/size:	0x25c/4
>> +
>> +  This field indicates the amount of linear contiguous memory starting
>> +  at the kernel load address (rounded up to kernel_alignment) that the
>> +  kernel needs before it is capable of examining its memory map.  This
>> +  is not the same thing as the total amount of memory the kernel needs
>> +  to boot, but it can be used by a relocating boot loader to help
>> +  select a safe load address for the kernel.
> 
> This wording is a bit unclear.
> 
> Can we finally say that it is safe to put the initrd immediately after
> the kernel?
> 

I *believe* we can, as the brk limit checking should catch overruns.
The only question is whether or not there will me memory allocated off
the memory map before the initrd is reserved; I *think* the answer is no
but I haven't done the audit.

> The rounding up part of that comment is unclear.

The rounding up was to reflect the automatic moving upwards from the
load address to the next kernel_alignment datum.

> Peter did your implementation of init_size take into account the maximum expansion
> during decompression?  At a quick glance at your previous patches I couldn't
> tell.  I know were in that direction with zoffset.h and voffset.h but I don't
> recognize the formula for where I put the pic decompressor in your calculation
> of this.

It does take it into account.  The pic decompressor is located at
(ZO_)z_extract_offset; the actual formula moved into mkpiggy.c.

I have regenerated the tip:x86/kbuild-phys branch to be only cleanups
(with the intent of putting the policy changes cleanly on top), and much
better structured.  I hadn't originally expected this to turn into so
much of a cleanup effort.

http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=shortlog;h=x86/kbuild-phys

This checkin, in particular, should answer that question, I believe:

http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commitdiff;h=02a884c0fe7ec8459d00d34b7d4101af21fc4a86

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 90+ messages in thread

* Re: RFC: x86: relocatable kernel changes (revised spec v2)
  2009-05-11 11:54             ` Eric W. Biederman
@ 2009-05-11 17:56               ` H. Peter Anvin
  -1 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-11 17:56 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: H. Peter Anvin, linux-kernel, vgoyal, hbabu, kexec, Huang, Ying,
	mingo, tglx, sam

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

Does this look better?

	-hpa

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 4366 bytes --]

diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index e020366..0da827c 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -50,6 +50,11 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
 Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
 		pointer to single linked list of struct	setup_data.
 
+Protocol 2.10:	(Kernel 2.6.31?) A protocol for relaxed alignment
+	 	beyond the kernel_alignment added, new init_size and
+	 	pref_address fields.
+	 	
+
 **** MEMORY LAYOUT
 
 The traditional memory map for the kernel loader, used for Image or
@@ -173,7 +178,7 @@ Offset	Proto	Name		Meaning
 022C/4	2.03+	ramdisk_max	Highest legal initrd address
 0230/4	2.05+	kernel_alignment Physical addr alignment required for kernel
 0234/1	2.05+	relocatable_kernel Whether kernel is relocatable or not
-0235/1	N/A	pad2		Unused
+0235/1	2.10+	min_alignment	Minimum alignment, as a power of 2
 0236/2	N/A	pad3		Unused
 0238/4	2.06+	cmdline_size	Maximum size of the kernel command line
 023C/4	2.07+	hardware_subarch Hardware subarchitecture
@@ -182,6 +187,8 @@ Offset	Proto	Name		Meaning
 024C/4	2.08+	payload_length	Length of kernel payload
 0250/8	2.09+	setup_data	64-bit physical pointer to linked list
 				of struct setup_data
+0258/8	2.10+	pref_address	Preferred loading address
+0260/4	2.10+	init_size	Linear memory required during initialization
 
 (1) For backwards compatibility, if the setup_sects field contains 0, the
     real value is 4.
@@ -482,11 +489,19 @@ Protocol:	2.03+
   0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
 
 Field name:	kernel_alignment
-Type:		read (reloc)
+Type:		read/modify (reloc)
 Offset/size:	0x230/4
-Protocol:	2.05+
+Protocol:	2.05+ (read), 2.10+ (modify)
 
-  Alignment unit required by the kernel (if relocatable_kernel is true.)
+  Alignment unit required by the kernel (if relocatable_kernel is
+  true.)  A relocatable kernel that is loaded at an alignment
+  incompatible with the value in this field will be realigned during
+  kernel initialization.
+
+  Starting with protocol version 2.10, this reflects the kernel
+  alignment preferred for optimal performance; it is possible for the
+  loader to modify this field to permit a lesser alignment.  See the
+  min_alignment and pref_address field below.
 
 Field name:	relocatable_kernel
 Type:		read (reloc)
@@ -498,6 +513,22 @@ Protocol:	2.05+
   After loading, the boot loader must set the code32_start field to
   point to the loaded code, or to a boot loader hook.
 
+Field name:	min_alignment
+Type:		read (reloc)
+Offset/size:	0x235/1
+Protocol:	2.10+
+
+  This field, if nonzero, indicates as a power of 2 the minimum
+  alignment required, as opposed to preferred, by the kernel to boot.
+  If a boot loader makes use of this field, it should update the
+  kernel_alignment field with the alignment unit desired; typically:
+
+	kernel_alignment = 1 << min_alignment
+
+  There may be a considerable performance cost with an excessively
+  misaligned kernel.  Therefore, a loader should typically try each
+  power-of-two alignment from kernel_alignment down to this alignment.
+
 Field name:	cmdline_size
 Type:		read
 Offset/size:	0x238/4
@@ -582,6 +613,36 @@ Protocol:	2.09+
   sure to consider the case where the linked list already contains
   entries.
 
+Field name:	pref_address
+Type:		read (reloc)
+Offset/size:	0x258/8
+Protocol:	2.10+
+
+  This field, if nonzero, represents a preferred load address for the
+  kernel.  A relocating bootloader should attempt to load at this
+  address if possible.
+
+  A non-relocatable kernel will unconditionally move itself and to run
+  at this address.
+
+Field name:	init_size
+Type:		read
+Offset/size:	0x25c/4
+
+  This field indicates the amount of linear contiguous memory starting
+  at the kernel runtime start address that the kernel needs before it
+  is capable of examining its memory map.  This is not the same thing
+  as the total amount of memory the kernel needs to boot, but it can
+  be used by a relocating boot loader to help select a safe load
+  address for the kernel.
+
+  The kernel runtime start address is determined by the following algorithm:
+
+  if (relocatable_kernel)
+  	runtime_start = align_up(load_address, kernel_alignment)
+  else
+  	runtime_start = pref_address
+
 
 **** THE IMAGE CHECKSUM
 

^ permalink raw reply related	[flat|nested] 90+ messages in thread

* Re: RFC: x86: relocatable kernel changes (revised spec v2)
@ 2009-05-11 17:56               ` H. Peter Anvin
  0 siblings, 0 replies; 90+ messages in thread
From: H. Peter Anvin @ 2009-05-11 17:56 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: kexec, linux-kernel, hbabu, Huang, Ying, mingo, H. Peter Anvin,
	sam, tglx, vgoyal

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

Does this look better?

	-hpa

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 4366 bytes --]

diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index e020366..0da827c 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -50,6 +50,11 @@ Protocol 2.08:	(Kernel 2.6.26) Added crc32 checksum and ELF format
 Protocol 2.09:	(Kernel 2.6.26) Added a field of 64-bit physical
 		pointer to single linked list of struct	setup_data.
 
+Protocol 2.10:	(Kernel 2.6.31?) A protocol for relaxed alignment
+	 	beyond the kernel_alignment added, new init_size and
+	 	pref_address fields.
+	 	
+
 **** MEMORY LAYOUT
 
 The traditional memory map for the kernel loader, used for Image or
@@ -173,7 +178,7 @@ Offset	Proto	Name		Meaning
 022C/4	2.03+	ramdisk_max	Highest legal initrd address
 0230/4	2.05+	kernel_alignment Physical addr alignment required for kernel
 0234/1	2.05+	relocatable_kernel Whether kernel is relocatable or not
-0235/1	N/A	pad2		Unused
+0235/1	2.10+	min_alignment	Minimum alignment, as a power of 2
 0236/2	N/A	pad3		Unused
 0238/4	2.06+	cmdline_size	Maximum size of the kernel command line
 023C/4	2.07+	hardware_subarch Hardware subarchitecture
@@ -182,6 +187,8 @@ Offset	Proto	Name		Meaning
 024C/4	2.08+	payload_length	Length of kernel payload
 0250/8	2.09+	setup_data	64-bit physical pointer to linked list
 				of struct setup_data
+0258/8	2.10+	pref_address	Preferred loading address
+0260/4	2.10+	init_size	Linear memory required during initialization
 
 (1) For backwards compatibility, if the setup_sects field contains 0, the
     real value is 4.
@@ -482,11 +489,19 @@ Protocol:	2.03+
   0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
 
 Field name:	kernel_alignment
-Type:		read (reloc)
+Type:		read/modify (reloc)
 Offset/size:	0x230/4
-Protocol:	2.05+
+Protocol:	2.05+ (read), 2.10+ (modify)
 
-  Alignment unit required by the kernel (if relocatable_kernel is true.)
+  Alignment unit required by the kernel (if relocatable_kernel is
+  true.)  A relocatable kernel that is loaded at an alignment
+  incompatible with the value in this field will be realigned during
+  kernel initialization.
+
+  Starting with protocol version 2.10, this reflects the kernel
+  alignment preferred for optimal performance; it is possible for the
+  loader to modify this field to permit a lesser alignment.  See the
+  min_alignment and pref_address field below.
 
 Field name:	relocatable_kernel
 Type:		read (reloc)
@@ -498,6 +513,22 @@ Protocol:	2.05+
   After loading, the boot loader must set the code32_start field to
   point to the loaded code, or to a boot loader hook.
 
+Field name:	min_alignment
+Type:		read (reloc)
+Offset/size:	0x235/1
+Protocol:	2.10+
+
+  This field, if nonzero, indicates as a power of 2 the minimum
+  alignment required, as opposed to preferred, by the kernel to boot.
+  If a boot loader makes use of this field, it should update the
+  kernel_alignment field with the alignment unit desired; typically:
+
+	kernel_alignment = 1 << min_alignment
+
+  There may be a considerable performance cost with an excessively
+  misaligned kernel.  Therefore, a loader should typically try each
+  power-of-two alignment from kernel_alignment down to this alignment.
+
 Field name:	cmdline_size
 Type:		read
 Offset/size:	0x238/4
@@ -582,6 +613,36 @@ Protocol:	2.09+
   sure to consider the case where the linked list already contains
   entries.
 
+Field name:	pref_address
+Type:		read (reloc)
+Offset/size:	0x258/8
+Protocol:	2.10+
+
+  This field, if nonzero, represents a preferred load address for the
+  kernel.  A relocating bootloader should attempt to load at this
+  address if possible.
+
+  A non-relocatable kernel will unconditionally move itself and to run
+  at this address.
+
+Field name:	init_size
+Type:		read
+Offset/size:	0x25c/4
+
+  This field indicates the amount of linear contiguous memory starting
+  at the kernel runtime start address that the kernel needs before it
+  is capable of examining its memory map.  This is not the same thing
+  as the total amount of memory the kernel needs to boot, but it can
+  be used by a relocating boot loader to help select a safe load
+  address for the kernel.
+
+  The kernel runtime start address is determined by the following algorithm:
+
+  if (relocatable_kernel)
+  	runtime_start = align_up(load_address, kernel_alignment)
+  else
+  	runtime_start = pref_address
+
 
 **** THE IMAGE CHECKSUM
 

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 90+ messages in thread

end of thread, other threads:[~2009-05-11 18:02 UTC | newest]

Thread overview: 90+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07 22:26 [PATCH 00/14] RFC: x86: relocatable kernel changes H. Peter Anvin
2009-05-07 22:26 ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 01/14] x86, boot: align the .bss section in the decompressor H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-08  7:17   ` Sam Ravnborg
2009-05-08  7:17     ` Sam Ravnborg
2009-05-08  8:18     ` Eric Dumazet
2009-05-08  8:18       ` Eric Dumazet
2009-05-08 16:54     ` H. Peter Anvin
2009-05-08 16:54       ` H. Peter Anvin
2009-05-08  7:53   ` Cyrill Gorcunov
2009-05-08  7:53     ` Cyrill Gorcunov
2009-05-08 17:03     ` H. Peter Anvin
2009-05-08 17:03       ` H. Peter Anvin
2009-05-08 17:15       ` Cyrill Gorcunov
2009-05-08 17:15         ` Cyrill Gorcunov
2009-05-08 17:21         ` H. Peter Anvin
2009-05-08 17:21           ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 02/14] x86, boot: honor CONFIG_PHYSICAL_START when relocatable H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-08  7:34   ` Sam Ravnborg
2009-05-08  7:34     ` Sam Ravnborg
2009-05-08 16:58     ` H. Peter Anvin
2009-05-08 16:58       ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 03/14] x86, config: change defaults PHYSICAL_START and PHYSICAL_ALIGN H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-08  7:36   ` Sam Ravnborg
2009-05-08  7:36     ` Sam Ravnborg
2009-05-08  9:47     ` Ingo Molnar
2009-05-08  9:47       ` Ingo Molnar
2009-05-08 17:01     ` H. Peter Anvin
2009-05-08 17:01       ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 04/14] x86, boot: unify use LOAD_PHYSICAL_ADDR and LOAD_PHYSICAL_ALIGN H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-08  7:42   ` Sam Ravnborg
2009-05-08  7:42     ` Sam Ravnborg
2009-05-08 20:18     ` H. Peter Anvin
2009-05-08 20:18       ` H. Peter Anvin
2009-05-08 20:47       ` Sam Ravnborg
2009-05-08 20:47         ` Sam Ravnborg
2009-05-08 20:49         ` H. Peter Anvin
2009-05-08 20:49           ` H. Peter Anvin
2009-05-08 21:33           ` Sam Ravnborg
2009-05-08 21:33             ` Sam Ravnborg
2009-05-07 22:26 ` [PATCH 06/14] x86: add a Kconfig symbol for when relocations are needed H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 07/14] x86, boot: simplify arch/x86/boot/compressed/Makefile H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-08  7:45   ` Sam Ravnborg
2009-05-08  7:45     ` Sam Ravnborg
2009-05-07 22:26 ` [PATCH 08/14] x86, boot: use BP_scratch in arch/x86/boot/compressed/head_*.S H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 09/14] x86, boot: add new runtime_address and runtime_size bzImage fields H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-08  7:55   ` Sam Ravnborg
2009-05-08  7:55     ` Sam Ravnborg
2009-05-08 21:09     ` H. Peter Anvin
2009-05-08 21:09       ` H. Peter Anvin
2009-05-08 21:35       ` Sam Ravnborg
2009-05-08 21:35         ` Sam Ravnborg
2009-05-07 22:26 ` [PATCH 10/14] x86, doc: document the runtime_start " H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-07 22:26 ` [PATCH 11/14] x86, boot: use rep movsq to move kernel on 64 bits H. Peter Anvin
2009-05-07 22:26   ` H. Peter Anvin
2009-05-07 22:27 ` [PATCH 12/14] x86, boot: zero EFLAGS on 32 bits H. Peter Anvin
2009-05-07 22:27   ` H. Peter Anvin
2009-05-07 22:27 ` [PATCH 13/14] x86: make CONFIG_RELOCATABLE the default H. Peter Anvin
2009-05-07 22:27   ` H. Peter Anvin
2009-05-07 22:27 ` [PATCH 14/14] x86, defconfig: update defconfigs to relocatable H. Peter Anvin
2009-05-07 22:27   ` H. Peter Anvin
2009-05-08  1:23 ` [PATCH 00/14] RFC: x86: relocatable kernel changes Eric W. Biederman
2009-05-08  1:23   ` Eric W. Biederman
2009-05-08  5:31   ` H. Peter Anvin
2009-05-08  5:31     ` H. Peter Anvin
2009-05-08  6:54     ` Eric W. Biederman
2009-05-08  6:54       ` Eric W. Biederman
2009-05-08 18:04       ` H. Peter Anvin
2009-05-08 18:04         ` H. Peter Anvin
2009-05-08 18:47       ` H. Peter Anvin
2009-05-08 18:47         ` H. Peter Anvin
2009-05-11  5:18         ` RFC: x86: relocatable kernel changes (revised spec) H. Peter Anvin
2009-05-11  5:18           ` H. Peter Anvin
2009-05-11 11:54           ` Eric W. Biederman
2009-05-11 11:54             ` Eric W. Biederman
2009-05-11 16:03             ` H. Peter Anvin
2009-05-11 16:03               ` H. Peter Anvin
2009-05-11 17:56             ` RFC: x86: relocatable kernel changes (revised spec v2) H. Peter Anvin
2009-05-11 17:56               ` H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.