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 0xfe000000-0xfe01ffff flags 
0x80000000] conflicts with PCI Bus 0000:00 [mem 0xf0000000-0xfe000000 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/

Reply via email to