lkml.org 
[lkml]   [2004]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Externalize SLIT table
From
Date
Jack Steiner <steiner@sgi.com> writes:
>
> +static ssize_t node_read_distance(struct sys_device * dev, char * buf)
> +{
> + int nid = dev->id;
> + int len = 0;
> + int i;
> +
> + for (i = 0; i < numnodes; i++)
> + len += sprintf(buf + len, "%s%d", i ? " " : "", node_distance(nid, i));


One problem is that most architectures define node_distance currently
as nid != i. This would give 0 on them for the identity mapping and 10
on IA64 which uses the SLIT values. Not good for a portable interface.
I would suggest to at least change them to return 10 for a zero node distance.

Also in general I would prefer if you could move all the SLIT parsing
into drivers/acpi/numa.c. Then the other ACPI architectures don't need to copy
the basically identical code from ia64.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.065 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site