[PATCH] ppc/pnv: Add a "/qemu" device tree node

Cédric Le Goater posted 1 patch 1 week ago
Test FreeBSD passed
Test asan passed
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191106142129.4908-1-clg@kaod.org
Maintainers: David Gibson <david@gibson.dropbear.id.au>, "Cédric Le Goater" <clg@kaod.org>
hw/ppc/pnv.c | 3 +++
1 file changed, 3 insertions(+)

[PATCH] ppc/pnv: Add a "/qemu" device tree node

Posted by Cédric Le Goater 1 week ago
It helps skiboot identifying that is running on a QEMU platform. The
compatible string will define the POWERPC processor version.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/ppc/pnv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 627c08e5b985..4c3d5184126a 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -479,6 +479,9 @@ static void *pnv_dt_create(MachineState *machine)
     fdt = g_malloc0(FDT_MAX_SIZE);
     _FDT((fdt_create_empty_tree(fdt, FDT_MAX_SIZE)));
 
+    /* /qemu node */
+    _FDT((fdt_add_subnode(fdt, 0, "qemu")));
+
     /* Root node */
     _FDT((fdt_setprop_cell(fdt, 0, "#address-cells", 0x2)));
     _FDT((fdt_setprop_cell(fdt, 0, "#size-cells", 0x2)));
-- 
2.21.0


Re: [PATCH] ppc/pnv: Add a "/qemu" device tree node

Posted by David Gibson 1 week ago
On Wed, Nov 06, 2019 at 03:21:29PM +0100, Cédric Le Goater wrote:
> It helps skiboot identifying that is running on a QEMU platform. The
> compatible string will define the POWERPC processor version.
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>

Applied to ppc-for-4.3.

> ---
>  hw/ppc/pnv.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 627c08e5b985..4c3d5184126a 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -479,6 +479,9 @@ static void *pnv_dt_create(MachineState *machine)
>      fdt = g_malloc0(FDT_MAX_SIZE);
>      _FDT((fdt_create_empty_tree(fdt, FDT_MAX_SIZE)));
>  
> +    /* /qemu node */
> +    _FDT((fdt_add_subnode(fdt, 0, "qemu")));
> +
>      /* Root node */
>      _FDT((fdt_setprop_cell(fdt, 0, "#address-cells", 0x2)));
>      _FDT((fdt_setprop_cell(fdt, 0, "#size-cells", 0x2)));

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson