From patchwork Wed Sep 23 01:55:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 521556 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DA1D31402D4 for ; Wed, 23 Sep 2015 12:06:55 +1000 (AEST) Received: from localhost ([::1]:44356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZSP-00023e-SD for incoming@patchwork.ozlabs.org; Tue, 22 Sep 2015 22:06:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZHN-0007WG-Js for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeZHI-00012N-CJ for qemu-devel@nongnu.org; Tue, 22 Sep 2015 21:55:29 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:35668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeZHH-0000yV-SP; Tue, 22 Sep 2015 21:55:24 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 87A08140B0E; Wed, 23 Sep 2015 11:55:20 +1000 (AEST) From: David Gibson To: peter.maydell@linaro.org Date: Wed, 23 Sep 2015 11:55:23 +1000 Message-Id: <1442973338-17771-22-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> References: <1442973338-17771-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2401:3900:2:1::2 Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, David Gibson Subject: [Qemu-devel] [PULL 21/36] spapr: Use QEMU limit for maximum CPUs number 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 From: Alexey Kardashevskiy sPAPR uses hard coded limit of maximum 255 supported CPUs which is exactly the same as QEMU-wide limit which is MAX_CPUMASK_BITS and also defined as 255. This makes use of a global CPU number limit for the "pseries" machine. In order to anticipate future increase of the MAX_CPUMASK_BITS (or to help debugging large systems), this also bumps the FDT_MAX_SIZE limit from 256K to 1M assuming that 1 CPU core needs roughly 512 bytes in the device tree so the new limit can cover up to 2048 CPU cores. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2fb5e36..33e22ce 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -74,7 +74,7 @@ * * We load our kernel at 4M, leaving space for SLOF initial image */ -#define FDT_MAX_SIZE 0x40000 +#define FDT_MAX_SIZE 0x100000 #define RTAS_MAX_SIZE 0x10000 #define RTAS_MAX_ADDR 0x80000000 /* RTAS must stay below that */ #define FW_MAX_SIZE 0x400000 @@ -86,8 +86,6 @@ #define TIMEBASE_FREQ 512000000ULL -#define MAX_CPUS 255 - #define PHANDLE_XICP 0x00001111 #define HTAB_SIZE(spapr) (1ULL << ((spapr)->htab_shift)) @@ -1859,7 +1857,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) mc->init = ppc_spapr_init; mc->reset = ppc_spapr_reset; mc->block_default_type = IF_SCSI; - mc->max_cpus = MAX_CPUS; + mc->max_cpus = MAX_CPUMASK_BITS; mc->no_parallel = 1; mc->default_boot_order = ""; mc->default_ram_size = 512 * M_BYTE;