From patchwork Wed Nov 1 06:58:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10035929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DDBA9600C5 for ; Wed, 1 Nov 2017 07:02:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC69628B5D for ; Wed, 1 Nov 2017 07:02:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE79F28B60; Wed, 1 Nov 2017 07:02:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E9CE28B5D for ; Wed, 1 Nov 2017 07:02:38 +0000 (UTC) Received: from localhost ([::1]:48642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9n2r-00044r-Qv for patchwork-qemu-devel@patchwork.kernel.org; Wed, 01 Nov 2017 03:02:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9mzS-0001yE-RZ for qemu-devel@nongnu.org; Wed, 01 Nov 2017 02:59:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9mzS-000094-2A for qemu-devel@nongnu.org; Wed, 01 Nov 2017 02:59:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33206) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e9mzP-00007y-Ry; Wed, 01 Nov 2017 02:59:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA0E84E4C6; Wed, 1 Nov 2017 06:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CA0E84E4C6 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=thuth@redhat.com Received: from thh440s.redhat.com (ovpn-116-77.ams2.redhat.com [10.36.116.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCD6C600D2; Wed, 1 Nov 2017 06:59:01 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Date: Wed, 1 Nov 2017 07:58:56 +0100 Message-Id: <1509519537-6964-3-git-send-email-thuth@redhat.com> In-Reply-To: <1509519537-6964-1-git-send-email-thuth@redhat.com> References: <1509519537-6964-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 01 Nov 2017 06:59:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/3] hw/arm: Mark the "fsl, imx25" device with user_creatable = false 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: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP QEMU currently crashes when the user tries to instantiate the fsl,imx25 device manually: $ aarch64-softmmu/qemu-system-aarch64 -S -M imx25-pdk -device fsl,,imx25 ** ERROR:/home/thuth/devel/qemu/tcg/tcg.c:538:tcg_register_thread: assertion failed: (n < max_cpus) The imx25-pdk board (which is the one that uses this CPU type) only supports one CPU, and the realize function of the "fsl,imx25" device also uses serial_hds[] directly, so this device clearly can not be instantiated twice and thus we should mark it with user_creatable = 0. Signed-off-by: Thomas Huth --- hw/arm/fsl-imx25.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 3b97ece..cb988a6 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -288,8 +288,12 @@ static void fsl_imx25_class_init(ObjectClass *oc, void *data) DeviceClass *dc = DEVICE_CLASS(oc); dc->realize = fsl_imx25_realize; - dc->desc = "i.MX25 SOC"; + /* + * Reason: uses serial_hds in realize and the imx25 board does not + * support multiple CPUs + */ + dc->user_creatable = false; } static const TypeInfo fsl_imx25_type_info = {