From: Guenter Roeck <linux@roeck-us.net>
To: Frank Rowand <frowand.list@gmail.com>
Cc: "Rob Herring" <robh+dt@kernel.org>,
"Clément Léger" <clement.leger@bootlin.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"Lizhi Hou" <lizhi.hou@xilinx.com>,
"Allan Nielsen" <allan.nielsen@microchip.com>,
"Horatiu Vultur" <horatiu.vultur@microchip.com>,
"Steen Hegelund" <steen.hegelund@microchip.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v4 1/2] of: create of_root if no dtb provided
Date: Mon, 18 Mar 2024 10:09:17 -0700 [thread overview]
Message-ID: <886049ed-4f5f-4e17-86f4-1245024ade3a@roeck-us.net> (raw)
In-Reply-To: <20230317053415.2254616-2-frowand.list@gmail.com>
Hi,
On Fri, Mar 17, 2023 at 12:34:14AM -0500, Frank Rowand wrote:
> When enabling CONFIG_OF on a platform where of_root is not populated by
> firmware, we end up without a root node. In order to apply overlays and
> create subnodes of the root node, we need one. Create this root node
> by unflattening an empty builtin dtb.
>
> If firmware provides a flattened device tree (FDT) then the FDT is
> unflattened via setup_arch(). Otherwise setup_of(), which is called
> immediately after setup_arch(), will create the default root node
> if it does not exist.
>
> Signed-off-by: Frank Rowand <frowand.list@gmail.com>
This patch results in a crash on nios2.
Building nios2:10m50-ghrd:10m50_defconfig:10m50_devboard.dts ... running ...R failed (crashed)
------------
qemu log:
earlycon: uart8250 at MMIO32 0x18001600 (options '')
printk: legacy bootconsole [uart8250] enabled
Linux version 6.8.0-11409-gf6cef5f8c37f (groeck@desktop) (nios2-linux-gcc (GCC) 11.4.0, GNU ld (GNU Binutils) 2.40) #1 Sun Mar 17 23:38:59 PDT 2024
Kernel panic - not syncing: early_init_dt_alloc_memory_arch: Failed to allocate 72 bytes align=0x40
---[ end Kernel panic - not syncing: early_init_dt_alloc_memory_arch: Failed to allocate 72 bytes align=0x40 ]---
Reverting this patch fixes the problem.
Guenter
next prev parent reply other threads:[~2024-03-18 17:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 5:34 [PATCH v4 0/2] of: populate of_root_node if not set (alternate) Frank Rowand
2023-03-17 5:34 ` [PATCH v4 1/2] of: create of_root if no dtb provided Frank Rowand
2023-03-31 18:04 ` Rob Herring
2024-03-18 17:09 ` Guenter Roeck [this message]
2024-03-18 19:26 ` Rob Herring
2024-03-18 20:47 ` Guenter Roeck
2024-03-18 21:31 ` Guenter Roeck
2024-03-20 19:14 ` Rob Herring
2024-03-20 20:05 ` Guenter Roeck
2024-03-27 13:11 ` Rob Herring
2024-03-27 14:40 ` Guenter Roeck
2024-03-27 18:38 ` Rob Herring
2024-03-27 19:47 ` Guenter Roeck
2024-03-27 21:56 ` Rob Herring
2023-03-17 5:34 ` [PATCH v4 2/2] of: unittest: treat missing of_root as error instead of fixing up Frank Rowand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=886049ed-4f5f-4e17-86f4-1245024ade3a@roeck-us.net \
--to=linux@roeck-us.net \
--cc=allan.nielsen@microchip.com \
--cc=clement.leger@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@xilinx.com \
--cc=robh+dt@kernel.org \
--cc=steen.hegelund@microchip.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®