You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (23 commits) ACPICA: fix stray va_end() caused by mis-merge ACPI: Reject below-freezing temperatures as invalid critical temperatures ACPICA: Fix for access to deleted object <regression> ACPICA: Fix to make _SST method optional ACPICA: Fix for Load operator, load table at the namespace root ACPICA: Ignore ACPI table signature for Load() operator ACPICA: Fix to allow zero-length ASL field declarations ACPI: use memory_read_from_buffer() bay: exit if notify handler cannot be installed dock.c remove trailing printk whitespace proper prototype for acpi_processor_tstate_has_changed() ACPI: handle invalid ACPI SLIT table PNPACPI: use _CRS IRQ descriptor length for _SRS pnpacpi: fix shareable IRQ encode/decode pnpacpi: fix IRQ flag decoding MAINTAINERS: update ACPI homepage ACPI 2.6.26-rc2: Add missing newline to DSDT/SSDT warning message ACPI: EC: Use msleep instead of udelay while waiting for event. thinkpad-acpi: fix LED handling on older ThinkPads thinkpad-acpi: fix initialization error paths ...
This commit is contained in:
@@ -465,7 +465,6 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
|
||||
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;
|
||||
@@ -574,8 +573,14 @@ void __init acpi_numa_arch_fixup(void)
|
||||
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->locality_count; i++) {
|
||||
if (!pxm_bit_test(i))
|
||||
|
||||
@@ -97,36 +97,9 @@ 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->locality_count;
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user