base: Fix address range granularity calculation

This patch fixes a bug in the granularity calculation. For example, if
the high bit is 6 (counting from 0) and we have one interleaving bit,
then the granularity is now 2 ** (6 - 1 + 1) = 64.
This commit is contained in:
Andreas Hansson 2013-06-27 05:49:49 -04:00
parent f330b3c28d
commit 997a6a4add

View file

@ -142,7 +142,7 @@ class AddrRange
*/
uint64_t granularity() const
{
return ULL(1) << (intlvHighBit - intlvBits);
return ULL(1) << (intlvHighBit - intlvBits + 1);
}
/**