Patch "um: Unconditionally call unflatten_device_tree()" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    um: Unconditionally call unflatten_device_tree()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     um-unconditionally-call-unflatten_device_tree.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ad80c839c7e47e946eb264394b8451e57a0114ac
Author: Stephen Boyd <sboyd@xxxxxxxxxx>
Date:   Fri Feb 16 17:05:52 2024 -0800

    um: Unconditionally call unflatten_device_tree()
    
    [ Upstream commit 221a819aa3ca5bbbc91ce425b3e8d9463b121d09 ]
    
    Call this function unconditionally so that we can populate an empty DTB
    on platforms that don't boot with a command line provided DTB.  There's
    no harm in calling unflatten_device_tree() unconditionally. If there
    isn't a valid initial_boot_params dtb then unflatten_device_tree()
    returns early.
    
    Cc: Rob Herring <robh+dt@xxxxxxxxxx>
    Cc: Frank Rowand <frowand.list@xxxxxxxxx>
    Cc: Richard Weinberger <richard@xxxxxx>
    Cc: Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx>
    Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
    Cc: linux-um@xxxxxxxxxxxxxxxxxxx
    Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240217010557.2381548-4-sboyd@xxxxxxxxxx
    Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
    Stable-dep-of: b2473a359763 ("of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c
index 484141b06938f..4954188a6a090 100644
--- a/arch/um/kernel/dtb.c
+++ b/arch/um/kernel/dtb.c
@@ -16,16 +16,16 @@ void uml_dtb_init(void)
 	void *area;
 
 	area = uml_load_file(dtb, &size);
-	if (!area)
-		return;
-
-	if (!early_init_dt_scan(area)) {
-		pr_err("invalid DTB %s\n", dtb);
-		memblock_free(area, size);
-		return;
+	if (area) {
+		if (!early_init_dt_scan(area)) {
+			pr_err("invalid DTB %s\n", dtb);
+			memblock_free(area, size);
+			return;
+		}
+
+		early_init_fdt_scan_reserved_mem();
 	}
 
-	early_init_fdt_scan_reserved_mem();
 	unflatten_device_tree();
 }
 
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 4f58345b5c683..7986113adc7d3 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -4017,10 +4017,6 @@ static int __init of_unittest(void)
 	add_taint(TAINT_TEST, LOCKDEP_STILL_OK);
 
 	/* adding data for unittest */
-
-	if (IS_ENABLED(CONFIG_UML))
-		unittest_unflatten_overlay_base();
-
 	res = unittest_data_add();
 	if (res)
 		return res;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux