From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pqueuea.post.tele.dk (pqueuea.post.tele.dk [193.162.153.9]) by ozlabs.org (Postfix) with ESMTP id 867C767A64 for ; Mon, 17 Apr 2006 00:31:41 +1000 (EST) Received: from pasmtp.tele.dk (pasmtp.tele.dk [193.162.159.95]) by pqueuea.post.tele.dk (Postfix) with ESMTP id 2CEF5375F05 for ; Sun, 16 Apr 2006 16:04:49 +0200 (CEST) Date: Sun, 16 Apr 2006 16:03:59 +0200 From: Sam Ravnborg To: Steven Rostedt Subject: Re: [PATCH 00/05] robust per_cpu allocation for modules Message-ID: <20060416140359.GA15091@mars.ravnborg.org> References: <1145049535.1336.128.camel@localhost.localdomain> <4440855A.7040203@yahoo.com.au> <4441B02D.4000405@yahoo.com.au> <17473.60411.690686.714791@cargo.ozlabs.ibm.com> <1145194804.27407.103.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1145194804.27407.103.camel@localhost.localdomain> Cc: Andrew Morton , linux-mips@linux-mips.org, David Mosberger-Tang , linux-ia64@vger.kernel.org, Martin Mares , spyro@f2s.com, Joe Taylor , Andi Kleen , linuxppc-dev@ozlabs.org, Paul Mackerras , benedict.gaster@superh.com, bjornw@axis.com, Ingo Molnar , Nick Piggin , grundler@parisc-linux.org, rusty@rustcorp.com.au, starvik@axis.com, Linus Torvalds , Thomas Gleixner , rth@twiddle.net, Chris Zankel , tony.luck@intel.com, LKML , ralf@linux-mips.org, Marc Gauthier , lethal@linux-sh.org, schwidefsky@de.ibm.com, linux390@de.ibm.com, davem@davemloft.net, parisc-linux@parisc-linux.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, Apr 16, 2006 at 09:40:04AM -0400, Steven Rostedt wrote: > The per_cpu variables are defined with the macro > DEFINE_PER_CPU(type, var) > > This macro just places the variable into the section .data.percpu and > prepends the prefix "per_cpu__" to the variable. > > To use this variable in another .c file the declaration is used by the > macro > DECLARE_PER_CPU(type, var) > > This macro is simply the extern declaration of the variable with the > prefix added. Suprisingly this macro shows up in ~19 .c files. Only valid usage is forward declaration of a later static definition with DEFINE_PER_CPU. arch/m32r/kernel/smp.c + arch/m32r/kernel/smpboot.c is jsut one example. Just a random comment not related to Steven's patches. Sam