@@ -220,6 +220,8 @@ static struct resource * __request_resource(struct resource *root, struct resour
resource_size_t end = new->end;
struct resource *tmp, **p;
+ if (new->flags & IORESOURCE_MEM) pr_info("[%s] root:%pR\n", __func__, root);
+ if (new->flags & IORESOURCE_MEM) pr_info("[%s] new:%p new:%pR\n", __func__, new, new);
if (end < start)
return root;
if (start < root->start)
@@ -229,6 +231,7 @@ static struct resource * __request_resource(struct resource *root, struct resour
p = &root->child;
for (;;) {
tmp = *p;
+ if (new->flags & IORESOURCE_MEM) pr_info("[%s] tmp:%p tmp:%pR\n", __func__, tmp, tmp);
if (!tmp || tmp->start > end) {
new->sibling = tmp;
*p = new;
@@ -238,6 +241,7 @@ static struct resource * __request_resource(struct resource *root, struct resour
p = &tmp->sibling;
if (tmp->end < start)
continue;
+ if (new->flags & IORESOURCE_MEM) pr_info("[%s] Found collision with tmp\n", __func__);
return tmp;
}
}