From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Cc: mikey@neuling.org, khandual@linux.vnet.ibm.com
Subject: [PATCH] powerpc, perf: Fix processing conditions for invalid BHRB entries
Date: Mon, 6 May 2013 14:36:46 +0530 [thread overview]
Message-ID: <1367831206-16331-1-git-send-email-khandual@linux.vnet.ibm.com> (raw)
Fixing some conditions during BHRB entry processing.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
arch/powerpc/perf/core-book3s.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 09db68d..1de2756 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -1481,25 +1481,25 @@ void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw)
target = val & BHRB_TARGET;
/* Probable Missed entry: Not applicable for POWER8 */
- if ((addr == 0) && (target == 0) && (pred == 1)) {
+ if ((addr == 0) && (!target) && pred) {
r_index++;
continue;
}
/* Real Missed entry: Power8 based missed entry */
- if ((addr == 0) && (target == 1) && (pred == 1)) {
+ if ((addr == 0) && target && pred) {
r_index++;
continue;
}
/* Reserved condition: Not a valid entry */
- if ((addr == 0) && (target == 1) && (pred == 0)) {
+ if ((addr == 0) && target && (!pred)) {
r_index++;
continue;
}
/* Is a target address */
- if (val & BHRB_TARGET) {
+ if (target) {
/* First address cannot be a target address */
if (r_index == 0) {
r_index++;
--
1.7.11.7
next reply other threads:[~2013-05-06 9:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 9:06 Anshuman Khandual [this message]
2013-05-06 11:11 ` [PATCH] powerpc, perf: Fix processing conditions for invalid BHRB entries Michael Neuling
2013-05-06 12:25 ` Anshuman Khandual
2013-05-06 21:22 ` Michael Neuling
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=1367831206-16331-1-git-send-email-khandual@linux.vnet.ibm.com \
--to=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.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).