Skip to contentSkip to conversation

Export phys_cpu_present_map

PATCH In review Tom Rini 2 participants 3 messages Oct 20, 2004

Subsystems (4)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Export phys_cpu_present_map

In net/ipv6/icmp.c::icmpv6_init() there is a call to cpu_possible() which preprocesses down to "test_bit(((i)), (phys_cpu_present_map).bits)" If ipv6 is a module, phys_cpu_present_map (or cpu_possible_map which is defined t phys_cpu_present_map) needs to be exported.

arch/mips/kernel/smp.c +1 -0
@@ -44,6 +44,7 @@ cpumask_t cpu_online_map;		/* Bitmask of
 int __cpu_number_map[NR_CPUS];		/* Map physical to logical */
 int __cpu_logical_map[NR_CPUS];		/* Map logical to physical */
 
+EXPORT_SYMBOL(phys_cpu_present_map);
 EXPORT_SYMBOL(cpu_online_map);
 
 cycles_t cacheflush_time;
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#1 lore raw
Quoted 4 lines · Tom Rini

In net/ipv6/icmp.c::icmpv6_init() there is a call to cpu_possible() which preprocesses down to "test_bit(((i)), (phys_cpu_present_map).bits)" If ipv6 is a module, phys_cpu_present_map (or cpu_possible_map which is defined t phys_cpu_present_map) needs to be exported.

The loop in there should be rewritten as for_each_cpu which doesn't need this export.

author
#2 lore raw

[ Note that XFS has a similar problem, with cpu_possible() calls ]

Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Tom Rini

In net/ipv6/icmp.c::icmpv6_init() there is a call to cpu_possible() which preprocesses down to "test_bit(((i)), (phys_cpu_present_map).bits)" If ipv6 is a module, phys_cpu_present_map (or cpu_possible_map which is defined t phys_cpu_present_map) needs to be exported.

The loop in there should be rewritten as for_each_cpu which doesn't need this export.

Here's what I did:

net/ipv6/icmp.c +1 -4
@@ -691,10 +691,7 @@ int __init icmpv6_init(struct net_proto_
 	struct sock *sk;
 	int err, i, j;
 
-	for (i = 0; i < NR_CPUS; i++) {
-		if (!cpu_possible(i))
-			continue;
-
+	for_each_cpu(i) {
 

But I still get the problem. Further, on i386 cpu_possible() becomes cpu_callout_map which is exported as well.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/