From patchwork Thu Apr 12 13:55:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 897682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=glider.be 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 40MMrv6R9Zz9s2R for ; Thu, 12 Apr 2018 23:56:31 +1000 (AEST) Received: from localhost ([::1]:41637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6ciD-0003Ms-Vd for incoming@patchwork.ozlabs.org; Thu, 12 Apr 2018 09:56:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6cho-0003Lk-5t for qemu-devel@nongnu.org; Thu, 12 Apr 2018 09:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6chj-0006dm-8h for qemu-devel@nongnu.org; Thu, 12 Apr 2018 09:56:04 -0400 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]:49296) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6chj-0006ZI-2d for qemu-devel@nongnu.org; Thu, 12 Apr 2018 09:55:59 -0400 Received: from ayla.of.borg ([84.194.111.163]) by baptiste.telenet-ops.be with bizsmtp id ZRvu1x00c3XaVaC01RvuzG; Thu, 12 Apr 2018 15:55:55 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1f6che-00032Z-Cj; Thu, 12 Apr 2018 15:55:54 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1f6che-0006Ej-BB; Thu, 12 Apr 2018 15:55:54 +0200 From: Geert Uytterhoeven To: Peter Crosthwaite , Alexander Graf Date: Thu, 12 Apr 2018 15:55:37 +0200 Message-Id: <1523541337-23919-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2a02:1800:120:4::f00:13 Subject: [Qemu-devel] [PATCH qemu v3] device_tree: Increase FDT_MAX_SIZE to 1 MiB X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-renesas-soc@vger.kernel.org, Peter Maydell , qemu-devel@nongnu.org, Geert Uytterhoeven Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It is not uncommon for a contemporary FDT to be larger than 64 KiB, leading to failures loading the device tree from sysfs: qemu-system-aarch64: qemu_fdt_setprop: Couldn't set ...: FDT_ERR_NOSPACE Hence increase the limit to 1 MiB, like on PPC. For reference, the largest arm64 DTB created from the Linux sources is ca. 75 KiB large (100 KiB when built with symbols/fixup support). Signed-off-by: Geert Uytterhoeven --- v3: - Update example size figures, v2: - Enlarge from 128 KiB to 1 MiB, as suggested by Peter Maydell. --- device_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device_tree.c b/device_tree.c index 19458b32bf81e55e..52c3358a55838d33 100644 --- a/device_tree.c +++ b/device_tree.c @@ -29,7 +29,7 @@ #include -#define FDT_MAX_SIZE 0x10000 +#define FDT_MAX_SIZE 0x100000 void *create_device_tree(int *sizep) {