提交 a2e212da 编写于 作者: D David Rientjes 提交者: Linus Torvalds

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: NDavid Rientjes <rientjes@google.com>
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 42ee2b74
...@@ -106,9 +106,9 @@ static __init int slit_valid(struct acpi_table_slit *slit) ...@@ -106,9 +106,9 @@ static __init int slit_valid(struct acpi_table_slit *slit)
for (j = 0; j < d; j++) { for (j = 0; j < d; j++) {
u8 val = slit->entry[d*i + j]; u8 val = slit->entry[d*i + j];
if (i == j) { if (i == j) {
if (val != 10) if (val != LOCAL_DISTANCE)
return 0; return 0;
} else if (val <= 10) } else if (val <= LOCAL_DISTANCE)
return 0; return 0;
} }
} }
...@@ -464,7 +464,7 @@ int __node_distance(int a, int b) ...@@ -464,7 +464,7 @@ int __node_distance(int a, int b)
int index; int index;
if (!acpi_slit) if (!acpi_slit)
return a == b ? 10 : 20; return a == b ? LOCAL_DISTANCE : REMOTE_DISTANCE;
index = acpi_slit->locality_count * node_to_pxm(a); index = acpi_slit->locality_count * node_to_pxm(a);
return acpi_slit->entry[index + node_to_pxm(b)]; return acpi_slit->entry[index + node_to_pxm(b)];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册