From patchwork Sat Jul 23 10:50:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 106434 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 58E73B6F68 for ; Sat, 23 Jul 2011 20:52:01 +1000 (EST) Received: from localhost ([::1]:33450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkZoM-0002ja-N9 for incoming@patchwork.ozlabs.org; Sat, 23 Jul 2011 06:51:58 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkZms-00082F-Ru for qemu-devel@nongnu.org; Sat, 23 Jul 2011 06:50:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkZmj-0005vO-7O for qemu-devel@nongnu.org; Sat, 23 Jul 2011 06:50:25 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54491 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkZmi-0005u2-W4 for qemu-devel@nongnu.org; Sat, 23 Jul 2011 06:50:17 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 9A54E8F54B; Sat, 23 Jul 2011 12:50:14 +0200 (CEST) From: Alexander Graf To: QEMU-devel Developers Date: Sat, 23 Jul 2011 12:50:06 +0200 Message-Id: <1311418212-13356-23-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1311418212-13356-1-git-send-email-agraf@suse.de> References: <1311418212-13356-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Scott Wood , Elie Richa Subject: [Qemu-devel] [PATCH 22/28] PPC: E500: Update cpu-release-addr property in cpu nodes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The guest OS wants to know where the guest spins, so let's tell him while updating the CPU nodes with the frequencies anyways. Signed-off-by: Alexander Graf --- v1 -> v2: - use new spin table address --- hw/ppce500_mpc8544ds.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 96a5362..b48e95b 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -125,9 +125,15 @@ static int mpc8544_load_device_tree(CPUState *env, for (i = 0; i < smp_cpus; i++) { char cpu_name[128]; + uint64_t cpu_release_addr[] = { + cpu_to_be64(MPC8544_SPIN_BASE + (i * 0x20)) + }; + snprintf(cpu_name, sizeof(cpu_name), "/cpus/PowerPC,8544@%x", i); qemu_devtree_setprop_cell(fdt, cpu_name, "clock-frequency", clock_freq); qemu_devtree_setprop_cell(fdt, cpu_name, "timebase-frequency", tb_freq); + qemu_devtree_setprop(fdt, cpu_name, "cpu-release-addr", + cpu_release_addr, sizeof(cpu_release_addr)); } for (i = smp_cpus; i < 32; i++) {