From: Robert Richter <robert.richter@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
oprofile-list <oprofile-list@lists.sourceforge.net>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Robert Richter <robert.richter@amd.com>
Subject: [PATCH 8/8] x86/oprofile: add the logic for enabling additional IBS bits
Date: Wed, 15 Oct 2008 22:09:10 +0200 [thread overview]
Message-ID: <1224101350-12877-9-git-send-email-robert.richter@amd.com> (raw)
In-Reply-To: <20081015110444.GA28703@elte.hu>
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
This patch adds the logic for enabling additional IBS control bits :
* IBS-Fetch IbsRandEn bit (bit 57)
* IBS-Op IbsOpCntCtl bit (bit 19)
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
---
arch/x86/oprofile/op_model_amd.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index a2e83af..5095137 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -310,12 +310,15 @@ static void op_amd_start(struct op_msrs const * const msrs)
#ifdef CONFIG_OPROFILE_IBS
if (ibs_allowed && ibs_config.fetch_enabled) {
low = (ibs_config.max_cnt_fetch >> 4) & 0xFFFF;
- high = IBS_FETCH_HIGH_ENABLE;
+ high = ((ibs_config.rand_en & 0x1) << 25) /* bit 57 */
+ + IBS_FETCH_HIGH_ENABLE;
wrmsr(MSR_AMD64_IBSFETCHCTL, low, high);
}
if (ibs_allowed && ibs_config.op_enabled) {
- low = ((ibs_config.max_cnt_op >> 4) & 0xFFFF) + IBS_OP_LOW_ENABLE;
+ low = ((ibs_config.max_cnt_op >> 4) & 0xFFFF)
+ + ((ibs_config.dispatched_ops & 0x1) << 19) /* bit 19 */
+ + IBS_OP_LOW_ENABLE;
high = 0;
wrmsr(MSR_AMD64_IBSOPCTL, low, high);
}
--
1.6.0.1
prev parent reply other threads:[~2008-10-15 21:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081015110444.GA28703@elte.hu>
2008-10-15 20:09 ` [PATCH 0/8] OProfile cleanup patches for v2.6.28 Robert Richter
2008-10-15 20:09 ` [PATCH 1/8] OProfile: Rework oprofile_add_ibs_sample() function Robert Richter
2008-10-15 20:09 ` [PATCH 2/8] OProfile: Rework string handling in setup_ibs_files() Robert Richter
2008-10-15 20:09 ` [PATCH 3/8] OProfile: Rename IBS sysfs dir into "ibs_op" Robert Richter
2008-10-15 20:09 ` [PATCH 4/8] oprofile: whitespace fixes Robert Richter
2008-10-15 20:09 ` [PATCH 5/8] oprofile: more " Robert Richter
2008-10-15 20:09 ` [PATCH 6/8] x86/oprofile: removing unused function parameter in add_ibs_begin() Robert Richter
2008-10-15 20:09 ` [PATCH 7/8] x86/oprofile: reordering functions in nmi_int.c Robert Richter
2008-10-15 20:09 ` Robert Richter [this message]
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=1224101350-12877-9-git-send-email-robert.richter@amd.com \
--to=robert.richter@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oprofile-list@lists.sourceforge.net \
--cc=suravee.suthikulpanit@amd.com \
/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