kvm tools: powerpc: Only emit TB freq if it's non-zero

The kernel can handle a missing timebase-frequency property much better
than one that claims zero.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Michael Ellerman
2013-02-06 19:19:16 +11:00
committed by Will Deacon
parent 553a2baf53
commit bf4bc9021e
+3 -1
View File
@@ -389,7 +389,9 @@ static int setup_fdt(struct kvm *kvm)
_FDT(fdt_property_cell(fdt, "dcache-block-size", cpu_info->d_bsize));
_FDT(fdt_property_cell(fdt, "icache-block-size", cpu_info->i_bsize));
_FDT(fdt_property_cell(fdt, "timebase-frequency", cpu_info->tb_freq));
if (cpu_info->tb_freq)
_FDT(fdt_property_cell(fdt, "timebase-frequency", cpu_info->tb_freq));
/* Lies, but safeish lies! */
_FDT(fdt_property_cell(fdt, "clock-frequency", 0xddbab200));