linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
	Benjamin Herrenschmidt <benh@au1.ibm.com>
Subject: Re: [PATCH] Implement GET_IP/SET_IP for powerpc architecture.
Date: Thu, 2 Feb 2012 22:06:59 +0530	[thread overview]
Message-ID: <20120202163659.GD31984@linux.vnet.ibm.com> (raw)
In-Reply-To: <201202021128.49188.vapier@gentoo.org>

* Mike Frysinger <vapier@gentoo.org> [2012-02-02 11:28:46]:

> On Thursday 02 February 2012 09:41:25 Srikar Dronamraju wrote:
> > +#define GET_FP(regs)		(0)
> > +#define SET_FP(regs, val)
> 
> ppc doesn't have a standard FP location ?
> 
> > +#define profile_pc(regs) GET_IP(regs)
> 
> pretty sure you don't need this as asm-generic/ptrace.h already has a 
> definition for you

On ppc64, profile_pc is an extern function if CONFIG_SMP is set. 
else its same as whats defined in asm-generic/ptrace.h

Now if we allow asm-generic/ptrace.h definition to take effect, then
powerpc/time.h (where the actual profile_pc  is defined as an extern
function) fails with an error for redefinition.

Hence our approach was to define profile_pc before asm-generic/ptrace.h
gets included.  One change  that we could do was to define profile_pc
only under CONFIG_SMP. But I think it makes the code less confusing.
Otherwise people might keep wondering why profile_pc is defined only for
CONFIG_SMP case.

-- 
Thanks and Regards
Srikar

  reply	other threads:[~2012-02-02 16:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-02 14:41 [PATCH] Implement GET_IP/SET_IP for powerpc architecture Srikar Dronamraju
2012-02-02 16:28 ` Mike Frysinger
2012-02-02 16:36   ` Srikar Dronamraju [this message]
2012-02-02 17:02     ` Mike Frysinger
2012-02-02 21:23   ` Benjamin Herrenschmidt
2012-02-08 14:53 ` [PATCH v2 ] " Srikar Dronamraju
2012-02-09  2:56   ` Mike Frysinger

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=20120202163659.GD31984@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=benh@au1.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=vapier@gentoo.org \
    /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).