linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jochen Roth <jroth@linux.vnet.ibm.com>
To: Carl Love <cel@us.ibm.com>
Cc: linuxppc-dev@ozlabs.org,
	oprofile-list <oprofile-list@lists.sf.net>,
	cbe-oss-dev@ozlabs.org, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Cbe-oss-dev] [PATCH] Updated: Reworked Cell OProfile: SPU mutex lock fix
Date: Thu, 08 May 2008 09:50:25 +0200	[thread overview]
Message-ID: <4822B0C1.5060604@linux.vnet.ibm.com> (raw)
In-Reply-To: <1210180166.7726.19.camel@carll-linux-desktop>

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

  reply	other threads:[~2008-05-08  7:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 20:35 [Cbe-oss-dev] [PATCH] Updated: Reworked Cell OProfile: SPU mutex lock fix Carl Love
2008-05-07 16:54 ` Jochen Roth
2008-05-07 17:09   ` Carl Love
2008-05-08  7:50     ` Jochen Roth [this message]
     [not found]   ` <1210199526.7726.43.camel@carll-linux-desktop>
     [not found]     ` <4822B03B.5060509@linux.vnet.ibm.com>
2008-05-08 20:47       ` Carl Love
2008-05-09 15:07 ` Robert Richter
2008-05-10 19:07   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4822B0C1.5060604@linux.vnet.ibm.com \
    --to=jroth@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=cel@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=oprofile-list@lists.sf.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).