Messages in this thread | | | Subject | Re: Externalize SLIT table | From | Andi Kleen <> | Date | 06 Nov 2004 07:30:29 +0100 |
| |
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/
| |