mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 18:43:21 +01:00
cpumask: 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. This defines them in the generic non-NUMA case. Signed-off-by: Rusty Russell <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Tony Luck <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Richard Henderson <[email protected]>
This commit is contained in:
1 parent
aab46da052
commit
f0b848ce6f
1 file changed
+13
-1
@@ -40,6 +40,9 @@
|
||||
#ifndef node_to_cpumask
|
||||
#define node_to_cpumask(node) ((void)node, cpu_online_map)
|
||||
#endif
|
||||
#ifndef cpumask_of_node
|
||||
#define cpumask_of_node(node) ((void)node, cpu_online_mask)
|
||||
#endif
|
||||
#ifndef node_to_first_cpu
|
||||
#define node_to_first_cpu(node) ((void)(node),0)
|
||||
#endif
|
||||
@@ -54,9 +57,18 @@
|
||||
)
|
||||
#endif
|
||||
|
||||
#ifndef cpumask_of_pcibus
|
||||
#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
|
||||
cpu_all_mask : \
|
||||
cpumask_of_node(pcibus_to_node(bus)))
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_NUMA */
|
||||
|
||||
/* returns pointer to cpumask for specified node */
|
||||
/*
|
||||
* returns pointer to cpumask for specified node
|
||||
* Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
|
||||
*/
|
||||
#ifndef node_to_cpumask_ptr
|
||||
|
||||
#define node_to_cpumask_ptr(v, node) \
|
||||
|
||||
Reference in new issue
Block a user