Re: [patch 21/24] perfmon: Intel architectural PMU support (x86)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Gleixner
Date: Wednesday, November 26, 2008 - 7:55 am

On Wed, 26 Nov 2008, eranian@googlemail.com wrote:


Why do we need enable_mask twice for AMD and Intel ?


static


in arch/x86/include/asm/intel_arch_perfmon.h we have already:

union cpuid10_eax {
        struct {
                unsigned int version_id:8;
                unsigned int num_counters:8;
                unsigned int bit_width:8;
                unsigned int mask_length:8;
        } split;
        unsigned int full;
};

Can we either use this or remove it ?



A) static
B) Please move it to the bottom to avoid all the forward declarations.


  __init ?


  Ditto.


  Ditto.


  Ditto.


  -ENOPARSE


  This sets bit 3


  And this sets bit 2 and 3. 


So we have:

   set->used_pmcs and enable_mask and max_enable.

Why can set->used_pmcs contain bits which are not in the enable_mask
in the first place ? Why does the arch code not tell the generic code
which pmcs are available so we can avoid all this mask, weight
whatever magic ?

We store the same information in slightly different incarnations in
various places and then we need to mingle them all together to get to
the real data. That makes no sense at all.


Why are the counters enabled at all when an overflow is pending, which
stopped the counters anyway ?

Thanks,

	tglx
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 21/24] perfmon: Intel architectural PMU support ..., Thomas Gleixner, (Wed Nov 26, 7:55 am)