diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-26 22:23:38 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-26 22:23:38 +1030 |
commit | 393d68fb9929817cde7ab31c82d66fcb28ad35fc (patch) | |
tree | 8174698205c9a5ff8f063d0bc0f5a6b80d3b1a5f /arch/x86/include/asm/pci.h | |
parent | d62720ade82c5e5b8f9585e5ed02c89573ebf111 (diff) | |
download | op-kernel-dev-393d68fb9929817cde7ab31c82d66fcb28ad35fc.zip op-kernel-dev-393d68fb9929817cde7ab31c82d66fcb28ad35fc.tar.gz |
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.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index 875b38e..52d80d3 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) { } #ifdef CONFIG_NUMA /* Returns the node based on pci bus */ -static inline int __pcibus_to_node(struct pci_bus *bus) +static inline int __pcibus_to_node(const struct pci_bus *bus) { - struct pci_sysdata *sd = bus->sysdata; + const struct pci_sysdata *sd = bus->sysdata; return sd->node; } @@ -109,6 +109,12 @@ static inline cpumask_t __pcibus_to_cpumask(struct pci_bus *bus) { return node_to_cpumask(__pcibus_to_node(bus)); } + +static inline const struct cpumask * +cpumask_of_pcibus(const struct pci_bus *bus) +{ + return cpumask_of_node(__pcibus_to_node(bus)); +} #endif #endif /* _ASM_X86_PCI_H */ |