rpms/kernel/devel linux-2.6-x86-relocatable-rediff-hotplug-memory.patch, NONE, 1.1.2.1 kernel-2.6.spec, 1.2519.4.23, 1.2519.4.24
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Sep 8 16:16:58 UTC 2006
Author: dzickus
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32612
Modified Files:
Tag: kernel-2_6_17-1_2519_el5_beta1
kernel-2.6.spec
Added Files:
Tag: kernel-2_6_17-1_2519_el5_beta1
linux-2.6-x86-relocatable-rediff-hotplug-memory.patch
Log Message:
don't apply hotplug memory patch for x86-64, it's not ready yet
linux-2.6-x86-relocatable-rediff-hotplug-memory.patch:
arch/x86_64/mm/init.c | 317 ++---
b/arch/i386/Kconfig | 13
b/arch/i386/Makefile | 2
b/arch/i386/boot/Makefile | 2
b/arch/i386/boot/bootsect.S | 97 +
b/arch/i386/boot/compressed/Makefile | 22
b/arch/i386/boot/compressed/head.S | 184 ++-
b/arch/i386/boot/compressed/misc.c | 513 ++++++---
b/arch/i386/boot/compressed/relocs.c | 563 ++++++++++
b/arch/i386/boot/compressed/vmlinux.lds | 40
b/arch/i386/boot/compressed/vmlinux.scr | 3
b/arch/i386/boot/setup.S | 29
b/arch/i386/boot/tools/build.c | 214 +++
b/arch/i386/kernel/alternative.c | 8
b/arch/i386/kernel/setup.c | 4
b/arch/i386/kernel/vmlinux.lds.S | 114 +-
b/arch/i386/mm/init.c | 15
b/arch/x86_64/Kconfig | 19
b/arch/x86_64/boot/Makefile | 2
b/arch/x86_64/boot/bootsect.S | 93 +
b/arch/x86_64/boot/compressed/Makefile | 13
b/arch/x86_64/boot/compressed/head.S | 301 +++--
b/arch/x86_64/boot/compressed/misc.c | 500 ++++++--
b/arch/x86_64/boot/compressed/vmlinux.lds | 44
b/arch/x86_64/boot/compressed/vmlinux.scr | 5
b/arch/x86_64/boot/tools/build.c | 232 +++-
b/arch/x86_64/defconfig | 1
b/arch/x86_64/kernel/acpi/sleep.c | 19
b/arch/x86_64/kernel/acpi/wakeup.S | 325 ++---
b/arch/x86_64/kernel/e820.c | 13
b/arch/x86_64/kernel/early_printk.c | 3
b/arch/x86_64/kernel/head.S | 326 ++---
b/arch/x86_64/kernel/head64.c | 35
b/arch/x86_64/kernel/setup.c | 29
b/arch/x86_64/kernel/setup64.c | 1
b/arch/x86_64/kernel/smp.c | 2
b/arch/x86_64/kernel/suspend.c | 3
b/arch/x86_64/kernel/trampoline.S | 168 ++
b/arch/x86_64/kernel/vmlinux.lds.S | 2
b/arch/x86_64/kernel/vsyscall.c | 10
b/arch/x86_64/mm/fault.c | 4
b/arch/x86_64/mm/pageattr.c | 20
b/include/asm-generic/vmlinux.lds.h | 2
b/include/asm-i386/page.h | 4
b/include/asm-x86_64/const.h | 20
b/include/asm-x86_64/page.h | 44
b/include/asm-x86_64/pgtable.h | 39
b/include/asm-x86_64/proto.h | 2
b/include/asm-x86_64/segment.h | 4
b/include/asm-x86_64/suspend.h | 13
b/include/linux/elf.h | 27
b/include/linux/elf_boot.h | 19
b/include/linux/screen_info.h | 3
b/scripts/kallsyms.c | 30
linux-2.6.17.noarch/arch/x86_64/mm/init.c | 2
linux-2.6.18-rc3-1M-root/arch/i386/Kconfig | 34
linux-2.6.18-rc3-1M-root/arch/i386/boot/bootsect.S | 8
linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/head.S | 28
linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/misc.c | 7
linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/vmlinux.lds | 3
linux-2.6.18-rc3-1M-root/arch/i386/kernel/vmlinux.lds.S | 5
linux-2.6.18-rc3-1M-root/arch/powerpc/kernel/vmlinux.lds.S | 1
linux-2.6.18-rc3-1M-root/arch/x86_64/boot/Makefile | 3
linux-2.6.18-rc3-1M-root/arch/x86_64/boot/compressed/vmlinux.lds | 2
linux-2.6.18-rc3-1M-root/arch/x86_64/boot/tools/build.c | 129 +-
linux-2.6.18-rc3-1M-root/include/asm-i386/boot.h | 6
66 files changed, 3416 insertions(+), 1329 deletions(-)
--- NEW FILE linux-2.6-x86-relocatable-rediff-hotplug-memory.patch ---
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index daa75ce..a0707d7 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -761,11 +761,24 @@ config CRASH_DUMP
help
Generate crash dump after being started by kexec.
+config RELOCATABLE
+ bool "Build a relocatable kernel"
+ help
+ This build a kernel image that retains relocation information
+ so it can be loaded someplace besides the default 1MB.
+ The relocations tend to the kernel binary about 10% larger,
+ but are discarded at runtime.
+
+ One use is for the kexec on panic case where the recovery kernel
+ must live at a different physical address than the primary
+ kernel.
+
config PHYSICAL_START
hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
default "0x1000000" if CRASH_DUMP
default "0x100000"
+ range 0x100000 0x37c00000
help
This gives the physical address where the kernel is loaded. Normally
for regular kernels this value is 0x100000 (1MB). But in the case
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 3e4adb1..e9d6eac 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -26,7 +26,7 @@ endif
LDFLAGS := -m elf_i386
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
-LDFLAGS_vmlinux :=
+LDFLAGS_vmlinux := --emit-relocs
CHECKFLAGS += -D__i386__
CFLAGS += -pipe -msoft-float
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
index e979466..44ef35c 100644
--- a/arch/i386/boot/Makefile
+++ b/arch/i386/boot/Makefile
@@ -43,7 +43,7 @@ # --------------------------------------
quiet_cmd_image = BUILD $@
cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
- $(obj)/vmlinux.bin $(ROOT_DEV) > $@
+ $(obj)/vmlinux.bin $(ROOT_DEV) vmlinux > $@
$(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
$(obj)/vmlinux.bin $(obj)/tools/build FORCE
diff --git a/arch/i386/boot/bootsect.S b/arch/i386/boot/bootsect.S
index 011b7a4..847dc8f 100644
--- a/arch/i386/boot/bootsect.S
+++ b/arch/i386/boot/bootsect.S
@@ -13,6 +13,13 @@
*
*/
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/utsrelease.h>
+#include <linux/compile.h>
+#include <linux/elf.h>
+#include <linux/elf_boot.h>
+#include <asm/page.h>
#include <asm/boot.h>
SETUPSECTS = 4 /* default nr of setup-sectors */
@@ -42,10 +49,92 @@ #endif
.global _start
_start:
-
+ehdr:
+ # e_ident is carefully crafted so if this is treated
+ # as an x86 bootsector you will execute through
+ # e_ident and then print the bugger off message.
+ # The 1 stores to bx+di is unfortunate it is
+ # unlikely to affect the ability to print
+ # a message and you aren't supposed to be booting a
+ # bzImage directly from a floppy anyway.
+
+ # e_ident
+ .byte ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3
+ .byte ELFCLASS32, ELFDATA2LSB, EV_CURRENT, ELFOSABI_STANDALONE
+ .byte 0xeb, 0x3d, 0, 0, 0, 0, 0, 0
+#ifndef CONFIG_RELOCATABLE
+ .word ET_EXEC # e_type
+#else
+ .word ET_DYN # e_type
+#endif
+ .word EM_386 # e_machine
+ .int 1 # e_version
+ .int CONFIG_PHYSICAL_START # e_entry
+ .int phdr - _start # e_phoff
+ .int 0 # e_shoff
+ .int 0 # e_flags
+ .word e_ehdr - ehdr # e_ehsize
+ .word e_phdr1 - phdr # e_phentsize
+ .word (e_phdr - phdr)/(e_phdr1 - phdr) # e_phnum
+ .word 40 # e_shentsize
+ .word 0 # e_shnum
+ .word 0 # e_shstrndx
+e_ehdr:
+
+.org 71
+normalize:
# Normalize the start address
jmpl $BOOTSEG, $start2
+.org 80
+phdr:
+ .int PT_LOAD # p_type
+ .int (SETUPSECTS+1)*512 # p_offset
+ .int __PAGE_OFFSET + CONFIG_PHYSICAL_START # p_vaddr
+ .int CONFIG_PHYSICAL_START # p_paddr
+ .int SYSSIZE*16 # p_filesz
+ .int 0 # p_memsz
+ .int PF_R | PF_W | PF_X # p_flags
+ .int 4*1024*1024 # p_align
+e_phdr1:
+
+ .int PT_NOTE # p_type
+ .int b_note - _start # p_offset
+ .int 0 # p_vaddr
+ .int 0 # p_paddr
+ .int e_note - b_note # p_filesz
+ .int 0 # p_memsz
+ .int 0 # p_flags
+ .int 0 # p_align
+e_phdr:
+
+.macro note name, type
+ .balign 4
+ .int 2f - 1f # n_namesz
+ .int 4f - 3f # n_descsz
+ .int \type # n_type
+ .balign 4
+1: .asciz "\name"
+2: .balign 4
+3:
+.endm
+.macro enote
+4: .balign 4
+.endm
+
+ .balign 4
+b_note:
+ note ELF_NOTE_BOOT, EIN_PROGRAM_NAME
+ .asciz "Linux"
+ enote
+ note ELF_NOTE_BOOT, EIN_PROGRAM_VERSION
+ .asciz UTS_RELEASE
+ enote
+ note ELF_NOTE_BOOT, EIN_ARGUMENT_STYLE
+ .asciz "Linux"
+ enote
+e_note:
+
start2:
movw %cs, %ax
movw %ax, %ds
@@ -78,11 +167,11 @@ die:
bugger_off_msg:
- .ascii "Direct booting from floppy is no longer supported.\r\n"
- .ascii "Please use a boot loader program instead.\r\n"
+ .ascii "Booting linux without a boot loader is no longer supported.\r\n"
.ascii "\n"
- .ascii "Remove disk and press any key to reboot . . .\r\n"
+ .ascii "Press any key to reboot . . .\r\n"
.byte 0
+ebugger_off_msg:
# Kernel attributes; used by setup
diff --git a/arch/i386/boot/compressed/Makefile b/arch/i386/boot/compressed/Makefile
index 258ea95..1c486d1 100644
--- a/arch/i386/boot/compressed/Makefile
+++ b/arch/i386/boot/compressed/Makefile
@@ -7,19 +7,33 @@ #
targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
EXTRA_AFLAGS := -traditional
-LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32
+LDFLAGS_vmlinux := -T
+CFLAGS_misc.o += -fPIC
+hostprogs-y := relocs
-$(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
+$(obj)/vmlinux: $(src)/vmlinux.lds $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
$(call if_changed,ld)
[...6756 lines suppressed...]
diff -puN include/asm-i386/boot.h~i386-implement-config-physical-align-option include/asm-i386/boot.h
--- linux-2.6.18-rc3-1M/include/asm-i386/boot.h~i386-implement-config-physical-align-option 2006-08-17 10:56:46.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/include/asm-i386/boot.h 2006-08-17 10:56:46.000000000 -0400
@@ -12,4 +12,8 @@
#define EXTENDED_VGA 0xfffe /* 80x50 mode */
#define ASK_VGA 0xfffd /* ask for it at bootup */
-#endif
+/* Physical address where kenrel should be loaded. */
+#define LOAD_PHYSICAL_ADDR ((0x100000 + CONFIG_PHYSICAL_ALIGN - 1) \
+ & ~(CONFIG_PHYSICAL_ALIGN - 1))
+
+#endif /* _LINUX_BOOT_H */
diff -puN arch/i386/kernel/vmlinux.lds.S~i386-implement-config-physical-align-option arch/i386/kernel/vmlinux.lds.S
--- linux-2.6.18-rc3-1M/arch/i386/kernel/vmlinux.lds.S~i386-implement-config-physical-align-option 2006-08-17 10:56:46.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/i386/kernel/vmlinux.lds.S 2006-08-17 10:56:46.000000000 -0400
@@ -2,13 +2,14 @@
* Written by Martin Mares <mj at atrey.karlin.mff.cuni.cz>;
*/
-#define LOAD_OFFSET __PAGE_OFFSET
+#define LOAD_OFFSET __PAGE_OFFSET
#include <linux/config.h>
#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <asm/page.h>
#include <asm/cache.h>
+#include <asm/boot.h>
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
@@ -16,7 +17,7 @@ ENTRY(phys_startup_32)
jiffies = jiffies_64;
SECTIONS
{
- . = LOAD_OFFSET + CONFIG_PHYSICAL_START;
+ . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
phys_startup_32 = startup_32 - LOAD_OFFSET;
/* read-only */
.text : AT(ADDR(.text) - LOAD_OFFSET) {
diff -puN arch/i386/boot/bootsect.S~i386-implement-config-physical-align-option arch/i386/boot/bootsect.S
--- linux-2.6.18-rc3-1M/arch/i386/boot/bootsect.S~i386-implement-config-physical-align-option 2006-08-17 10:56:46.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/i386/boot/bootsect.S 2006-08-17 12:37:19.000000000 -0400
@@ -69,7 +69,7 @@ ehdr:
#endif
.word EM_386 # e_machine
.int 1 # e_version
- .int CONFIG_PHYSICAL_START # e_entry
+ .int LOAD_PHYSICAL_ADDR # e_entry
.int phdr - _start # e_phoff
.int 0 # e_shoff
.int 0 # e_flags
@@ -90,12 +90,12 @@ normalize:
phdr:
.int PT_LOAD # p_type
.int (SETUPSECTS+1)*512 # p_offset
- .int __PAGE_OFFSET + CONFIG_PHYSICAL_START # p_vaddr
- .int CONFIG_PHYSICAL_START # p_paddr
+ .int LOAD_PHYSICAL_ADDR + __PAGE_OFFSET # p_vaddr
+ .int LOAD_PHYSICAL_ADDR # p_paddr
.int SYSSIZE*16 # p_filesz
.int 0 # p_memsz
.int PF_R | PF_W | PF_X # p_flags
- .int 4*1024*1024 # p_align
+ .int CONFIG_PHYSICAL_ALIGN # p_align
e_phdr1:
.int PT_NOTE # p_type
diff -puN arch/i386/boot/compressed/vmlinux.lds~i386-implement-config-physical-align-option arch/i386/boot/compressed/vmlinux.lds
--- linux-2.6.18-rc3-1M/arch/i386/boot/compressed/vmlinux.lds~i386-implement-config-physical-align-option 2006-08-17 10:56:46.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/vmlinux.lds 2006-08-17 10:56:46.000000000 -0400
@@ -3,6 +3,9 @@ OUTPUT_ARCH(i386)
ENTRY(startup_32)
SECTIONS
{
+ /* Be careful parts of head.S assume startup_32 is at
+ * address 0.
+ */
. = 0 ;
.text.head : {
_head = . ;
diff -puN arch/i386/boot/compressed/head.S~i386-implement-config-physical-align-option arch/i386/boot/compressed/head.S
--- linux-2.6.18-rc3-1M/arch/i386/boot/compressed/head.S~i386-implement-config-physical-align-option 2006-08-17 10:56:46.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/head.S 2006-08-17 11:12:51.000000000 -0400
@@ -27,6 +27,7 @@
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/page.h>
+#include <asm/boot.h>
.section ".text.head"
.globl startup_32
@@ -53,17 +54,19 @@ startup_32:
1: popl %ebp
subl $1b, %ebp
-/* Compute the delta between where we were compiled to run at
- * and where the code will actually run at.
+
+/* %ebp contains the address we are loaded at by the boot loader and %ebx
+ * contains the address where we should move the kernel image temporarily
+ * for safe in-place decompression.
*/
- /* Start with the delta to where the kernel will run at. If we are
- * a relocatable kernel this is the delta to our load address otherwise
- * this is the delta to CONFIG_PHYSICAL start.
- */
+
#ifdef CONFIG_RELOCATABLE
- movl %ebp, %ebx
+ movl %ebp, %ebx
+ addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebx
+ andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebx
+
#else
- movl $(CONFIG_PHYSICAL_START - startup_32), %ebx
+ movl $LOAD_PHYSICAL_ADDR, %ebx
#endif
/* Replace the compressed data size with the uncompressed size */
@@ -95,9 +98,10 @@ startup_32:
/* Compute the kernel start address.
*/
#ifdef CONFIG_RELOCATABLE
- leal startup_32(%ebp), %ebp
+ addl $(CONFIG_PHYSICAL_ALIGN - 1), %ebp
+ andl $(~(CONFIG_PHYSICAL_ALIGN - 1)), %ebp
#else
- movl $CONFIG_PHYSICAL_START, %ebp
+ movl $LOAD_PHYSICAL_ADDR, %ebp
#endif
/*
@@ -151,8 +155,8 @@ relocated:
* and where it was actually loaded.
*/
movl %ebp, %ebx
- subl $CONFIG_PHYSICAL_START, %ebx
-
+ subl $LOAD_PHYSICAL_ADDR, %ebx
+ jz 2f /* Nothing to be done if loaded at compiled addr. */
/*
* Process relocations.
*/
diff -puN arch/i386/boot/compressed/misc.c~i386-implement-config-physical-align-option arch/i386/boot/compressed/misc.c
--- linux-2.6.18-rc3-1M/arch/i386/boot/compressed/misc.c~i386-implement-config-physical-align-option 2006-08-17 10:56:46.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/i386/boot/compressed/misc.c 2006-08-17 11:19:05.000000000 -0400
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <asm/setup.h>
#include <asm/page.h>
+#include <asm/boot.h>
/* WARNING!!
* This code is compiled with -fPIC and it is relocated dynamically
@@ -585,12 +586,12 @@ asmlinkage void decompress_kernel(void *
insize = input_len;
inptr = 0;
- if (((u32)output - CONFIG_PHYSICAL_START) & 0x3fffff)
- error("Destination address not 4M aligned");
+ if ((u32)output & (CONFIG_PHYSICAL_ALIGN -1))
+ error("Destination address not CONFIG_PHYSICAL_ALIGN aligned");
if (end > ((-__PAGE_OFFSET-(512 <<20)-1) & 0x7fffffff))
error("Destination address too large");
#ifndef CONFIG_RELOCATABLE
- if ((u32)output != CONFIG_PHYSICAL_START)
+ if ((u32)output != LOAD_PHYSICAL_ADDR)
error("Wrong destination address");
#endif
_
o ppc64 does not seem to be defining symbol _text which is used by
kernel/kallsyms.c
Signed-off-by: Vivek Goyal <vgoyal at in.ibm.com>
---
arch/powerpc/kernel/vmlinux.lds.S | 1 +
1 file changed, 1 insertion(+)
diff -puN arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix arch/powerpc/kernel/vmlinux.lds.S
--- linux-2.6.18-rc3-1M/arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix 2006-08-24 16:16:17.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/powerpc/kernel/vmlinux.lds.S 2006-08-24 16:26:33.000000000 -0400
@@ -33,6 +33,7 @@ SECTIONS
/* Text and gots */
.text : {
+ _text = .;
*(.text .text.*)
SCHED_TEXT
LOCK_TEXT
_
--
Konrad Rzeszutek 1-(978)-392-3903 or 1-(617)-693-1718
IBM on-site partner.
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.2519.4.23
retrieving revision 1.2519.4.24
diff -u -r1.2519.4.23 -r1.2519.4.24
--- kernel-2.6.spec 8 Sep 2006 02:47:25 -0000 1.2519.4.23
+++ kernel-2.6.spec 8 Sep 2006 16:16:54 -0000 1.2519.4.24
@@ -299,6 +299,7 @@
Patch209: linux-2.6-x86_64-opterons-synchronize-p-state-using-TSC.patch
Patch210: linux-2.6-x86-relocatable.patch
Patch211: linux-2.6-x86-allow-hotplug-memory-and-suspend.patch
+Patch212: linux-2.6-x86-relocatable-rediff-hotplug-memory.patch
# 300 - 399 ppc(64)
Patch304: linux-2.6-ppc-fix-irq-mapping.patch
@@ -792,10 +793,13 @@
%patch208 -p1
# fix opteron timer scaling
%patch209 -p1
-%patch211 -p1
+# hot memory support x86_64
+#%patch211 -p1
%if 0%{?rhel}
#add in support for x86 and x86_64 relocatable kernels
%patch210 -p1
+#relocatable rediff with hot memory support
+#patch212 -p1
%endif
#
@@ -1802,6 +1806,9 @@
%endif
%changelog
+* Fri Sep 08 2006 Don Zickus <dzickus at redhat.com>
+- revert #181552 - still needs some TLC
+
* Thu Sep 07 2006 Don Zickus <dzickus at redhat.com>
- added #202962/198698 - s390 anaconda fails to install (Pete Zaitcev)
- added #184837 - aic9400/adp94xx updates (Konrad Rzeszutek)
More information about the fedora-cvs-commits
mailing list