diff options
Diffstat (limited to 'include/asm-generic/topology.h')
| -rw-r--r-- | include/asm-generic/topology.h | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 54bbf6e04ee..fc824e2828f 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h @@ -5,7 +5,7 @@ * * Copyright (C) 2002, IBM Corp. * - * All rights reserved. + * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,37 +34,43 @@ #ifndef cpu_to_node #define cpu_to_node(cpu) ((void)(cpu),0) #endif +#ifndef set_numa_node +#define set_numa_node(node) +#endif +#ifndef set_cpu_numa_node +#define set_cpu_numa_node(cpu, node) +#endif +#ifndef cpu_to_mem +#define cpu_to_mem(cpu) ((void)(cpu),0) +#endif + #ifndef parent_node #define parent_node(node) ((void)(node),0) #endif -#ifndef node_to_cpumask -#define node_to_cpumask(node) ((void)node, cpu_online_map) -#endif -#ifndef node_to_first_cpu -#define node_to_first_cpu(node) ((void)(node),0) +#ifndef cpumask_of_node +#define cpumask_of_node(node) ((void)node, cpu_online_mask) #endif #ifndef pcibus_to_node #define pcibus_to_node(bus) ((void)(bus), -1) #endif -#ifndef pcibus_to_cpumask -#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ - CPU_MASK_ALL : \ - node_to_cpumask(pcibus_to_node(bus)) \ - ) +#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 */ -#ifndef node_to_cpumask_ptr - -#define node_to_cpumask_ptr(v, node) \ - cpumask_t _##v = node_to_cpumask(node); \ - const cpumask_t *v = &_##v +#if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES) -#define node_to_cpumask_ptr_next(v, node) \ - _##v = node_to_cpumask(node) +#ifndef set_numa_mem +#define set_numa_mem(node) #endif +#ifndef set_cpu_numa_mem +#define set_cpu_numa_mem(cpu, node) +#endif + +#endif /* !CONFIG_NUMA || !CONFIG_HAVE_MEMORYLESS_NODES */ #endif /* _ASM_GENERIC_TOPOLOGY_H */ |
