Skip to content

Commit

Permalink
x86/PCI: default pcibus cpumask to all cpus if it lacks affinity
Browse files Browse the repository at this point in the history
The early initialization of the pci bus to node mapping leaves all busses
with a node id of -1 if it lacks memory affinity.  Thus, cpumask_of_pcibus
must return all online cpus for such busses.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
David Rientjes authored and Jesse Barnes committed Sep 18, 2009
1 parent be3652b commit 7715a1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/x86/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ static inline int __pcibus_to_node(const struct pci_bus *bus)
static inline const struct cpumask *
cpumask_of_pcibus(const struct pci_bus *bus)
{
return cpumask_of_node(__pcibus_to_node(bus));
int node;

node = __pcibus_to_node(bus);
return (node == -1) ? cpu_online_mask :
cpumask_of_node(node);
}
#endif

Expand Down

0 comments on commit 7715a1e

Please sign in to comment.