From patchwork Wed Feb 6 08:19:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 2102631 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 8645BE00E5 for ; Wed, 6 Feb 2013 08:19:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754785Ab3BFITr (ORCPT ); Wed, 6 Feb 2013 03:19:47 -0500 Received: from ozlabs.org ([203.10.76.45]:34897 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700Ab3BFIT1 (ORCPT ); Wed, 6 Feb 2013 03:19:27 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 75D372C02F2; Wed, 6 Feb 2013 19:19:26 +1100 (EST) From: Michael Ellerman To: Cc: , Subject: [PATCH 6/6] kvm tools: powerpc: Only emit TB freq if it's non-zero Date: Wed, 6 Feb 2013 19:19:16 +1100 Message-Id: <1360138756-1991-6-git-send-email-michael@ellerman.id.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360138756-1991-1-git-send-email-michael@ellerman.id.au> References: <1360138756-1991-1-git-send-email-michael@ellerman.id.au> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The kernel can handle a missing timebase-frequency property much better than one that claims zero. Signed-off-by: Michael Ellerman --- 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));