Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309736 Details for
Bug 451591
Handle invalid ACPI SLIT table
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
a back port
451591.patch (text/plain), 3.71 KB, created by
Luming Yu
on 2008-06-18 14:23:26 UTC
(
hide
)
Description:
a back port
Filename:
MIME Type:
Creator:
Luming Yu
Created:
2008-06-18 14:23:26 UTC
Size:
3.71 KB
patch
obsolete
>diff -Bru 0/arch/ia64/kernel/acpi.c 1/arch/ia64/kernel/acpi.c >--- 0/arch/ia64/kernel/acpi.c 2008-06-18 00:33:09.000000000 -0400 >+++ 1/arch/ia64/kernel/acpi.c 2008-06-18 02:20:29.000000000 -0400 >@@ -456,7 +456,6 @@ > printk(KERN_ERR > "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", > len, slit->header.length); >- memset(numa_slit, 10, sizeof(numa_slit)); > return; > } > slit_table = slit; >@@ -566,8 +565,14 @@ > printk(KERN_INFO "Number of memory chunks in system = %d\n", > num_node_memblks); > >- if (!slit_table) >+ if (!slit_table) { >+ for (i = 0; i < MAX_NUMNODES; i++) >+ for (j = 0; j < MAX_NUMNODES; j++) >+ node_distance(i, j) = i == j ? LOCAL_DISTANCE : >+ REMOTE_DISTANCE; > return; >+ } >+ > memset(numa_slit, -1, sizeof(numa_slit)); > for (i = 0; i < slit_table->localities; i++) { > if (!pxm_bit_test(i)) >Only in 1/arch/ia64/kernel: sal.c.orig >diff -Bru 0/arch/x86_64/mm/srat.c 1/arch/x86_64/mm/srat.c >--- 0/arch/x86_64/mm/srat.c 2008-06-18 00:33:08.000000000 -0400 >+++ 1/arch/x86_64/mm/srat.c 2008-06-18 02:20:29.000000000 -0400 >@@ -89,36 +89,9 @@ > return numa_off || acpi_numa < 0; > } > >-/* >- * A lot of BIOS fill in 10 (= no distance) everywhere. This messes >- * up the NUMA heuristics which wants the local node to have a smaller >- * distance than the others. >- * Do some quick checks here and only use the SLIT if it passes. >- */ >-static __init int slit_valid(struct acpi_table_slit *slit) >-{ >- int i, j; >- int d = slit->localities; >- for (i = 0; i < d; i++) { >- for (j = 0; j < d; j++) { >- u8 val = slit->entry[d*i + j]; >- if (i == j) { >- if (val != 10) >- return 0; >- } else if (val <= 10) >- return 0; >- } >- } >- return 1; >-} >- > /* Callback for SLIT parsing */ > void __init acpi_numa_slit_init(struct acpi_table_slit *slit) > { >- if (!slit_valid(slit)) { >- printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n"); >- return; >- } > acpi_slit = slit; > } > >diff -Bru 0/drivers/acpi/numa.c 1/drivers/acpi/numa.c >--- 0/drivers/acpi/numa.c 2008-06-18 00:33:15.000000000 -0400 >+++ 1/drivers/acpi/numa.c 2008-06-18 02:20:50.000000000 -0400 >@@ -141,19 +141,42 @@ > } > } > >+/* >+ * A lot of BIOS fill in 10 (= no distance) everywhere. This messes >+ * up the NUMA heuristics which wants the local node to have a smaller >+ * distance than the others. >+ * Do some quick checks here and only use the SLIT if it passes. >+ */ >+static __init int slit_valid(struct acpi_table_slit *slit) >+{ >+ int i, j; >+ int d = slit->localities; >+ for (i = 0; i < d; i++) { >+ for (j = 0; j < d; j++) { >+ u8 val = slit->entry[d*i + j]; >+ if (i == j) { >+ if (val != LOCAL_DISTANCE) >+ return 0; >+ } else if (val <= LOCAL_DISTANCE) >+ return 0; >+ } >+ } >+ return 1; >+} >+ > static int __init acpi_parse_slit(unsigned long phys_addr, unsigned long size) > { > struct acpi_table_slit *slit; >- u32 localities; > > if (!phys_addr || !size) > return -EINVAL; > > slit = (struct acpi_table_slit *)__va(phys_addr); > >- /* downcast just for %llu vs %lu for i386/ia64 */ >- localities = (u32) slit->localities; >- >+ if (!slit_valid(slit)) { >+ printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n"); >+ return -EINVAL; >+ } > acpi_numa_slit_init(slit); > > return 0; >diff -Bru 0/include/linux/topology.h 1/include/linux/topology.h >--- 0/include/linux/topology.h 2008-06-18 00:33:26.000000000 -0400 >+++ 1/include/linux/topology.h 2008-06-18 02:20:29.000000000 -0400 >@@ -50,10 +50,11 @@ > for_each_online_node(node) \ > if (nr_cpus_node(node)) > >-#ifndef node_distance > /* Conform to ACPI 2.0 SLIT distance definitions */ > #define LOCAL_DISTANCE 10 > #define REMOTE_DISTANCE 20 >+ >+#ifndef node_distance > #define node_distance(from,to) ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) > #endif > #ifndef RECLAIM_DISTANCE
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 451591
: 309736