]> git.proxmox.com Git - mirror_qemu.git/commitdiff
PPC: E500: Remove unneeded CPU nodes
authorAlexander Graf <agraf@suse.de>
Thu, 21 Jul 2011 01:02:31 +0000 (03:02 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 6 Oct 2011 07:43:35 +0000 (09:43 +0200)
We should only keep CPU nodes in the device tree around that we really have
virtual CPUs for. So remove all superfluous entries that we just keep there
in case someone wants to create a lot of vCPUs.

Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppce500_mpc8544ds.c

index 0791e274621321f3ceff415f83c0eaef5cafaae2..9379624e37bf1e451f6aab02bd3965d43c87c56a 100644 (file)
@@ -129,6 +129,12 @@ static int mpc8544_load_device_tree(CPUState *env,
         qemu_devtree_setprop_cell(fdt, cpu_name, "timebase-frequency", tb_freq);
     }
 
+    for (i = smp_cpus; i < 32; i++) {
+        char cpu_name[128];
+        snprintf(cpu_name, sizeof(cpu_name), "/cpus/PowerPC,8544@%x", i);
+        qemu_devtree_nop_node(fdt, cpu_name);
+    }
+
     ret = rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr);
     g_free(fdt);