From patchwork Wed Oct 24 17:49:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 193909 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 57BBC2C0168 for ; Thu, 25 Oct 2012 05:34:56 +1100 (EST) Received: from localhost ([::1]:60112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR558-0001kj-I5 for incoming@patchwork.ozlabs.org; Wed, 24 Oct 2012 13:49:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR54M-0008Jp-CT for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:48:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TR54K-0002r6-He for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:48:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TR54K-0002qb-7g for qemu-devel@nongnu.org; Wed, 24 Oct 2012 13:48:40 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9OHmd88027683 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Oct 2012 13:48:39 -0400 Received: from blackpad.lan.raisama.net (vpn1-4-109.gru2.redhat.com [10.97.4.109]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9OHmcD7013450; Wed, 24 Oct 2012 13:48:38 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id CC5C72033D8; Wed, 24 Oct 2012 15:50:08 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 24 Oct 2012 15:49:45 -0200 Message-Id: <1351101001-14589-12-git-send-email-ehabkost@redhat.com> In-Reply-To: <1351101001-14589-1-git-send-email-ehabkost@redhat.com> References: <1351101001-14589-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini Subject: [Qemu-devel] [PATCH 11/27] pc: add PC_DEFAULT_CPU_MODEL #define 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 Make the pc_cpus_init() code more clear, by removing an #ifdef from the middle of the code. Signed-off-by: Eduardo Habkost --- hw/pc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 408823b..67fdbe2 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -71,6 +71,12 @@ #define FW_CFG_E820_TABLE (FW_CFG_ARCH_LOCAL + 3) #define FW_CFG_HPET (FW_CFG_ARCH_LOCAL + 4) +#ifdef TARGET_X86_64 +#define PC_DEFAULT_CPU_MODEL "qemu64" +#else +#define PC_DEFAULT_CPU_MODEL "qemu32" +#endif + #define E820_NR_ENTRIES 16 struct e820_entry { @@ -859,11 +865,7 @@ void pc_cpus_init(const char *cpu_model) /* init CPUs */ if (cpu_model == NULL) { -#ifdef TARGET_X86_64 - cpu_model = "qemu64"; -#else - cpu_model = "qemu32"; -#endif + cpu_model = PC_DEFAULT_CPU_MODEL; } for (i = 0; i < smp_cpus; i++) {