From mboxrd@z Thu Jan 1 00:00:00 1970 From: Helge Deller Subject: Re: [PATCH] Change cpu_data[] and cpu_devices[] from array sized by NR_CPUS to per_cpu variables Date: Wed, 27 Aug 2008 22:42:39 +0200 Message-ID: <48B5BC3F.5080604@gmx.de> References: <200808242026.06295.deller@gmx.de> <200808242121.49849.deller@gmx.de> <48B1D185.4060805@gmx.de> <20080827045110.GA30954@colo.lackof.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linux-parisc , Kyle McMartin To: Grant Grundler Return-path: In-Reply-To: <20080827045110.GA30954@colo.lackof.org> List-ID: List-Id: linux-parisc.vger.kernel.org Grant Grundler wrote: > On Sun, Aug 24, 2008 at 11:24:21PM +0200, Helge Deller wrote: >> Updated patch attached, which fixes some build problems and section >> mismatches. >> Boot-tested on a UP 32bit machine with CONFIG_SMP=y. > > Fixed this build failure (64-bit): > CC arch/parisc/kernel/perf.o > arch/parisc/kernel/perf.c: In function 'perf_init': > arch/parisc/kernel/perf.c:544: error: 'cpu_data' undeclared (first use in this function) > arch/parisc/kernel/perf.c:544: error: (Each undeclared identifier is reported only once > arch/parisc/kernel/perf.c:544: error: for each function it appears in.) > make[1]: *** [arch/parisc/kernel/perf.o] Error 1 > > Signed-off-by: Grant Grundler Thanks! Acked-by: Helge Deller > diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c > index f696f57..c661db7 100644 > --- a/arch/parisc/kernel/perf.c > +++ b/arch/parisc/kernel/perf.c > @@ -55,6 +55,7 @@ > #include > #include > #include /* for __raw_read() */ > +#include > > #include "perf_images.h" > > @@ -541,9 +542,9 @@ static int __init perf_init(void) > spin_lock_init(&perf_lock); > > /* TODO: this only lets us access the first cpu.. what to do for SMP? */ > - cpu_device = cpu_data[0].dev; > + cpu_device = per_cpu(cpu_data, 0).dev; > printk("Performance monitoring counters enabled for %s\n", > - cpu_data[0].dev->name); > + cpu_device->name); > > return 0; > }