From patchwork Tue Jan 22 20:25:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 214644 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 7E4692C0087 for ; Wed, 23 Jan 2013 07:29:37 +1100 (EST) Received: from localhost ([::1]:34207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxkOm-0002AK-VY for incoming@patchwork.ozlabs.org; Tue, 22 Jan 2013 15:24:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxkNv-0008Qw-61 for qemu-devel@nongnu.org; Tue, 22 Jan 2013 15:23:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxkNs-0000DK-8s for qemu-devel@nongnu.org; Tue, 22 Jan 2013 15:23:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxkNs-0000DA-1B for qemu-devel@nongnu.org; Tue, 22 Jan 2013 15:23:52 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0MKNpjw023834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Jan 2013 15:23:51 -0500 Received: from blackpad.lan.raisama.net (vpn1-7-132.gru2.redhat.com [10.97.7.132]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0MKNnu3011757; Tue, 22 Jan 2013 15:23:51 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 486802015AE; Tue, 22 Jan 2013 18:25:34 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 22 Jan 2013 18:25:05 -0200 Message-Id: <1358886309-26258-6-git-send-email-ehabkost@redhat.com> In-Reply-To: <1358886309-26258-1-git-send-email-ehabkost@redhat.com> References: <1358886309-26258-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH for-1.4 qom-cpu 5/9] cpus.h: Make constant smp_cores/smp_threads available on *-user 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 code that calculates the APIC ID will use smp_cores/smp_threads, so just define them as 1 on *-user to avoid #ifdefs in the code. Signed-off-by: Eduardo Habkost --- include/sysemu/cpus.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h index 81bd817..f7f6854 100644 --- a/include/sysemu/cpus.h +++ b/include/sysemu/cpus.h @@ -13,9 +13,16 @@ void cpu_synchronize_all_post_init(void); void qtest_clock_warp(int64_t dest); +#ifndef CONFIG_USER_ONLY /* vl.c */ extern int smp_cores; extern int smp_threads; +#else +/* *-user doesn't have configurable SMP topology */ +#define smp_cores 1 +#define smp_threads 1 +#endif + void set_numa_modes(void); void set_cpu_log(const char *optarg); void set_cpu_log_filename(const char *optarg);