* [PATCH] xen/device-tree: Print the DT path on error in dt_for_each_range
@ 2015-10-19 12:58 Julien Grall
2015-10-22 15:56 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: Julien Grall @ 2015-10-19 12:58 UTC (permalink / raw)
To: xen-devel; +Cc: Julien Grall, ian.campbell, stefano.stabellini
With the current log is not possible for the user to understand
properly the error:
(XEN) Grant table range: 0x0000007fc00000-0x0000007fc72000
(XEN) DT: no ranges; cannot enumerate
(XEN) Device tree generation failed (-22).
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Could not set up DOM0 guest OS
(XEN) ****************************************
(XEN)
The other error message within the function already print the DT path.
Do the same here.
Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
This patch is a good candidate to backport in Xen 4.6. It helps the
user to directly know which DT node may be invalid rather than having
to add debug in Xen.
---
xen/common/device_tree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 87c3f71..0ed86a7 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -880,7 +880,8 @@ int dt_for_each_range(const struct dt_device_node *dev,
ranges = dt_get_property(dev, "ranges", &rlen);
if ( ranges == NULL )
{
- printk(XENLOG_ERR "DT: no ranges; cannot enumerate\n");
+ printk(XENLOG_ERR "DT: no ranges; cannot enumerate %s\n",
+ dev->full_name);
return -EINVAL;
}
if ( rlen == 0 ) /* Nothing to do */
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xen/device-tree: Print the DT path on error in dt_for_each_range
2015-10-19 12:58 [PATCH] xen/device-tree: Print the DT path on error in dt_for_each_range Julien Grall
@ 2015-10-22 15:56 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2015-10-22 15:56 UTC (permalink / raw)
To: Julien Grall, xen-devel; +Cc: stefano.stabellini
On Mon, 2015-10-19 at 13:58 +0100, Julien Grall wrote:
> With the current log is not possible for the user to understand
> properly the error:
>
> (XEN) Grant table range: 0x0000007fc00000-0x0000007fc72000
> (XEN) DT: no ranges; cannot enumerate
> (XEN) Device tree generation failed (-22).
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Could not set up DOM0 guest OS
> (XEN) ****************************************
> (XEN)
>
> The other error message within the function already print the DT path.
> Do the same here.
>
> Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked + applied.
>
> ---
>
> This patch is a good candidate to backport in Xen 4.6. It helps the
> user to directly know which DT node may be invalid rather than having
> to add debug in Xen.
Queued.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-22 15:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-19 12:58 [PATCH] xen/device-tree: Print the DT path on error in dt_for_each_range Julien Grall
2015-10-22 15:56 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.