From patchwork Thu Jan 17 20:59:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 213367 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 73F9A2C0085 for ; Fri, 18 Jan 2013 07:58:46 +1100 (EST) Received: from localhost ([::1]:38567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvwXs-00056H-KA for incoming@patchwork.ozlabs.org; Thu, 17 Jan 2013 15:58:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvwXW-0004vd-5q for qemu-devel@nongnu.org; Thu, 17 Jan 2013 15:58:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvwXN-00076B-8N for qemu-devel@nongnu.org; Thu, 17 Jan 2013 15:58:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvwXN-00075V-0T for qemu-devel@nongnu.org; Thu, 17 Jan 2013 15:58:13 -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 r0HKwBgp020130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Jan 2013 15:58:11 -0500 Received: from blackpad.lan.raisama.net (vpn1-7-107.gru2.redhat.com [10.97.7.107]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0HKwAQ4005539; Thu, 17 Jan 2013 15:58:11 -0500 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 70504202B58; Thu, 17 Jan 2013 18:59:47 -0200 (BRST) From: Eduardo Habkost To: qemu-devel@nongnu.org, Anthony Liguori Date: Thu, 17 Jan 2013 18:59:34 -0200 Message-Id: <1358456378-29248-9-git-send-email-ehabkost@redhat.com> In-Reply-To: <1358456378-29248-1-git-send-email-ehabkost@redhat.com> References: <1358456378-29248-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 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);