diff options
author | Adam Jackson <ajax@redhat.com> | 2008-10-03 14:37:59 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-10-03 17:51:18 -0400 |
commit | cc3335858508ffbc52123eb5bb0c34f42800c8c4 (patch) | |
tree | f586ada37f774238feccd3ae4774564d29dd4599 /hw | |
parent | 8fbf1185f5d6a1836b3e4265de6f605d82478e0b (diff) |
Remove the old implementation of RemoveOverlaps
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/xf86Bus.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 4f7b36bd3..4156646ac 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -1346,74 +1346,6 @@ xf86ResourceBrokerInit(void) * At resource broker initialization this is no problem as this * only deals with exclusive resources. */ -#if 0 -void -RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated) -{ - resPtr pRes; - memType size, newsize, adjust; - - if (!target) - return; - - for (pRes = list; pRes; pRes = pRes->next) { - if (pRes != target - && ((pRes->res_type & ResTypeMask) == - (target->res_type & ResTypeMask)) - && pRes->block_begin <= target->block_end - && pRes->block_end >= target->block_begin) { - /* Possibly ignore estimated resources */ - if (!useEstimated && (pRes->res_type & ResEstimated)) continue; - /* - * Target should be a larger region than pRes. If pRes fully - * contains target, don't do anything unless target can overlap. - */ - if (pRes->block_begin <= target->block_begin && - pRes->block_end >= target->block_end) { - if (target->res_type & ResOverlap) { - /* Nullify range but keep its ResOverlap bit on */ - target->block_end = target->block_begin - 1; - return; - } - continue; - } - /* - * In cases where the target and pRes have the same starting - * address, reduce the size of the target (given it's an estimate). - */ - if (pRes->block_begin == target->block_begin) { - if (target->res_type & ResOverlap) - target->block_end = target->block_begin - 1; - else - target->block_end = pRes->block_end; - } - /* Otherwise, trim target to remove the overlap */ - else if (pRes->block_begin <= target->block_end) { - target->block_end = pRes->block_begin - 1; - } else if (!pow2Alignment && - pRes->block_end >= target->block_begin) { - target->block_begin = pRes->block_end + 1; - } - if (pow2Alignment) { - /* - * Align to a power of two. This requires finding the - * largest power of two that is smaller than the adjusted - * size. - */ - size = target->block_end - target->block_begin + 1; - newsize = 1UL << (sizeof(memType) * 8 - 1); - while (!(newsize & size)) - newsize >>= 1; - target->block_end = target->block_begin + newsize - 1; - } else if (target->block_end > MEM_ALIGN) { - /* Align the end to MEM_ALIGN */ - if ((adjust = (target->block_end + 1) % MEM_ALIGN)) - target->block_end -= adjust; - } - } - } -} -#else void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated) @@ -1494,8 +1426,6 @@ RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated } } -#endif - /* * Resource registrarion */ |