提交 5f64f90e 编写于 作者: H Hui Tang 提交者: Xie XiuQi

uacce: modify calculation method for node distance.

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Feature or Bugfix:Bugfix
Signed-off-by: NHui Tang <tanghui20@huawei.com>
Reviewed-by: Nxuzaibo <xuzaibo@huawei.com>
Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 3f47b117
......@@ -1353,9 +1353,10 @@ static ssize_t numa_distance_show(struct device *dev,
int distance = 0;
#ifdef CONFIG_NUMA
distance = cpu_to_node(smp_processor_id()) - uacce->pdev->numa_node;
distance = node_distance(uacce->pdev->numa_node,
cpu_to_node(smp_processor_id()));
#endif
return sprintf(buf, "%d\n", abs(distance));
return sprintf(buf, "%d\n", distance);
}
static DEVICE_ATTR_RO(numa_distance);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册