lkml.org 
[lkml]   [2013]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/6] kvm tools: powerpc: Only emit TB freq if it's non-zero
Date
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>
---
tools/kvm/powerpc/kvm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/kvm/powerpc/kvm.c b/tools/kvm/powerpc/kvm.c
index dc9f89d..b4b9f82 100644
--- a/tools/kvm/powerpc/kvm.c
+++ b/tools/kvm/powerpc/kvm.c
@@ -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));

--
1.7.10.4


\
 
 \ /
  Last update: 2013-02-06 10:01    [W:0.108 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site