[PATCH 2/5] resources: Print resource conflicts for failed requests

2012-11-07 Thread Peter Hurley
When resource requests fail, the conflicting resource is not
always apparent. Emit diagnostic print when resource conflicts prevent
resource requests. For example,
  kernel: resource: Requested i5k_amb [mem 0xfe00-0xfe01 flags 
0x8000] conflicts with PCI Bus :00 [mem 0xf000-0xfe00 flags 
0x200]

Cc: Bjorn Helgaas 
Signed-off-by: Peter Hurley 
---
 kernel/resource.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/kernel/resource.c b/kernel/resource.c
index 461c2e0..268b5fa 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -924,6 +924,10 @@ struct resource * __request_region(struct resource *parent,
write_lock(_lock);
continue;
}
+
+   pr_debug("Requested %s %pr conflicts with %s %pr\n",
+res->name, res, conflict->name, conflict);
+
/* Uhhuh, that didn't work out.. */
kfree(res);
res = NULL;
-- 
1.7.12.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/5] resources: Print resource conflicts for failed requests

2012-11-07 Thread Peter Hurley
When resource requests fail, the conflicting resource is not
always apparent. Emit diagnostic print when resource conflicts prevent
resource requests. For example,
  kernel: resource: Requested i5k_amb [mem 0xfe00-0xfe01 flags 
0x8000] conflicts with PCI Bus :00 [mem 0xf000-0xfe00 flags 
0x200]

Cc: Bjorn Helgaas bhelg...@google.com
Signed-off-by: Peter Hurley pe...@hurleysoftware.com
---
 kernel/resource.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/kernel/resource.c b/kernel/resource.c
index 461c2e0..268b5fa 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -924,6 +924,10 @@ struct resource * __request_region(struct resource *parent,
write_lock(resource_lock);
continue;
}
+
+   pr_debug(Requested %s %pr conflicts with %s %pr\n,
+res-name, res, conflict-name, conflict);
+
/* Uhhuh, that didn't work out.. */
kfree(res);
res = NULL;
-- 
1.7.12.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/