From patchwork Tue Jan 8 16:30:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 154989 Delivered-To: patches@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5070097jaa; Tue, 8 Jan 2019 08:30:12 -0800 (PST) X-Received: by 2002:adf:eec9:: with SMTP id a9mr1920663wrp.242.1546965012729; Tue, 08 Jan 2019 08:30:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546965012; cv=none; d=google.com; s=arc-20160816; b=06CvNRNTHRlAvnq3VWwjhFCucAJjUS+ZesL3z59CrdJh9utaKYR/27FYWJqMpXLE7f 4vQl+XwTT8mJsPhqr1DPh/36HYlv74ojLlMpYrOy5AtaCH/fOvPDRfL1QSrdrVIkjeuX ZAbWq6ySEiQa3Fc0LVByaM0gOVXhzCGMh8hdU1UTdqJ2t8sun2qCMHrNgNOwTRaIO0ey 41u82eIroBatTP351FXfR/gmmwDMGy/RGLCCmZvYhFwRsZ4QJIqX1Hz9izGn28p6ftVU Nk05OX2Uu4YVUqZrEVJgV7gRTSBCIQscbE6jcNCr5q/xlhDqarwZnyq2C6C2BI8COSuy xfyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8TvLhHeHZ8C43Ib56UzJG7XSdaUbxT7qr+rCEbqz1Ng=; b=k/8eOUHmZ8yUvauYdm6oEHZ11KrdaAcxarlWMGtPc4Ndm9vy486gH70hIP7l3Hjm2b 0q6MvOcgJZ6QsfPVhoOoWdLO/wOtPV1YuR5xrV1qs/4SONnpNZ+vksF/ZDLybHYR4P5i DNzVrM0SCrc4xVnMAf9lzq29U/K7bmPsQLX5mEAhrpclSKFeiKe6+nCWEPLCgAyaXPca 8Brtlou7hYOL+TCREny8Miw/KxPphSaA1bZp4f88bs+1jSeHFAvriqObKYlVFXCdZDzF hybtoRwgfzkxJbZJZVlZUwKYTQ4gG/rpvB2+qzh3Yj2TGlF5G6iEIA2n+dyl/IvK0i/X dz0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OD1j2net; spf=pass (google.com: domain of peter.maydell@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=peter.maydell@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b17sor37876082wrt.48.2019.01.08.08.30.12 for (Google Transport Security); Tue, 08 Jan 2019 08:30:12 -0800 (PST) Received-SPF: pass (google.com: domain of peter.maydell@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OD1j2net; spf=pass (google.com: domain of peter.maydell@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=peter.maydell@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8TvLhHeHZ8C43Ib56UzJG7XSdaUbxT7qr+rCEbqz1Ng=; b=OD1j2netgEyGE6MXVCLp5wTzMppg3ETryCQe6xQ8ubpj8ybsL8WJMjh9ABEEzUeW60 F3DWwWLRHzcwrR9YDAYk9RFlqocA+R/js2DZ4pVue5Yzm53WPHsL+2EkYEGZy0podt1o aga6nAqdRm8AgcPLXAEbpwGoxCSKvm/DcoiMU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8TvLhHeHZ8C43Ib56UzJG7XSdaUbxT7qr+rCEbqz1Ng=; b=C905I9FHN2Ui1WRdw7iSS+7uT27PxNICS94pGVmxP5UiLcuuJ37tHKgTo8IPdlND8N Qi70edHKvt0pY7UtqJgkEbJ0XeFfnp+z3AV7i39HyHBaw/iod2W2FQVAZoB9RyzpOa7U u+FXSymt0FgJZh50fqymDgESQ9tVmornHMoKU5oqgvrMI7Bs7TLsRsNQuDs+BzpO8CdJ xKdHS+C6kyI5+GPon9OTfWx31peNQgb6iPL1yR42/U1L5xfcFsksbzAmyhs9/lCM2uIA Ut/2ptpiSGsockfjSy6/0ZTarKw93cC6x6q3R7W0vkIY8lMLLKMy3zgBn00eN13hoOtW arPQ== X-Gm-Message-State: AJcUukfYK5wec7srqlol2Uyka5wtI4P58hh/neexYCwKKgtN3egOzW3q beszqvQyMlvx/vxQBZAvrfiLcuDO X-Google-Smtp-Source: ALg8bN5xoqxOYLsxVi9NPFmNiYUfuRBU4ebmZEZNPZlY4OvPOMCVOr9r9FW8Pk5wOvduZ0DOuY6I6A== X-Received: by 2002:a05:6000:100f:: with SMTP id a15mr2074153wrx.298.1546965012378; Tue, 08 Jan 2019 08:30:12 -0800 (PST) Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id x81sm11278839wmg.17.2019.01.08.08.30.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Jan 2019 08:30:11 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org, Richard Henderson , Peter Crosthwaite , Paolo Bonzini , Alistair Francis , "Edgar E. Iglesias" , Eduardo Habkost , Marcel Apfelbaum , "Emilio G . Cota" Subject: [PATCH 1/4] hw/arm/xlx-zynqmp: Realize cluster after putting RPUs in it Date: Tue, 8 Jan 2019 16:30:05 +0000 Message-Id: <20190108163008.7006-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190108163008.7006-1-peter.maydell@linaro.org> References: <20190108163008.7006-1-peter.maydell@linaro.org> MIME-Version: 1.0 Currently the cluster implementation doesn't have any constraints on the ordering of realizing the TYPE_CPU_CLUSTER and populating it with child objects. We want to impose a constraint that realize must happen only after all the child objects are added, so move the realize of rpu_cluster. (The apu_cluster is already realized after child population.) Signed-off-by: Peter Maydell --- hw/arm/xlnx-zynqmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.19.2 Reviewed-by: Luc Michel Reviewed-by: Alistair Francis diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index c67ac2e64ac..370b0e44a38 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -183,8 +183,6 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState *s, const char *boot_cpu, &error_abort, NULL); qdev_prop_set_uint32(DEVICE(&s->rpu_cluster), "cluster-id", 1); - qdev_init_nofail(DEVICE(&s->rpu_cluster)); - for (i = 0; i < num_rpus; i++) { char *name; @@ -212,6 +210,8 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState *s, const char *boot_cpu, return; } } + + qdev_init_nofail(DEVICE(&s->rpu_cluster)); } static void xlnx_zynqmp_init(Object *obj)