aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pci.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-12-26 06:53:38 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-12-26 06:53:38 -0500
commit393d68fb9929817cde7ab31c82d66fcb28ad35fc (patch)
tree8174698205c9a5ff8f063d0bc0f5a6b80d3b1a5f /arch/x86/include/asm/pci.h
parentd62720ade82c5e5b8f9585e5ed02c89573ebf111 (diff)
cpumask: x86: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask
Impact: New APIs The old node_to_cpumask/node_to_pcibus returned a cpumask_t: these return a pointer to a struct cpumask. Part of removing cpumasks from the stack. Also makes __pcibus_to_node take a const pointer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/pci.h')
-rw-r--r--arch/x86/include/asm/pci.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
index 875b38edf193..52d80d3d94f3 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -98,9 +98,9 @@ static inline void early_quirks(void) { }
98 98
99#ifdef CONFIG_NUMA 99#ifdef CONFIG_NUMA
100/* Returns the node based on pci bus */ 100/* Returns the node based on pci bus */
101static inline int __pcibus_to_node(struct pci_bus *bus) 101static inline int __pcibus_to_node(const struct pci_bus *bus)
102{ 102{
103 struct pci_sysdata *sd = bus->sysdata; 103 const struct pci_sysdata *sd = bus->sysdata;
104 104
105 return sd->node; 105 return sd->node;
106} 106}
@@ -109,6 +109,12 @@ static inline cpumask_t __pcibus_to_cpumask(struct pci_bus *bus)
109{ 109{
110 return node_to_cpumask(__pcibus_to_node(bus)); 110 return node_to_cpumask(__pcibus_to_node(bus));
111} 111}
112
113static inline const struct cpumask *
114cpumask_of_pcibus(const struct pci_bus *bus)
115{
116 return cpumask_of_node(__pcibus_to_node(bus));
117}
112#endif 118#endif
113 119
114#endif /* _ASM_X86_PCI_H */ 120#endif /* _ASM_X86_PCI_H */