[Patch 22/23] mask v2 - Fix cpumask in asm-x86_64/topology.h

Paul Jackson
2004-04-01T21:29:27Z

Patch_22_of_23 - Remove cpumask hack from asm-x86_64/topology.h
This file had the cpumask cpu_online_map as type
unsigned long, instead of type cpumask_t, for no good
reason that I could see. So I changed it. Everywhere
else, cpu_online_map is already of type cpumask_t.

Diffstat Patch_22_of_23:
topology.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff -Nru a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h
--- a/include/asm-x86_64/topology.h Mon Mar 29 01:04:06 2004
+++ b/include/asm-x86_64/topology.h Mon Mar 29 01:04:06 2004
@@ -10,18 +10,18 @@
/* Map the K8 CPU local memory controllers to a simple 1:1 CPU:NODE topology */

extern int fake_node;
-/* This is actually a cpumask_t, but doesn't matter because we don't have
- >BITS_PER_LONG CPUs */
-extern unsigned long cpu_online_map;
+extern cpumask_t cpu_online_map;

#define cpu_to_node(cpu) (fake_node ? 0 : (cpu))
#define parent_node(node) (node)
#define node_to_first_cpu(node) (fake_node ? 0 : (node))
#define node_to_cpumask(node) (fake_node ? cpu_online_map : (1UL << (node)))

-static inline unsigned long pcibus_to_cpumask(int bus)
+static inline cpumask_t pcibus_to_cpumask(int bus)
{
- return mp_bus_to_cpumask[bus] & cpu_online_map;
+ cpumask_t tmp;
+ cpus_and(tmp, mp_bus_to_cpumask[bus], cpu_online_map);
+ return tmp;
}

#define NODE_BALANCE_RATE 30 /* CHECKME */