projects/linux·commit 5f033bb9

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

5f033bb9 · Linus Torvalds <[email protected]> · 2008-04-21 15:38:43 -07:00

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (77 commits)
  x86: UV startup of slave cpus
  x86: integrate pci-dma.c
  x86: don't do dma if mask is NULL.
  x86: return conditional to mmu
  x86: remove kludge from x86_64
  x86: unify gfp masks
  x86: retry allocation if failed
  x86: don't try to allocate from DMA zone at first
  x86: use a fallback dev for i386
  x86: use numa allocation function in i386
  x86: remove virt_to_bus in pci-dma_64.c
  x86: adjust dma_free_coherent for i386
  x86: move bad_dma_address
  x86: isolate coherent mapping functions
  x86: move dma_coherent functions to pci-dma.c
  x86: merge iommu initialization parameters
  x86: merge dma_supported
  x86: move pci fixup to pci-dma.c
  x86: move x86_64-specific to common code.
  x86: move initialization functions to pci-dma.c
  ...
Commit
5f033bb9bc5cb3bb37a79e3ef131f50ecdcb72b0
Parents
fd9be4ce · 34d05591

Merge commit. Changes below are compared with the first parent: fd9be4ce.

Changes

108 files changed · +1710 −1250

FileStatusAddDelContent
Documentation/feature-removal-schedule.txtmodified+7−0View file
Documentation/kernel-parameters.txtmodified+9−1View file
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.cadded+96−0View file
Documentation/prctl/disable-tsc-on-off-stress-test.cadded+95−0View file
Documentation/prctl/disable-tsc-test.cadded+94−0View file
arch/x86/Kconfigmodified+9−0View file
arch/x86/boot/a20.cmodified+0−2View file
arch/x86/boot/apm.cmodified+0−2View file
arch/x86/boot/bitops.hmodified+0−2View file
arch/x86/boot/boot.hmodified+0−2View file
arch/x86/boot/cmdline.cmodified+0−2View file
arch/x86/boot/compressed/head_32.Smodified+9−6View file
arch/x86/boot/compressed/head_64.Smodified+17−13View file
arch/x86/boot/compressed/misc.cmodified+1−7View file
arch/x86/boot/compressed/vmlinux_64.ldsmodified+2−2View file
arch/x86/boot/copy.Smodified+0−2View file
arch/x86/boot/cpucheck.cmodified+0−2View file
arch/x86/boot/edd.cmodified+0−2View file
arch/x86/boot/install.shmodified+0−2View file
arch/x86/boot/main.cmodified+0−2View file
arch/x86/boot/mca.cmodified+0−2View file
arch/x86/boot/memory.cmodified+0−2View file
arch/x86/boot/pm.cmodified+0−2View file
arch/x86/boot/pmjump.Smodified+0−2View file
arch/x86/boot/printf.cmodified+0−2View file
arch/x86/boot/string.cmodified+0−2View file
arch/x86/boot/tty.cmodified+0−2View file
arch/x86/boot/version.cmodified+0−2View file
arch/x86/boot/video-bios.cmodified+0−2View file
arch/x86/boot/video-vesa.cmodified+0−2View file
arch/x86/boot/video-vga.cmodified+0−2View file
arch/x86/boot/video.cmodified+0−2View file
arch/x86/boot/video.hmodified+0−2View file
arch/x86/boot/voyager.cmodified+0−2View file
arch/x86/kernel/Makefilemodified+5−4View file
arch/x86/kernel/acpi/cstate.cmodified+0−2View file
arch/x86/kernel/acpi/processor.cmodified+0−2View file
arch/x86/kernel/cpu/cpufreq/p4-clockmod.cmodified+2−2View file
arch/x86/kernel/cpu/mcheck/therm_throt.cmodified+0−1View file
arch/x86/kernel/e820_32.cmodified+2−2View file
arch/x86/kernel/e820_64.cmodified+2−2View file
arch/x86/kernel/efi.cmodified+13−5View file
arch/x86/kernel/efi_64.cmodified+6−6View file
arch/x86/kernel/entry_32.Smodified+0−1View file
arch/x86/kernel/genx2apic_uv_x.cmodified+11−6View file
arch/x86/kernel/head64.cmodified+2−0View file
arch/x86/kernel/head_32.Smodified+0−1View file
arch/x86/kernel/i387.cmodified+74−40View file
arch/x86/kernel/kgdb.cmodified+1−5View file
arch/x86/kernel/nmi_32.cmodified+2−1View file
arch/x86/kernel/nmi_64.cmodified+4−2View file
arch/x86/kernel/pci-calgary_64.cmodified+2−1View file
arch/x86/kernel/pci-dma.cadded+524−0View file
arch/x86/kernel/pci-dma_32.cdeleted+0−177View before deletion
arch/x86/kernel/pci-dma_64.cdeleted+0−344View before deletion
arch/x86/kernel/pci-gart_64.cmodified+7−8View file
arch/x86/kernel/pci-nommu_64.c → arch/x86/kernel/pci-nommu.crenamed+18−16View file
arch/x86/kernel/pci-swiotlb_64.cmodified+8−1View file
arch/x86/kernel/process.cadded+44−0View file
arch/x86/kernel/process_32.cmodified+44−6View file
arch/x86/kernel/process_64.cmodified+73−1View file
arch/x86/kernel/setup64.cmodified+2−2View file
arch/x86/kernel/setup_32.cmodified+2−2View file
arch/x86/kernel/setup_64.cmodified+7−2View file
arch/x86/kernel/smpboot.cmodified+20−9View file
arch/x86/kernel/traps_32.cmodified+22−13View file
arch/x86/kernel/traps_64.cmodified+27−9View file
arch/x86/kernel/tsc_32.cmodified+18−5View file
arch/x86/kernel/tsc_64.cmodified+20−3View file
arch/x86/mach-visws/visws_apic.cmodified+0−2View file
arch/x86/mach-voyager/voyager_basic.cmodified+0−2View file
arch/x86/mach-voyager/voyager_cat.cmodified+0−2View file
arch/x86/mach-voyager/voyager_smp.cmodified+0−2View file
arch/x86/mach-voyager/voyager_thread.cmodified+0−2View file
arch/x86/math-emu/fpu_entry.cmodified+2−2View file
arch/x86/math-emu/fpu_system.hmodified+13−13View file
arch/x86/math-emu/reg_ld_str.cmodified+2−2View file
arch/x86/mm/discontig_32.cmodified+3−3View file
arch/x86/mm/init_32.cmodified+0−1View file
arch/x86/mm/init_64.cmodified+0−3View file
arch/x86/mm/ioremap.cmodified+3−2View file
arch/x86/mm/k8topology_64.cmodified+1−1View file
arch/x86/mm/numa_64.cmodified+11−5View file
arch/x86/mm/pgtable_32.cmodified+0−4View file
arch/x86/mm/srat_64.cmodified+21−11View file
arch/x86/vdso/Makefilemodified+2−1View file
arch/x86/video/fbdev.cmodified+0−1View file
include/asm-x86/boot.hmodified+8−0View file
include/asm-x86/dma-mapping.hmodified+235−3View file
include/asm-x86/dma-mapping_32.hdeleted+0−187View before deletion
include/asm-x86/dma-mapping_64.hdeleted+0−202View before deletion
include/asm-x86/e820_32.hmodified+1−1View file
include/asm-x86/genapic_32.hmodified+1−0View file
include/asm-x86/i387.hmodified+18−19View file
include/asm-x86/numa_64.hmodified+2−1View file
include/asm-x86/pci_64.hmodified+1−0View file
include/asm-x86/processor.hmodified+13−3View file
include/asm-x86/scatterlist.hmodified+0−2View file
include/asm-x86/thread_info.hmodified+9−0View file
include/asm-x86/thread_info_32.hmodified+0−2View file
include/asm-x86/thread_info_64.hmodified+3−3View file
include/asm-x86/tsc.hmodified+1−0View file
include/linux/efi.hmodified+7−0View file
include/linux/irqflags.hmodified+3−3View file
include/linux/prctl.hmodified+6−0View file
kernel/fork.cmodified+29−6View file
kernel/sys.cmodified+12−1View file
kernel/time/timekeeping.cmodified+2−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/feature-removal-schedule.txt

View file
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index af0e939..309c47b 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -282,6 +282,13 @@ Why: Not used in-tree. The current out-of-tree users used it to
out-of-tree driver.
Who: Thomas Gleixner <[email protected]>
+----------------------------
+
+What: usedac i386 kernel parameter
+When: 2.6.27
+Why: replaced by allowdac and no dac combination
+Who: Glauber Costa <[email protected]>
+
---------------------------
What: /sys/o2cb symlink

Documentation/kernel-parameters.txt

View file
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4b0f1ae..f483960 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1280,8 +1280,16 @@ and is between 256 and 4096 characters. It is defined in the file
noexec [IA-64]
noexec [X86-32,X86-64]
+ On X86-32 available only on PAE configured kernels.
noexec=on: enable non-executable mappings (default)
- noexec=off: disable nn-executable mappings
+ noexec=off: disable non-executable mappings
+
+ noexec32 [X86-64]
+ This affects only 32-bit executables.
+ noexec32=on: enable non-executable mappings (default)
+ read doesn't imply executable mappings
+ noexec32=off: disable non-executable mappings
+ read implies executable mappings
nofxsr [BUGS=X86-32] Disables x86 floating point extended
register save and restore. The kernel will only save

Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c

View file
diff --git a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
new file mode 100644
index 0000000..f8e8e95
--- /dev/null
+++ b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
@@ -0,0 +1,96 @@
+/*
+ * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
+ *
+ * Tests if the control register is updated correctly
+ * at context switches
+ *
+ * Warning: this test will cause a very high load for a few seconds
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <inttypes.h>
+#include <wait.h>
+
+
+#include <sys/prctl.h>
+#include <linux/prctl.h>
+
+/* Get/set the process' ability to use the timestamp counter instruction */
+#ifndef PR_GET_TSC
+#define PR_GET_TSC 25
+#define PR_SET_TSC 26
+# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
+# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
+#endif
+
+uint64_t rdtsc() {
+uint32_t lo, hi;
+/* We cannot use "=A", since this would use %rax on x86_64 */
+__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+return (uint64_t)hi << 32 | lo;
+}
+
+void sigsegv_expect(int sig)
+{
+ /* */
+}
+
+void segvtask(void)
+{
+ if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0)
+ {
+ perror("prctl");
+ exit(0);
+ }
+ signal(SIGSEGV, sigsegv_expect);
+ alarm(10);
+ rdtsc();
+ fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n");
+ exit(0);
+}
+
+
+void sigsegv_fail(int sig)
+{
+ fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n");
+ exit(0);
+}
+
+void rdtsctask(void)
+{
+ if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0)
+ {
+ perror("prctl");
+ exit(0);
+ }
+ signal(SIGSEGV, sigsegv_fail);
+ alarm(10);
+ for(;;) rdtsc();
+}
+
+
+int main(int argc, char **argv)
+{
+ int n_tasks = 100, i;
+
+ fprintf(stderr, "[No further output means we're allright]\n");
+
+ for (i=0; i<n_tasks; i++)
+ if (fork() == 0)
+ {
+ if (i & 1)
+ segvtask();
+ else
+ rdtsctask();
+ }
+
+ for (i=0; i<n_tasks; i++)
+ wait(NULL);
+
+ exit(0);
+}
+

Documentation/prctl/disable-tsc-on-off-stress-test.c

View file
diff --git a/Documentation/prctl/disable-tsc-on-off-stress-test.c b/Documentation/prctl/disable-tsc-on-off-stress-test.c
new file mode 100644
index 0000000..1fcd914
--- /dev/null
+++ b/Documentation/prctl/disable-tsc-on-off-stress-test.c
@@ -0,0 +1,95 @@
+/*
+ * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
+ *
+ * Tests if the control register is updated correctly
+ * when set with prctl()
+ *
+ * Warning: this test will cause a very high load for a few seconds
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <inttypes.h>
+#include <wait.h>
+
+
+#include <sys/prctl.h>
+#include <linux/prctl.h>
+
+/* Get/set the process' ability to use the timestamp counter instruction */
+#ifndef PR_GET_TSC
+#define PR_GET_TSC 25
+#define PR_SET_TSC 26
+# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
+# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
+#endif
+
+/* snippet from wikipedia :-) */
+
+uint64_t rdtsc() {
+uint32_t lo, hi;
+/* We cannot use "=A", since this would use %rax on x86_64 */
+__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+return (uint64_t)hi << 32 | lo;
+}
+
+int should_segv = 0;
+
+void sigsegv_cb(int sig)
+{
+ if (!should_segv)
+ {
+ fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n");
+ exit(0);
+ }
+ if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0)
+ {
+ perror("prctl");
+ exit(0);
+ }
+ should_segv = 0;
+
+ rdtsc();
+}
+
+void task(void)
+{
+ signal(SIGSEGV, sigsegv_cb);
+ alarm(10);
+ for(;;)
+ {
+ rdtsc();
+ if (should_segv)
+ {
+ fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n");
+ exit(0);
+ }
+ if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0)
+ {
+ perror("prctl");
+ exit(0);
+ }
+ should_segv = 1;
+ }
+}
+
+
+int main(int argc, char **argv)
+{
+ int n_tasks = 100, i;
+
+ fprintf(stderr, "[No further output means we're allright]\n");
+
+ for (i=0; i<n_tasks; i++)
+ if (fork() == 0)
+ task();
+
+ for (i=0; i<n_tasks; i++)
+ wait(NULL);
+
+ exit(0);
+}
+

Documentation/prctl/disable-tsc-test.c

View file
diff --git a/Documentation/prctl/disable-tsc-test.c b/Documentation/prctl/disable-tsc-test.c
new file mode 100644
index 0000000..843c81e
--- /dev/null
+++ b/Documentation/prctl/disable-tsc-test.c
@@ -0,0 +1,94 @@
+/*
+ * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
+ *
+ * Basic test to test behaviour of PR_GET_TSC and PR_SET_TSC
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <inttypes.h>
+
+
+#include <sys/prctl.h>
+#include <linux/prctl.h>
+
+/* Get/set the process' ability to use the timestamp counter instruction */
+#ifndef PR_GET_TSC
+#define PR_GET_TSC 25
+#define PR_SET_TSC 26
+# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
+# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
+#endif
+
+const char *tsc_names[] =
+{
+ [0] = "[not set]",
+ [PR_TSC_ENABLE] = "PR_TSC_ENABLE",
+ [PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV",
+};
+
+uint64_t rdtsc() {
+uint32_t lo, hi;
+/* We cannot use "=A", since this would use %rax on x86_64 */
+__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+return (uint64_t)hi << 32 | lo;
+}
+
+void sigsegv_cb(int sig)
+{
+ int tsc_val = 0;
+
+ printf("[ SIG_SEGV ]\n");
+ printf("prctl(PR_GET_TSC, &tsc_val); ");
+ fflush(stdout);
+
+ if ( prctl(PR_GET_TSC, &tsc_val) == -1)
+ perror("prctl");
+
+ printf("tsc_val == %s\n", tsc_names[tsc_val]);
+ printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n");
+ fflush(stdout);
+ if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1)
+ perror("prctl");
+
+ printf("rdtsc() == ");
+}
+
+int main(int argc, char **argv)
+{
+ int tsc_val = 0;
+
+ signal(SIGSEGV, sigsegv_cb);
+
+ printf("rdtsc() == %llu\n", (unsigned long long)rdtsc());
+ printf("prctl(PR_GET_TSC, &tsc_val); ");
+ fflush(stdout);
+
+ if ( prctl(PR_GET_TSC, &tsc_val) == -1)
+ perror("prctl");
+
+ printf("tsc_val == %s\n", tsc_names[tsc_val]);
+ printf("rdtsc() == %llu\n", (unsigned long long)rdtsc());
+ printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n");
+ fflush(stdout);
+
+ if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1)
+ perror("prctl");
+
+ printf("rdtsc() == %llu\n", (unsigned long long)rdtsc());
+ printf("prctl(PR_SET_TSC, PR_TSC_SIGSEGV)\n");
+ fflush(stdout);
+
+ if ( prctl(PR_SET_TSC, PR_TSC_SIGSEGV) == -1)
+ perror("prctl");
+
+ printf("rdtsc() == ");
+ fflush(stdout);
+ printf("%llu\n", (unsigned long long)rdtsc());
+ fflush(stdout);
+
+ exit(EXIT_SUCCESS);
+}
+

arch/x86/Kconfig

View file
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2a59dbb..07cf771 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -903,6 +903,15 @@ config X86_64_ACPI_NUMA
help
Enable ACPI SRAT based node topology detection.
+# Some NUMA nodes have memory ranges that span
+# other nodes. Even though a pfn is valid and
+# between a node's start and end pfns, it may not
+# reside on that node. See memmap_init_zone()
+# for details.
+config NODES_SPAN_OTHER_NODES
+ def_bool y
+ depends on X86_64_ACPI_NUMA
+
config NUMA_EMU
bool "NUMA emulation"
depends on X86_64 && NUMA

arch/x86/boot/a20.c

View file
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c
index 31348d0..90943f8 100644
--- a/arch/x86/boot/a20.c
+++ b/arch/x86/boot/a20.c
@@ -9,8 +9,6 @@
* ----------------------------------------------------------------------- */
/*
- * arch/i386/boot/a20.c
- *
* Enable A20 gate (return -1 on failure)
*/

arch/x86/boot/apm.c

View file
diff --git a/arch/x86/boot/apm.c b/arch/x86/boot/apm.c
index c117c7f..7aa6033 100644
--- a/arch/x86/boot/apm.c
+++ b/arch/x86/boot/apm.c
@@ -12,8 +12,6 @@
* ----------------------------------------------------------------------- */
/*
- * arch/i386/boot/apm.c
- *
* Get APM BIOS information
*/

arch/x86/boot/bitops.h

View file
diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
index 8dcc8dc..878e4b9 100644
--- a/arch/x86/boot/bitops.h
+++ b/arch/x86/boot/bitops.h
@@ -9,8 +9,6 @@
* ----------------------------------------------------------------------- */
/*
- * arch/i386/boot/bitops.h
- *
* Very simple bitops for the boot code.
*/

arch/x86/boot/boot.h

View file
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 0957807..a34b998 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -9,8 +9,6 @@
* ----------------------------------------------------------------------- */
/*
- * arch/i386/boot/boot.h
- *
* Header file for the real-mode kernel code
*/

arch/x86/boot/cmdline.c

View file
diff --git a/arch/x86/boot/cmdline.c b/arch/x86/boot/cmdline.c
index 680408a..a1d3563 100644
--- a/arch/x86/boot/cmdline.c
+++ b/arch/x86/boot/cmdline.c
@@ -9,8 +9,6 @@
* ----------------------------------------------------------------------- */
/*
- * arch/i386/boot/cmdline.c
- *
* Simple command-line parser for early boot.
*/

arch/x86/boot/compressed/head_32.S

View file
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 036e635..ba7736c 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -130,7 +130,7 @@ relocated:
/*
* Setup the stack for the decompressor
*/
- leal stack_end(%ebx), %esp
+ leal boot_stack_end(%ebx), %esp
/*
* Do the decompression, and jump to the new kernel..
@@ -142,8 +142,8 @@ relocated:
pushl %eax # input_len
leal input_data(%ebx), %eax
pushl %eax # input_data
- leal _end(%ebx), %eax
- pushl %eax # end of the image as third argument
+ leal boot_heap(%ebx), %eax
+ pushl %eax # heap area as third argument
pushl %esi # real mode pointer as second arg
call decompress_kernel
addl $20, %esp
@@ -181,7 +181,10 @@ relocated:
jmp *%ebp
.bss
+/* Stack and heap for uncompression */
.balign 4
-stack:
- .fill 4096, 1, 0
-stack_end:
+boot_heap:
+ .fill BOOT_HEAP_SIZE, 1, 0
+boot_stack:
+ .fill BOOT_STACK_SIZE, 1, 0
+boot_stack_end:

arch/x86/boot/compressed/head_64.S

View file
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index e8657b9..d8819ef 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -28,6 +28,7 @@
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/page.h>
+#include <asm/boot.h>
#include <asm/msr.h>
#include <asm/asm-offsets.h>
@@ -62,7 +63,7 @@ startup_32:
subl $1b, %ebp
/* setup a stack and make sure cpu supports long mode. */
- movl $user_stack_end, %eax
+ movl $boot_stack_end, %eax
addl %ebp, %eax
movl %eax, %esp
@@ -243,9 +244,9 @@ ENTRY(startup_64)
/* Copy the compressed kernel to the end of our buffer
* where decompression in place becomes safe.
*/
- leaq _end(%rip), %r8
- leaq _end(%rbx), %r9
- movq $_end /* - $startup_32 */, %rcx
+ 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
@@ -267,14 +268,14 @@ relocated:
*/
xorq %rax, %rax
leaq _edata(%rbx), %rdi
- leaq _end(%rbx), %rcx
+ leaq _end_before_pgt(%rbx), %rcx
subq %rdi, %rcx
cld
rep
stosb
/* Setup the stack */
- leaq user_stack_end(%rip), %rsp
+ leaq boot_stack_end(%rip), %rsp
/* zero EFLAGS after setting rsp */
pushq $0
@@ -285,7 +286,7 @@ relocated:
*/
pushq %rsi # Save the real mode argument
movq %rsi, %rdi # real mode address
- leaq _heap(%rip), %rsi # _heap
+ 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
@@ -310,9 +311,12 @@ gdt:
.quad 0x0080890000000000 /* TS descriptor */
.quad 0x0000000000000000 /* TS continued */
gdt_end:
- .bss
-/* Stack for uncompression */
- .balign 4
-user_stack:
- .fill 4096,4,0
-user_stack_end:
+
+.bss
+/* Stack and heap for uncompression */
+.balign 4
+boot_heap:
+ .fill BOOT_HEAP_SIZE, 1, 0
+boot_stack:
+ .fill BOOT_STACK_SIZE, 1, 0
+boot_stack_end:

arch/x86/boot/compressed/misc.c

View file
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index dad4e69..90456ce 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -217,12 +217,6 @@ static void putstr(const char *);
static memptr free_mem_ptr;
static memptr free_mem_end_ptr;
-#ifdef CONFIG_X86_64
-#define HEAP_SIZE 0x7000
-#else
-#define HEAP_SIZE 0x4000
-#endif
-
static char *vidmem;
static int vidport;
static int lines, cols;
@@ -449,7 +443,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
window = output; /* Output buffer (Normally at 1M) */
free_mem_ptr = heap; /* Heap */
- free_mem_end_ptr = heap + HEAP_SIZE;
+ free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
inbuf = input_data; /* Input buffer */
insize = input_len;
inptr = 0;

arch/x86/boot/compressed/vmlinux_64.lds

View file
diff --git a/arch/x86/boot/compressed/vmlinux_64.lds b/arch/x86/boot/compressed/vmlinux_64.lds
index 7e5c720..bef1ac8 100644
--- a/arch/x86/boot/compressed/vmlinux_64.lds
+++ b/arch/x86/boot/compressed/vmlinux_64.lds
@@ -39,10 +39,10 @@ SECTIONS
*(.bss.*)
*(COMMON)
. = ALIGN(8);
- _end = . ;
+ _end_before_pgt = . ;
. = ALIGN(4096);
pgtable = . ;
. = . + 4096 * 6;
- _heap = .;
+ _ebss = .;
}
}

arch/x86/boot/copy.S

View file
diff --git a/arch/x86/boot/copy.S b/arch/x86/boot/copy.S
index ef127e5..ef50c84 100644
--- a/arch/x86/boot/copy.S
+++ b/arch/x86/boot/copy.S
@@ -9,8 +9,6 @@
* ----------------------------------------------------------------------- */
/*
- * arch/i386/boot/copy.S
- *
* Memory copy routines
*/

This diff is incomplete. Download the complete patch.

arch/x86/boot/cpucheck.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/edd.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/install.sh

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/main.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/mca.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/memory.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/pm.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/pmjump.S

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/printf.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/string.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/tty.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/version.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/video-bios.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/video-vesa.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/video-vga.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/video.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/video.h

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/voyager.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/acpi/cstate.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/acpi/processor.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/cpu/cpufreq/p4-clockmod.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/cpu/mcheck/therm_throt.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/e820_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/e820_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/efi.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/efi_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/entry_32.S

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/genx2apic_uv_x.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/head64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/head_32.S

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/i387.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/kgdb.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/nmi_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/nmi_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/pci-calgary_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/pci-dma.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/pci-dma_32.c

View before deletion

This diff is incomplete. Download the complete patch.

arch/x86/kernel/pci-dma_64.c

View before deletion

This diff is incomplete. Download the complete patch.

arch/x86/kernel/pci-gart_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/pci-nommu.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/pci-swiotlb_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/process.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/process_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/process_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/setup64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/setup_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/setup_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/smpboot.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/traps_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/traps_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/tsc_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/kernel/tsc_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mach-visws/visws_apic.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mach-voyager/voyager_basic.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mach-voyager/voyager_cat.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mach-voyager/voyager_smp.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mach-voyager/voyager_thread.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/math-emu/fpu_entry.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/math-emu/fpu_system.h

View file

This diff is incomplete. Download the complete patch.

arch/x86/math-emu/reg_ld_str.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/discontig_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/init_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/init_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/ioremap.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/k8topology_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/numa_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/pgtable_32.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/mm/srat_64.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/vdso/Makefile

View file

This diff is incomplete. Download the complete patch.

arch/x86/video/fbdev.c

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/boot.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/dma-mapping.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/dma-mapping_32.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-x86/dma-mapping_64.h

View before deletion

This diff is incomplete. Download the complete patch.

include/asm-x86/e820_32.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/genapic_32.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/i387.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/numa_64.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/pci_64.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/processor.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/scatterlist.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/thread_info.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/thread_info_32.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/thread_info_64.h

View file

This diff is incomplete. Download the complete patch.

include/asm-x86/tsc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/efi.h

View file

This diff is incomplete. Download the complete patch.

include/linux/irqflags.h

View file

This diff is incomplete. Download the complete patch.

include/linux/prctl.h

View file

This diff is incomplete. Download the complete patch.

kernel/fork.c

View file

This diff is incomplete. Download the complete patch.

kernel/sys.c

View file

This diff is incomplete. Download the complete patch.

kernel/time/timekeeping.c

View file

This diff is incomplete. Download the complete patch.