This patch removes the obsolete IBS flags HAS_IBS_EXT and
USE_EI. Since Barcelona RevB these features are always
available. Thus, they are no longer needed.

Signed-off-by: Robert Richter <[EMAIL PROTECTED]>
---
 arch/x86/perfmon/perfmon_amd64.c |   37 ++++++++-----------------------------
 1 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/arch/x86/perfmon/perfmon_amd64.c b/arch/x86/perfmon/perfmon_amd64.c
index d8ad321..f60ce8e 100644
--- a/arch/x86/perfmon/perfmon_amd64.c
+++ b/arch/x86/perfmon/perfmon_amd64.c
@@ -43,8 +43,6 @@ MODULE_PARM_DESC(force_nmi, "bool: force use of NMI for PMU 
interrupt");
 module_param(force_nmi, bool, 0600);
 
 #define HAS_IBS                0x01    /* has IBS  support */
-#define HAS_IBS_EXT    0x02    /* has extended IBS support */
-#define USE_EI         0x04    /* uses extended interrupts */
 
 static u8  ibs_eilvt_off, ibs_status;  /* AMD: extended interrupt LVT offset */
 
@@ -397,9 +395,7 @@ static void pfm_amd64_check_registers(void)
 {
        u16 i;
 
-       PFM_DBG("has_ibs=%d has_ibs_ext=%d",
-               !!(ibs_status & HAS_IBS),
-               !!(ibs_status & HAS_IBS_EXT));
+       PFM_DBG("has_ibs=%d", !!(ibs_status & HAS_IBS));
 
        __set_bit(0, cast_ulp(enable_mask));
        __set_bit(1, cast_ulp(enable_mask));
@@ -423,13 +419,6 @@ static void pfm_amd64_check_registers(void)
        }
 
        /*
-        * remove IBS extended registers if feature not present
-        */
-       if (!(ibs_status & HAS_IBS_EXT)) {
-               for (i = 11; i < 14; i++)
-                       pfm_amd64_pmd_desc[i].type = PFM_REG_NA;
-       }
-       /*
         * adjust reserved bit fields for family 16
         */
        if (current_cpu_data.x86 == 16) {
@@ -451,10 +440,9 @@ static int pfm_amd64_probe_pmu(void)
        case 16:
                if (current_cpu_data.x86_model >= 2) {
                        /* Family 10h, RevB and later */
-                       ibs_status |= HAS_IBS_EXT | USE_EI;
+                       ibs_status |= HAS_IBS;
+                       rdmsrl(MSR_AMD64_IBSCTL, val);
                }
-               ibs_status |= HAS_IBS;
-               rdmsrl(MSR_AMD64_IBSCTL, val);
        case 15:
        case  6:
                PFM_INFO("found family=%d VAL=0x%llx", current_cpu_data.x86, 
(unsigned long long)val);
@@ -479,27 +467,18 @@ static int pfm_amd64_probe_pmu(void)
        if (force_nmi)
                pfm_amd64_pmu_info.flags |= PFM_X86_FL_USE_NMI;
 
-       /* Setup extended interrupt */
-       if (ibs_status & USE_EI) {
+       if (ibs_status & HAS_IBS) {
+               /* Setup extended interrupt */
                if (pfm_amd64_setup_eilvt()) {
                        PFM_INFO("Failed to initialize extended interrupts "
                                 "for IBS");
-                       ibs_status  &= ~(HAS_IBS | HAS_IBS_EXT | USE_EI);
+                       ibs_status  &= ~HAS_IBS;
                        PFM_INFO("Unable to use IBS");
+               } else {
+                       PFM_INFO("IBS supported");
                }
        }
 
-       if (ibs_status & HAS_IBS)
-               PFM_INFO("IBS supported");
-
-       if (ibs_status & HAS_IBS_EXT)
-               PFM_INFO("IBS extended registers supported");
-
-       if (ibs_status & USE_EI)
-               PFM_INFO("Using extended interrupts for IBS");
-       else if (ibs_status & (HAS_IBS|HAS_IBS_EXT))
-               PFM_INFO("Using performance counter interrupts for IBS");
-
        pfm_amd64_check_registers();
 
        return 0;
-- 
1.5.5.3



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to