From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags()
Date: Mon, 26 Dec 2016 09:45:18 +0530 [thread overview]
Message-ID: <58609956.3040204@linux.vnet.ibm.com> (raw)
In-Reply-To: <1482559549-22273-1-git-send-email-maddy@linux.vnet.ibm.com>
On 12/24/2016 11:35 AM, Madhavan Srinivasan wrote:
> Cleanup to use is_kernel_addr macro.
>
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
> arch/powerpc/perf/core-book3s.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
> index 2cdf2647cdb0..d9c74fd1b37b 100644
> --- a/arch/powerpc/perf/core-book3s.c
> +++ b/arch/powerpc/perf/core-book3s.c
> @@ -243,7 +243,7 @@ static inline u32 perf_get_misc_flags(struct pt_regs *regs)
> */
> if (ppmu->flags & PPMU_NO_SIPR) {
> unsigned long siar = mfspr(SPRN_SIAR);
> - if (siar >= PAGE_OFFSET)
> + if (is_kernel_addr(siar))
> return PERF_RECORD_MISC_KERNEL;
> return PERF_RECORD_MISC_USER;
> }
While you are at this, why not also clean up these in the xmon code
as well.
arch/powerpc/xmon/xmon.c: if (sp < PAGE_OFFSET) {
arch/powerpc/xmon/xmon.c: if (lr < PAGE_OFFSET
arch/powerpc/xmon/xmon.c: } else if (lr >= PAGE_OFFSET
arch/powerpc/xmon/xmon.c: if (addr < PAGE_OFFSET)
next prev parent reply other threads:[~2016-12-26 4:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-24 6:05 [PATCH] powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags() Madhavan Srinivasan
2016-12-26 4:15 ` Anshuman Khandual [this message]
2017-01-05 11:09 ` Madhavan Srinivasan
2017-02-19 11:33 ` Michael Ellerman
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=58609956.3040204@linux.vnet.ibm.com \
--to=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.