[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 22/64] PPC: E500: Update freqs for all CPUs
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 22/64] PPC: E500: Update freqs for all CPUs |
Date: |
Thu, 6 Oct 2011 10:05:24 +0200 |
Now that we can so nicely find out the host's frequencies, we should also
make sure that we get them into all virtual CPUs' device tree nodes.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppce500_mpc8544ds.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index 2c7c677..0791e27 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -70,9 +70,9 @@ static int mpc8544_load_device_tree(CPUState *env,
int fdt_size;
void *fdt;
uint8_t hypercall[16];
- char cpu_name[128] = "/cpus/PowerPC,address@hidden";
uint32_t clock_freq = 400000000;
uint32_t tb_freq = 400000000;
+ int i;
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
if (!filename) {
@@ -122,8 +122,12 @@ static int mpc8544_load_device_tree(CPUState *env,
hypercall, sizeof(hypercall));
}
- qemu_devtree_setprop_cell(fdt, cpu_name, "clock-frequency", clock_freq);
- qemu_devtree_setprop_cell(fdt, cpu_name, "timebase-frequency", tb_freq);
+ for (i = 0; i < smp_cpus; i++) {
+ char cpu_name[128];
+ snprintf(cpu_name, sizeof(cpu_name), "/cpus/PowerPC,address@hidden",
i);
+ qemu_devtree_setprop_cell(fdt, cpu_name, "clock-frequency",
clock_freq);
+ qemu_devtree_setprop_cell(fdt, cpu_name, "timebase-frequency",
tb_freq);
+ }
ret = rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr);
g_free(fdt);
--
1.6.0.2
- [Qemu-ppc] [PATCH 34/64] PPC: Enable to use PAPR with PR style KVM, (continued)
- [Qemu-ppc] [PATCH 34/64] PPC: Enable to use PAPR with PR style KVM, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 64/64] ppc64: Fix linker script, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 28/64] device tree: give dt more size, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 12/64] PPC: E500: create multiple envs, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 59/64] KVM: PPC: Use HIOR setting for -M pseries with PR KVM, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 46/64] ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 45/64] ppc: booke206: add "info tlb" support, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 08/64] PPC: Set MPIC IDE for IPI to 0, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 63/64] pseries: Implement set-time-of-day RTAS function, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 62/64] pseries: Refactor spapr irq allocation, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 22/64] PPC: E500: Update freqs for all CPUs,
Alexander Graf <=
- [Qemu-ppc] [PATCH 48/64] pseries: Implement hcall-bulk hypervisor interface, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 42/64] pseries: use macro for firmware filename, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 20/64] PPC: KVM: Remove kvmppc_read_host_property, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 32/64] PPC: Add new target config for pseries, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 61/64] PPC: Clean up BookE timer code, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 58/64] KVM: Update kernel headers, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 21/64] PPC: KVM: Add stubs for kvm helper functions, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 52/64] openpic: Unfold read_IRQreg, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 26/64] device tree: add add_subnode command, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 60/64] PPC: booke timers, Alexander Graf, 2011/10/06