netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2.6.9] Export phys_cpu_present_map
       [not found] <20041020171626.GG12544@smtp.west.cox.net>
@ 2004-10-20 17:49 ` Christoph Hellwig
  2004-10-20 18:16   ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2004-10-20 17:49 UTC (permalink / raw)
  To: Tom Rini; +Cc: linux-mips, netdev

On Wed, Oct 20, 2004 at 10:16:26AM -0700, Tom Rini wrote:
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.9] Export phys_cpu_present_map
  2004-10-20 17:49 ` [PATCH 2.6.9] Export phys_cpu_present_map Christoph Hellwig
@ 2004-10-20 18:16   ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2004-10-20 18:16 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-mips, netdev

[ Note that XFS has a similar problem, with cpu_possible() calls ]
On Wed, Oct 20, 2004 at 07:49:05PM +0200, Christoph Hellwig wrote:
> On Wed, Oct 20, 2004 at 10:16:26AM -0700, Tom Rini wrote:
> > 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:
--- linux-2.6.9.orig/net/ipv6/icmp.c
+++ linux-2.6.9/net/ipv6/icmp.c
@@ -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.

-- 
Tom Rini
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-20 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20041020171626.GG12544@smtp.west.cox.net>
2004-10-20 17:49 ` [PATCH 2.6.9] Export phys_cpu_present_map Christoph Hellwig
2004-10-20 18:16   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).