Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [patch 6/6] x86: cpumask_of_node() should handle -1 as a node | Date | Thu, 7 Jan 2010 11:09:10 +1030 |
| |
On Thu, 7 Jan 2010 10:21:06 am David Rientjes wrote: > On Thu, 7 Jan 2010, Anton Blanchard wrote: > > > I don't like the use of -1 as a node, but it's much more widespread than > > x86; including sh, powerpc, sparc and the generic topology code. eg: > > > > > > #fdef CONFIG_PCI > > extern int pcibus_to_node(struct pci_bus *pbus); > > #else > > static inline int pcibus_to_node(struct pci_bus *pbus) > > { > > return -1; > > } > > This seems to be the same semantics that NUMA_NO_NODE was defined for, > it's not necessarily a special case.
It's widespread, and we've just had another bug due to pcibus_to_node handling -1 and cpumask_of_node not. (Search lkml for subject "[Regression] 2.6.33-rc2 - pci: Commit e0cd516 causes OOPS").
So I think the evidence is in favor of just handling -1.
Cheers, Rusty.
| |