From patchwork Wed Jan 9 18:53:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 210830 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 E997E2C00DA for ; Thu, 10 Jan 2013 06:34:00 +1100 (EST) Received: from localhost ([::1]:42708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tt0mI-0005Hu-0I for incoming@patchwork.ozlabs.org; Wed, 09 Jan 2013 13:53:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tt0lL-0003Am-Vn for qemu-devel@nongnu.org; Wed, 09 Jan 2013 13:52:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tt0lI-0005fH-Ts for qemu-devel@nongnu.org; Wed, 09 Jan 2013 13:52:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tt0lI-0005eo-L6 for qemu-devel@nongnu.org; Wed, 09 Jan 2013 13:52:28 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r09IqR0g025553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Jan 2013 13:52:28 -0500 Received: from blackpad.lan.raisama.net (vpn1-7-24.gru2.redhat.com [10.97.7.24]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r09IqRFN020829; Wed, 9 Jan 2013 13:52:27 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id CAEE8203D0F; Wed, 9 Jan 2013 16:54:04 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 9 Jan 2013 16:53:48 -0200 Message-Id: <1357757632-1950-9-git-send-email-ehabkost@redhat.com> In-Reply-To: <1357757632-1950-1-git-send-email-ehabkost@redhat.com> References: <1357757632-1950-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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?= , kvm@vger.kernel.org Subject: [Qemu-devel] [RFC 08/12] 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);