Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17952
b: refs/heads/master
c: 1584b89
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jan 12, 2006
1 parent 79bf74f commit 58fc949
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a4a76cc1057de0dc96ee481590347aa8c5b9ffb
refs/heads/master: 1584b89c921acefe88881f08d836d80f00600a84
27 changes: 27 additions & 0 deletions trunk/arch/x86_64/mm/srat.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,36 @@ static __init inline int srat_disabled(void)
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;
}

Expand Down

0 comments on commit 58fc949

Please sign in to comment.