Report more correct information for cache control

On some platforms the number of bits in the cbm_mask might not be
divisible by 4 (and not even by 2), so we need to properly count the
bits.  Similar file, min_cbm_bits, is properly parsed and used, but if
the number is greater than one, we lose the information about
granularity when reporting the data in capabilities.  For that matter
always report granularity, but if it is not the same as the minimum,
add that information in there as well.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander
2017-06-05 14:00:45 +02:00
parent ba326c8699
commit cc9f0521cd
31 changed files with 104 additions and 16 deletions

View File

@@ -273,9 +273,14 @@
</attribute>
<zeroOrMore>
<element name='control'>
<attribute name='min'>
<attribute name='granularity'>
<ref name='unsignedInt'/>
</attribute>
<optional>
<attribute name='min'>
<ref name='unsignedInt'/>
</attribute>
</optional>
<attribute name='unit'>
<ref name='unit'/>
</attribute>