[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4822B0C1.5060604@linux.vnet.ibm.com>
Date: Thu, 08 May 2008 09:50:25 +0200
From: Jochen Roth <jroth@...ux.vnet.ibm.com>
To: Carl Love <cel@...ibm.com>
CC: linuxppc-dev@...abs.org, cbe-oss-dev@...abs.org,
linux-kernel <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
oprofile-list <oprofile-list@...ts.sf.net>
Subject: Re: [Cbe-oss-dev] [PATCH] Updated: Reworked Cell OProfile: SPU mutex
lock fix
Carl Love wrote:
>> > +void oprofile_add_value(unsigned long value, int cpu) {
>> > + struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[cpu];
>>
>> Shouldn't it be
>> struct oprofile_cpu_buffer *cpu_buf = &per_cpu(cpu_buffer, cpu);
>
> No, I don't think so. Take a look at the other functions in
> drivers/oprofile/cpu_buffer.c. For example oprofile_add_trace(). You
> will see that the cpu_buffer is not accessed using the per_cpu
> construct. Not sure why the compiler would complain about the
> oprofile_add_value() function but not one of the other functions like
> oprofile_add_trace().
Well, actually the other functions like oprofile_add_trace are using the
&__get_cpu_var(cpu_buffer) construct.
> What was the compiler error that you saw?
Here they are:
/home/jroth/kernel/spufs/arch/powerpc/oprofile/../../../drivers/oprofile/cpu_buffer.c:
In function ‘oprofile_add_value’:
/home/jroth/kernel/spufs/arch/powerpc/oprofile/../../../drivers/oprofile/cpu_buffer.c:234:
error: ‘cpu_buffer’ undeclared (first use in this function)
cpu_buffer is defined by the DEFINE_PER_CPU_SHARED_ALIGNED macro:
DEFINE_PER_CPU_SHARED_ALIGNED(struct oprofile_cpu_buffer, cpu_buffer);
> I will try getting Jeremy's kernel and applying the patch there to see
> if it works.
You'll find his tree at
git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs.git
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists