+++ This bug was initially created as a clone of Bug #314611 +++ This patch is for controlling the upper 32bits of the event ctrl msrs. This includes the upper 4 bits of the event select and the Guest Only and Host Only bits. This patch is necessary to make Event Based Profiling work reliably on a Family 10h processor. This kernel patch needs the appropriate user oprofile to be updated and working as well. There may be a 5.1 request that needs to get updated in case it didn't make it into R5.1. diff -Naur linux-2.6.18.orig/arch/i386/oprofile/op_model_athlon.c linux-2.6.18.PMCpatched/arch/i386/oprofile/op_model_athlon.c --- linux-2.6.18.orig/arch/i386/oprofile/op_model_athlon.c 2006-09-19 23:42:06.000000000 -0400 +++ linux-2.6.18.PMCpatched/arch/i386/oprofile/op_model_athlon.c 2007-09-28 13:43:02.000000000 -0400 @@ -1,6 +1,6 @@ /** * @file op_model_athlon.h - * athlon / K7 model-specific MSR operations + * athlon / K7 / K8 / Family 10h model-specific MSR operations * * @remark Copyright 2002 OProfile authors * @remark Read the file COPYING @@ -30,11 +30,15 @@ #define CTRL_SET_ACTIVE(n) (n |= (1<<22)) #define CTRL_SET_INACTIVE(n) (n &= ~(1<<22)) #define CTRL_CLEAR(x) (x &= (1<<21)) +#define CTRL_CLEAR_HI(x) ( x &= 0xfffffcf0 ) #define CTRL_SET_ENABLE(val) (val |= 1<<20) #define CTRL_SET_USR(val,u) (val |= ((u & 1) << 16)) #define CTRL_SET_KERN(val,k) (val |= ((k & 1) << 17)) #define CTRL_SET_UM(val, m) (val |= (m << 8)) -#define CTRL_SET_EVENT(val, e) (val |= e) +#define CTRL_SET_EVENT_LOW(val, e) (val |= (e & 0xff)) +#define CTRL_SET_EVENT_HIGH(val,e) (val |= ((e >> 8) & 0xf)) +#define CTRL_SET_HOST_ONLY(val, h) (val |= ((h & 1) << 9)) +#define CTRL_SET_GUEST_ONLY(val, h) (val |= ((h & 1) << 8)) static unsigned long reset_value[NUM_COUNTERS]; @@ -78,11 +82,15 @@ CTRL_READ(low, high, msrs, i); CTRL_CLEAR(low); + CTRL_CLEAR_HI(high); CTRL_SET_ENABLE(low); CTRL_SET_USR(low, counter_config[i].user); CTRL_SET_KERN(low, counter_config[i].kernel); CTRL_SET_UM(low, counter_config[i].unit_mask); - CTRL_SET_EVENT(low, counter_config[i].event); + CTRL_SET_EVENT_LOW(low, counter_config[i].event); + CTRL_SET_EVENT_HIGH(high, counter_config[i].event); + CTRL_SET_HOST_ONLY(high, 0); + CTRL_SET_GUEST_ONLY(high, 0); CTRL_WRITE(low, high, msrs, i); } else { reset_value[i] = 0; -- Additional comment from bnagendr on 2007-10-05 10:06 EST -- Created an attachment (id=217381) oprofile GH event based patch This patch has been posted to rhkernel-list on Oct 5, 07. -- Additional comment from pm-rhel on 2007-11-13 16:15 EST -- This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. -- Additional comment from dzickus on 2007-12-14 13:41 EST -- in 2.6.18-60.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
Created attachment 295336 [details] This fixes the Greyhound oprofile PMC patch Part of the support went into R4.6, this patch completes the support.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Committed in 68.23 . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
added to RHEL4.7 Driver Updates: <quote> Oprofile now supports event-based profiling on Greyhound hardware. </quote> please advise if any further revisions are required. thanks!
Hi, the RHEL4.7 release notes deadline is on June 17, 2008 (Tuesday). they will undergo a final proofread before being dropped to translation, at which point no further additions or revisions will be entertained. a mockup of the RHEL4.7 release notes can be viewed here: http://intranet.corp.redhat.com/ic/intranet/RHEL4u7relnotesmockup.html please use the aforementioned link to verify if your bugzilla is already in the release notes (if it needs to be). each item in the release notes contains a link to its original bug; as such, you can search through the release notes by bug number. Cheers, Don
~~~~~~~~~~~~~~ ~ Attention: ~ Feedback requested regarding this **High Priority** bug. ~~~~~~~~~~~~~~ A fix for this issue should be included in the latest packages contained in RHEL4.7-Snapshot1--available now on partners.redhat.com. After you (Red Hat Partner) have verified that this issue has been addressed, submit a comment describing the passing results of your test in appropriate detail, along with which snapshot and package version tested. The bugzilla will be updated by Red Hat Quality Engineering for you when this information has been received. If you believe this issue has not properly fixed or you are unable to verify the issue for any reason, please add a comment describing the most recent issues you are experiencing, along with which snapshot and package version tested. If you believe the bug has not been fixed, change the status of the bug to ASSIGNED. If you are receiving this message in Issue Tracker, please reply with a message to Issue Tracker about your results and bugzilla will be updated for you. If you need assistance accessing ftp://partners.redhat.com, please contact your Partner Manager. Thank you Red Hat QE Partner Management
~~~~~~~~~~~~~~ ~ Attention: ~ Immediate attention required for this ***High Priority*** bug. ~~~~~~~~~~~~~~ A fix for this issue should be included in the latest packages contained in **RHEL4.7-Snapshot2**, accessible now on http://partners.redhat.com. After you (Red Hat Partner) have verified that this issue has been addressed, submit a comment describing the results of your test in appropriate detail, along with which snapshot and package version tested. The bugzilla will be updated by Red Hat Quality Engineering for you when this information has been received. If this issue has not been properly fixed or you are unable to verify the issue for any reason, please add a comment describing the most recent issues you are experiencing, along with which snapshot and package version tested. If you are sure the bug has not been fixed, change the status of the bug to ASSIGNED. For IssueTracker users, submit verification results as usual; Bugzilla will be updated by Red Hat Quality Engineering for you. For additional information, contact your Partner Manager. Thank you, Red Hat QE Partner Management
~~~~~~~~~~~~~~ ~ Attention: ~ ~~~~~~~~~~~~~~ A fix for this issue should be included in the latest kernel packages contained in **kernel 2.6.9-73.EL**, accessible now on http://partners.redhat.com. After you (Red Hat Partner) have verified that this issue has been addressed, submit a comment describing the results of your test in appropriate detail, along with which snapshot and package version tested. The bugzilla will be updated by Red Hat Quality Engineering for you when this information has been received. If this issue has not been properly fixed or you are unable to verify the issue for any reason, please add a comment describing the most recent issues you are experiencing, along with which snapshot and package version tested. If you are sure the bug has not been fixed, change the status of the bug to ASSIGNED. For IssueTracker users, submit verification results as usual; Bugzilla will be updated by Red Hat Quality Engineering for you. For additional information, contact your Partner Manager. Thank you, Red Hat QE Partner Management
~ Attention ~ Testing Feedback Deadlines are approaching! This bug should fixed in Partner Snapshot 4, which is now available on partners.redhat.com, ready for testing. We are approaching the end of RHEL 4.7 testing cycle. It is important to let us know of your testing results *as soon as possible*. If any issues are found once the testing phase deadline has passed, you might lose your opportunity to include the fix in this RHEL update. If you have verified that this bug has been properly fixed or have discovered any issues, please provide detailed feedback of your testing results, including the package version and snapshot tested. The bug status will be updated for you, based on testing results. Contact your Partner Manager with any additional questions.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2008-0665.html
*** Bug 314621 has been marked as a duplicate of this bug. ***