Re: [patch] Convert sockets_in_use to use per_cpu areas

David S. Miller (davem@redhat.com)
Mon, 23 Dec 2002 12:16:32 -0800 (PST)


From: Ravikiran G Thirumalai <kiran@in.ibm.com>
Date: Mon, 23 Dec 2002 19:08:48 +0530


-static union {
- int counter;
- char __pad[SMP_CACHE_BYTES];
-} sockets_in_use[NR_CPUS] __cacheline_aligned = {{0}};
+static DEFINE_PER_CPU(int, sockets_in_use);

You have to provide an explicit initializer for DEFINE_PER_CPU
declarations or you break some platforms with older GCC's which
otherwise won't put it into the proper section.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/