Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1445866 > unrolled thread
| Started by | Rob Herring <robh+dt@kernel.org> |
|---|---|
| First post | 2016-07-18 23:50 +0200 |
| Last post | 2016-07-22 22:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/2] of: fdt: mark unflattened tree as detached Rob Herring <robh+dt@kernel.org> - 2016-07-18 23:50 +0200
[PATCH] of: fdt: mark unflattened tree as detached Michal Suchanek <hramrach@gmail.com> - 2016-07-19 00:10 +0200
Re: [PATCH] of: fdt: mark unflattened tree as detached Rob Herring <robh+dt@kernel.org> - 2016-07-22 22:00 +0200
| From | Rob Herring <robh+dt@kernel.org> |
|---|---|
| Date | 2016-07-18 23:50 +0200 |
| Subject | Re: [PATCH 2/2] of: fdt: mark unflattened tree as detached |
| Message-ID | <rWoAh-3iL-3@gated-at.bofh.it> |
On Sun, Jun 26, 2016 at 3:11 PM, Michal Suchanek <hramrach@gmail.com> wrote: > The tree returned from of_fdt_unflatten_tree cannot be attached to the > live tree because it is not marked as detached so mark it as such. The > dt resolver checks the flag and refuses to process the tree otherwise. > > Signed-off-by: Michal Suchanek <hramrach@gmail.com> > --- > drivers/of/fdt.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) This doesn't apply because the unflattening code has been re-written. Please rebase to current -rc and resend. Rob
[toc] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-07-19 00:10 +0200 |
| Subject | [PATCH] of: fdt: mark unflattened tree as detached |
| Message-ID | <rWoTE-3Fq-17@gated-at.bofh.it> |
| In reply to | #1445866 |
The tree returned from of_fdt_unflatten_tree cannot be attached to the
live tree because it is not marked as detached so mark it as such. The
dt resolver checks the flag and refuses to process the tree otherwise.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
---
- rebase on top of 4.7rc
---
drivers/of/fdt.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 33daffc..f5c802d 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -472,7 +472,8 @@ static int unflatten_dt_nodes(const void *blob,
static void *__unflatten_device_tree(const void *blob,
struct device_node *dad,
struct device_node **mynodes,
- void *(*dt_alloc)(u64 size, u64 align))
+ void *(*dt_alloc)(u64 size, u64 align),
+ bool detached)
{
int size;
void *mem;
@@ -516,6 +517,11 @@ static void *__unflatten_device_tree(const void *blob,
pr_warning("End of tree marker overwritten: %08x\n",
be32_to_cpup(mem + size));
+ if (detached) {
+ of_node_set_flag(*mynodes, OF_DETACHED);
+ pr_debug("unflattened tree is detached\n");
+ }
+
pr_debug(" <- unflatten_device_tree()\n");
return mem;
}
@@ -548,7 +554,8 @@ void *of_fdt_unflatten_tree(const unsigned long *blob,
void *mem;
mutex_lock(&of_fdt_unflatten_mutex);
- mem = __unflatten_device_tree(blob, dad, mynodes, &kernel_tree_alloc);
+ mem = __unflatten_device_tree(blob, dad, mynodes, &kernel_tree_alloc,
+ true);
mutex_unlock(&of_fdt_unflatten_mutex);
return mem;
@@ -1224,7 +1231,7 @@ bool __init early_init_dt_scan(void *params)
void __init unflatten_device_tree(void)
{
__unflatten_device_tree(initial_boot_params, NULL, &of_root,
- early_init_dt_alloc_memory_arch);
+ early_init_dt_alloc_memory_arch, false);
/* Get pointer to "/chosen" and "/aliases" nodes for use everywhere */
of_alias_scan(early_init_dt_alloc_memory_arch);
--
2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh+dt@kernel.org> |
|---|---|
| Date | 2016-07-22 22:00 +0200 |
| Subject | Re: [PATCH] of: fdt: mark unflattened tree as detached |
| Message-ID | <rXOM2-1Io-21@gated-at.bofh.it> |
| In reply to | #1445872 |
On Mon, Jul 18, 2016 at 5:01 PM, Michal Suchanek <hramrach@gmail.com> wrote: > The tree returned from of_fdt_unflatten_tree cannot be attached to the > live tree because it is not marked as detached so mark it as such. The > dt resolver checks the flag and refuses to process the tree otherwise. > > Signed-off-by: Michal Suchanek <hramrach@gmail.com> > --- > - rebase on top of 4.7rc Applied, thanks. Rob
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web