Skip to content

Commit a2e212d

Browse files
rientjesLinus Torvalds
authored andcommitted
x86_64: Use LOCAL_DISTANCE and REMOTE_DISTANCE in x86_64 ACPI code
Use LOCAL_DISTANCE and REMOTE_DISTANCE in x86_64 ACPI code Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 42ee2b7 commit a2e212d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86_64/mm/srat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ static __init int slit_valid(struct acpi_table_slit *slit)
106106
for (j = 0; j < d; j++) {
107107
u8 val = slit->entry[d*i + j];
108108
if (i == j) {
109-
if (val != 10)
109+
if (val != LOCAL_DISTANCE)
110110
return 0;
111-
} else if (val <= 10)
111+
} else if (val <= LOCAL_DISTANCE)
112112
return 0;
113113
}
114114
}
@@ -464,7 +464,7 @@ int __node_distance(int a, int b)
464464
int index;
465465

466466
if (!acpi_slit)
467-
return a == b ? 10 : 20;
467+
return a == b ? LOCAL_DISTANCE : REMOTE_DISTANCE;
468468
index = acpi_slit->locality_count * node_to_pxm(a);
469469
return acpi_slit->entry[index + node_to_pxm(b)];
470470
}

0 commit comments

Comments
 (0)