Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1640872 > unrolled thread

[PATCH 0/2] FDT fixes for running on native Open Firmware

Started bySascha Silbe <x-linux@infra-silbe.de>
First post2017-05-13 12:40 +0200
Last post2017-05-13 12:40 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] FDT fixes for running on native Open Firmware Sascha Silbe <x-linux@infra-silbe.de> - 2017-05-13 12:40 +0200
    [PATCH 2/2] of: fdt: fix unflattening of FDTs containing uncompressed paths Sascha Silbe <x-linux@infra-silbe.de> - 2017-05-13 12:40 +0200

#1640872 — [PATCH 0/2] FDT fixes for running on native Open Firmware

FromSascha Silbe <x-linux@infra-silbe.de>
Date2017-05-13 12:40 +0200
Subject[PATCH 0/2] FDT fixes for running on native Open Firmware
Message-ID<tGCCR-2pX-7@gated-at.bofh.it>
Two fixes for bugs in the FDT code I discovered while trying to get
the mainline kernel to run on OLPC XO-1.75. XOs are running Open
Firmware natively, not just passing down some blob.

Sascha Silbe (2):
  fdt: correctly handle uncompressed node names
  of: fdt: fix unflattening of FDTs containing uncompressed paths

 drivers/of/fdt.c            | 2 ++
 scripts/dtc/libfdt/fdt_ro.c | 3 +++
 2 files changed, 5 insertions(+)

-- 
2.11.0

[toc] | [next] | [standalone]


#1640874 — [PATCH 2/2] of: fdt: fix unflattening of FDTs containing uncompressed paths

FromSascha Silbe <x-linux@infra-silbe.de>
Date2017-05-13 12:40 +0200
Subject[PATCH 2/2] of: fdt: fix unflattening of FDTs containing uncompressed paths
Message-ID<tGCCS-2pX-17@gated-at.bofh.it>
In reply to#1640872
Probably since commit dfbd4c6eff35 ("drivers/of: Split
unflatten_dt_node()"), unflattening an FDT containing uncompressed
node names (e.g. "/gpio@d4019000/gpio@0") will abort after scanning
the root node because fpsize wasn't updated to include the path len.

Signed-off-by: Sascha Silbe <x-linux@infra-silbe.de>
---
 drivers/of/fdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index e5ce4b59e162..2d5414e644b3 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -309,6 +309,8 @@ static unsigned int populate_node(const void *blob,
 			fpsize += l;
 			allocl = fpsize;
 		}
+	} else {
+		fpsize += allocl;
 	}
 
 	np = unflatten_dt_alloc(mem, sizeof(struct device_node) + allocl,
-- 
2.11.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web