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: 157254 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp620990jaa; Fri, 1 Feb 2019 08:09:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN5ZyCQ7qZamlsnDYk6zjEzOKV5LniB3P0tOdomIe7TdkBz1HxOnn2y1xcJU9l34MABvTe4O X-Received: by 2002:a25:b988:: with SMTP id r8mr39258367ybg.467.1549037389058; Fri, 01 Feb 2019 08:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549037389; cv=none; d=google.com; s=arc-20160816; b=seKrxyLnlkE1jVmpRLpZ7FMFsUASb5gNSt0HR1UhJFmXejDqqzOf1Apc6zW2bqzDxM ZgYHummlohgQYAcQXmrHf4bTrMzkqofcpBdKqA9ESwSyUe4zvmsMSBCdFk/bBhi2xRZA KH+ZI1TMV0GHEyythgXe3jIE3ATS2e7VVD1LMdu5/5KcDU4CBsP7iIaHm6pmNWbO531i P9fKSGQlYxIXaMfmRbRB1zBhpGZxbZB+BO2YvhgFsykIvHLiEeZyXbiGbtUL1XBlBQxH X2od8gB8MJhiIJOJ6sc3tdIBJ9lyT7cgCbKWegr8SNmk76EcvuWlmP5Dw+3BUrGsSLOZ GKlg== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=z0GwyyqdFd2x2Co5znL5LOvbjlRFiDDbbISnqlKX8t4=; b=g1aOOnlXH+et8WO+9VpPDzEt1WCyGiSFHf2qkOxGkmVXuLk0rVoafeji4zcHMuz4+V 6O6JUryofE7iZPGltKbKeydsYTn7PTJ6IQ6sKd1bzjUC0S6s+e81gAfs14IWagXoykf2 x79VnipLjbc7tUIQ6ipnlPZ0u4D8bFNGaLiUxj3PD29e6llNgfBJ8gX4agCeAZPY0L77 ewDwZ1pgroDumsyqBzm7P7pA5JJbvPDljEkGxPgaNF67GjV0Wri2gsaLeqV85Jp+h7T/ Qz0IcBtJpYOP/hTfGNUCaqhrS03SYzwVzsyy0as/T4wuJqCIbcffpsUrT43nc1Mc/+oj R8IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hepIt7TG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id u4si4909487ywf.353.2019.02.01.08.09.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 01 Feb 2019 08:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hepIt7TG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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 ([127.0.0.1]:57256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbO0-000188-Fe for patch@linaro.org; Fri, 01 Feb 2019 11:09:48 -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-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+patch=linaro.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(-) -- 2.20.1 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);