From patchwork Fri Feb 1 16:06:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1034869 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=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="hepIt7TG"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43rhs43qTrz9sDX for ; Sat, 2 Feb 2019 03:10:16 +1100 (AEDT) Received: from localhost ([127.0.0.1]:57256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbOQ-000188-ES for incoming@patchwork.ozlabs.org; Fri, 01 Feb 2019 11:10:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbLR-0007e2-DY for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpbLJ-0003GT-KR for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:03 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:33841) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpbLJ-0003Fy-54 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:01 -0500 Received: by mail-wm1-x32e.google.com with SMTP id y185so4878125wmd.1 for ; Fri, 01 Feb 2019 08:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=z0GwyyqdFd2x2Co5znL5LOvbjlRFiDDbbISnqlKX8t4=; b=hepIt7TG+eOYB89r6Z3ioKAmAOqu2zm2cBPLzMYU1+ieRfTZY76xtvI/ubQUZ1dlIO GABW8Py9W80yZfUgXp66kEzpPciGjAUqDpTbfu7yRoCfcendrdGHeEgZdHMOwW9bmxEh e4yKNYumFi5jZ+vAkveOA2ORt/p79QOH14ym4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z0GwyyqdFd2x2Co5znL5LOvbjlRFiDDbbISnqlKX8t4=; b=ZDDvRiGsXp4Px50TyMd/OWmqSa1vSEkAqE8oFjbbegnEigBOSP8iBWm8W8QWT6Xt0A djoVY5/pMtEDSYMhTlm2xpr5bb6qg1GMFinmHMXLqClIiR6hroWAEl4OjkcRCBradB+A Uqs5AFHKsQ9vCQGzRXtqOU7E4otcYjbh4xbo8h/pcbq1V+benjBlzurMiCIPxzbgL7eE aBUIb5b6hZ9VElP0i0jfRc+Kq3ZgsQhAQYm0Kf+lx8+MFHTFR16VBXlZv3iUqtzsG69T +o/Im6py1Es4NKpkc+PbzgInveOjlpUjY5+H3ebtWz7qcqQeMbLj+iT9J8oPyD9HnjIx JQlQ== X-Gm-Message-State: AHQUAub+bskIIiG4keS2shDyuUiaJaI6zbO81xVREjWdr1UxqdgBeGW+ KKHiJin8QsT4w09NcBczLS/ASfuxs4HXvQ== X-Google-Smtp-Source: AHgI3IZNIWNb7HDa/YjkkwKjZFyr+3tgMs7tyHYcfNesYga7u2wdL8Rjtf9K4KlCfN2VPm1HdUHjHg== X-Received: by 2002:a1c:4301:: with SMTP id q1mr3065712wma.44.1549037219674; Fri, 01 Feb 2019 08:06:59 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n6sm2847250wmk.9.2019.02.01.08.06.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 08:06:58 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 16:06:09 +0000 Message-Id: <20190201160653.13829-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201160653.13829-1-peter.maydell@linaro.org> References: <20190201160653.13829-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e Subject: [Qemu-devel] [PULL 03/47] armv7m: Make cpu object a child of the armv7m container 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Rather than just creating the CPUs with object_new, make them child objects of the armv7m container. This will allow the cluster code to find the CPUs if an armv7m object is made a child of a cluster object. object_new_with_props() will do the parenting for us. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20190121185118.18550-3-peter.maydell@linaro.org --- hw/arm/armv7m.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index f9aa83d20ef..0f2c8e066cf 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -158,7 +158,12 @@ static void armv7m_realize(DeviceState *dev, Error **errp) memory_region_add_subregion_overlap(&s->container, 0, s->board_memory, -1); - s->cpu = ARM_CPU(object_new(s->cpu_type)); + s->cpu = ARM_CPU(object_new_with_props(s->cpu_type, OBJECT(s), "cpu", + &err, NULL)); + if (err != NULL) { + error_propagate(errp, err); + return; + } object_property_set_link(OBJECT(s->cpu), OBJECT(&s->container), "memory", &error_abort);