From patchwork Tue Nov 7 13:35:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 118167 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3991452qgn; Tue, 7 Nov 2017 05:41:12 -0800 (PST) X-Google-Smtp-Source: ABhQp+SYgIpkNV6ep1WabZRC0EqQKidU98Guu55Zd0lZfr/j0E9Bk5VXpbZXe7uYK7tu5mzGaKQE X-Received: by 10.129.226.67 with SMTP id z3mr11136486ywl.282.1510062072386; Tue, 07 Nov 2017 05:41:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510062072; cv=none; d=google.com; s=arc-20160816; b=PUJmcVI+3NOleznqzhKiDV254HwmsfLUbqvOuSAG7saEIhaLeWAHEL/h8qxrSuu+up W8MGcGIt38bszwOQFGLot/f6hU/N+pg1tiCbja7CC+EkE/Sp2bHmbjTvhEfpxE/JY0nX +Gw4jBsF/w5AOh2r/5KVctAMhb6v66xWLDhaJpozObFpuUD2m70BC7CiHcN7oE/8qZM6 xAEEVGWpj3j+3RTEGB3Jnal/Fj0wJtTSnNTitjUX3IF0vUPbju/fOWfdlwiORco8EZ4K Yv2qGVUjE8XXqO4J3UZ2s5DOlBOHX5aoE+wozade/uUTOCzyCO5avicUc3oo+sAcZGtT lLtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=3++GEAFIocEXAX2iP/VVcsIN2BlTid0sO6OYAmDHYI4=; b=WmsUcV0Wqm0MlPgSVS897wxtvxTKIVV6kb6FMsZjzhmanK1O81eqytP20UbQaY9GED kaaOmJESOk8gCIfuOm4cYwqKecc+XOb2y1VZvfpBCV/pVCCO52L3XPvVbbDL4IhgVmes VgZMZGAGaVyOQpCNH47X/tYFNuZ2DbbvzA527e8RHsQmpvvO3FRGjAajnNp8wQeCWz/3 zHQR06zC3C4XdCirhUPWHrUeFL1NncvnE90eEBFJ2oswC7Tt7zL0M2KfykIe+WTfhSiA EVu6GfsYlT6dE7/C7xB9k7Z6vJZUkObXdEeW5Hze5B3h0W7wAeZJyXrtT/QDG1sxRBvI Wf5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id x74si277563ywg.625.2017.11.07.05.41.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 07 Nov 2017 05:41:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC47s-0002MU-0M for patch@linaro.org; Tue, 07 Nov 2017 08:41:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC41r-0006ac-0O for qemu-devel@nongnu.org; Tue, 07 Nov 2017 08:35:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC41l-0005xc-B0 for qemu-devel@nongnu.org; Tue, 07 Nov 2017 08:34:58 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:38238) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eC41l-0005rx-4E for qemu-devel@nongnu.org; Tue, 07 Nov 2017 08:34:53 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1eC41i-0004TU-6d for qemu-devel@nongnu.org; Tue, 07 Nov 2017 13:34:50 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 7 Nov 2017 13:35:18 +0000 Message-Id: <1510061722-14092-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510061722-14092-1-git-send-email-peter.maydell@linaro.org> References: <1510061722-14092-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 3/7] 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth 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 Message-id: 1509519537-6964-3-git-send-email-thuth@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/fsl-imx25.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.7.4 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 = {