From 468bc6cd8f765016aa4e01e20e8f020ac820cbb7 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 20 May 2020 10:18:35 -0700 Subject: device/resource_allocator_v3: Do not set IORESOURCE_ASSIGNED for size 0 resource find_pci_tolm() is updated to ensure that it ignores resources that have a zero size. This change removes the setting of resource flags to IORESOURCE_ASSIGNED when the resource is not really allocated any space by the allocator. It also drops the setting of base to limit since that is not required anymore. Change-Id: If8c0d4bf1aa9cd6a5bdf056140f65cf2d70ed216 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/41566 Reviewed-by: Nico Huber Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/device/resource_allocator_v3.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/device') diff --git a/src/device/resource_allocator_v3.c b/src/device/resource_allocator_v3.c index 4eeb2409f8..236e149cef 100644 --- a/src/device/resource_allocator_v3.c +++ b/src/device/resource_allocator_v3.c @@ -241,12 +241,8 @@ static void __allocate_resources(struct bus *bus, struct resource *bridge, resource->limit = bridge->limit; /* Size 0 resources can be skipped. */ - if (!resource->size) { - /* Set the base to limit so it doesn't confuse tolm. */ - resource->base = resource->limit; - resource->flags |= IORESOURCE_ASSIGNED; + if (!resource->size) continue; - } if (resource->flags & IORESOURCE_IO) { /* -- cgit v1.2.3