From: Chris Wright Date: Wed, 8 Feb 2006 00:06:21 +0000 (-0800) Subject: Add Andi's x86_64 patches (dma_alloc_coherent was already there) X-Git-Tag: v2.6.15.5~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74ab008c6b5528bfff48c782d2d3a3ee537cd389;p=thirdparty%2Fkernel%2Fstable-queue.git Add Andi's x86_64 patches (dma_alloc_coherent was already there) --- diff --git a/queue/series b/queue/series index 48289f22423..cc18735596b 100644 --- a/queue/series +++ b/queue/series @@ -14,3 +14,5 @@ fix-keyctl-usage-of-strnlen_user.patch pcmcia-m-hostap_cs-y-is-not-a-legal-configuration.patch selinux-fix-size-128-slab-leak.patch fixed-hardware-rx-checksum-handling.patch +x86_64-let-impossible-cpus-point-to-reference-per-cpu-data.patch +x86_64-clear-more-state-when-ignoring-empty-node-in-srat-parsing.patch diff --git a/queue/x86_64-clear-more-state-when-ignoring-empty-node-in-srat-parsing.patch b/queue/x86_64-clear-more-state-when-ignoring-empty-node-in-srat-parsing.patch new file mode 100644 index 00000000000..9381f239dce --- /dev/null +++ b/queue/x86_64-clear-more-state-when-ignoring-empty-node-in-srat-parsing.patch @@ -0,0 +1,71 @@ +From stable-bounces@linux.kernel.org Mon Feb 6 15:26:11 2006 +Date: Tue, 07 Feb 2006 00:18:58 +0100 +From: "Andi Kleen" +To: stable@kernel.org +Cc: +Subject: [PATCH] x86_64: Clear more state when ignoring empty node in SRAT parsing + +Fix boot failures on systems with bad PXMs. + +Signed-off-by: Andi Kleen +Signed-off-by: Chris Wright +--- + + arch/x86_64/mm/srat.c | 28 +++++++++++++++++++++------- + 1 files changed, 21 insertions(+), 7 deletions(-) + +Index: linux-2.6.15.3/arch/x86_64/mm/srat.c +=================================================================== +--- linux-2.6.15.3.orig/arch/x86_64/mm/srat.c ++++ linux-2.6.15.3/arch/x86_64/mm/srat.c +@@ -25,6 +25,10 @@ static nodemask_t nodes_found __initdata + static struct node nodes[MAX_NUMNODES] __initdata; + static __u8 pxm2node[256] = { [0 ... 255] = 0xff }; + ++/* Too small nodes confuse the VM badly. Usually they result ++ from BIOS bugs. */ ++#define NODE_MIN_SIZE (4*1024*1024) ++ + static int node_to_pxm(int n); + + int pxm_to_node(int pxm) +@@ -168,22 +172,32 @@ acpi_numa_memory_affinity_init(struct ac + nd->start, nd->end); + } + ++static void unparse_node(int node) ++{ ++ int i; ++ node_clear(node, nodes_parsed); ++ for (i = 0; i < MAX_LOCAL_APIC; i++) { ++ if (apicid_to_node[i] == node) ++ apicid_to_node[i] = NUMA_NO_NODE; ++ } ++} ++ + void __init acpi_numa_arch_fixup(void) {} + + /* Use the information discovered above to actually set up the nodes. */ + int __init acpi_scan_nodes(unsigned long start, unsigned long end) + { + int i; ++ ++ for (i = 0; i < MAX_NUMNODES; i++) { ++ cutoff_node(i, start, end); ++ if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) ++ unparse_node(i); ++ } ++ + if (acpi_numa <= 0) + return -1; + +- /* First clean up the node list */ +- for_each_node_mask(i, nodes_parsed) { +- cutoff_node(i, start, end); +- if (nodes[i].start == nodes[i].end) +- node_clear(i, nodes_parsed); +- } +- + memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed)); + if (memnode_shift < 0) { + printk(KERN_ERR diff --git a/queue/x86_64-let-impossible-cpus-point-to-reference-per-cpu-data.patch b/queue/x86_64-let-impossible-cpus-point-to-reference-per-cpu-data.patch new file mode 100644 index 00000000000..322866fdcaf --- /dev/null +++ b/queue/x86_64-let-impossible-cpus-point-to-reference-per-cpu-data.patch @@ -0,0 +1,44 @@ +From stable-bounces@linux.kernel.org Mon Feb 6 15:26:07 2006 +Date: Tue, 07 Feb 2006 00:18:55 +0100 +From: "Andi Kleen" +To: stable@kernel.org +Cc: +Subject: [PATCH] x86_64: Let impossible CPUs point to reference per cpu data + +Don't mark the reference per cpu data init data (so it stays +around after boot) and point all impossible CPUs to it. This way +they reference some valid - although shared memory. Usually +this is only initialization like INIT_LIST_HEADs and there +won't be races because these CPUs never run. Still somewhat hackish. + +Signed-off-by: Andi Kleen +Signed-off-by: Chris Wright +--- + + arch/x86_64/kernel/vmlinux.lds.S | 10 ++++++---- + 1 files changed, 6 insertions(+), 4 deletions(-) + +Index: linux-2.6.15.3/arch/x86_64/kernel/vmlinux.lds.S +=================================================================== +--- linux-2.6.15.3.orig/arch/x86_64/kernel/vmlinux.lds.S ++++ linux-2.6.15.3/arch/x86_64/kernel/vmlinux.lds.S +@@ -170,13 +170,15 @@ SECTIONS + . = ALIGN(4096); + __initramfs_start = .; + .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } +- __initramfs_end = .; +- . = ALIGN(32); ++ __initramfs_end = .; ++ /* temporary here to work around NR_CPUS. If you see this comment in 2.6.17+ ++ complain */ ++ . = ALIGN(4096); ++ __init_end = .; ++ . = ALIGN(128); + __per_cpu_start = .; + .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } + __per_cpu_end = .; +- . = ALIGN(4096); +- __init_end = .; + + . = ALIGN(4096); + __nosave_begin = .;