From patchwork Thu Apr 3 13:56:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 27688 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7343A20490 for ; Thu, 3 Apr 2014 13:56:32 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id n16sf7032459oag.5 for ; Thu, 03 Apr 2014 06:56:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=jgBl2IUT+asLKvHq2nbw7Klt/GVIgvxLbS2hnjGikmM=; b=P3kgpKoj1/INgQCvYHj6PIBhNyKoiEUtN7K7Rr6M3i67pjfh0XlbUXT/y+M5GnXIgD p1x/HjYrqm3LZ0jqLiG2f6ljgJvO5zbLLZOMj3YvWaWpJSo4qyP+Oc5EQN0czWTfn2jv V66fbZDnDQAN2hn4MCiwYuAOuX/CU40tg8ClQmUGdESzxv3Bw0DBeJgA8I/zdHY+5pBt jtrQ7g2RZbJPavy/ErZADANHqB16S+GUOsPUQTpOnv0AheHOg4TIyMVG/Vnf7xUTL8K5 mx65pZbASFSgjnUHBgrBWL16prhjSpFOU839dUAy1LMPhmPnT7LU+MwjL5U6WyPKZbfQ JaKw== X-Gm-Message-State: ALoCoQnF+q07aICdFufq6uxIo+/u6TIlJoLOTDnJMxsS8K+uXG5ZyRyOV2SWMFABxguNp5OKCdSP X-Received: by 10.50.8.3 with SMTP id n3mr1883714iga.0.1396533391883; Thu, 03 Apr 2014 06:56:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.202 with SMTP id e68ls107753qgf.12.gmail; Thu, 03 Apr 2014 06:56:31 -0700 (PDT) X-Received: by 10.52.25.202 with SMTP id e10mr6628561vdg.30.1396533391751; Thu, 03 Apr 2014 06:56:31 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id yb7si239044vec.163.2014.04.03.06.56.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 06:56:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu19so1984970vcb.29 for ; Thu, 03 Apr 2014 06:56:31 -0700 (PDT) X-Received: by 10.52.250.4 with SMTP id yy4mr1259265vdc.56.1396533391587; Thu, 03 Apr 2014 06:56:31 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.12.8 with SMTP id v8csp30096vcv; Thu, 3 Apr 2014 06:56:31 -0700 (PDT) X-Received: by 10.180.189.43 with SMTP id gf11mr11478823wic.32.1396533390163; Thu, 03 Apr 2014 06:56:30 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id w48si8169784eel.176.2014.04.03.06.56.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Apr 2014 06:56:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WVi84-00039F-Pj; Thu, 03 Apr 2014 14:56:28 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Rob Herring Subject: [for-2.0 2/2] hw/arm/vexpress, hw/arm/highbank: Don't insist that CPU has reset-cbar property Date: Thu, 3 Apr 2014 14:56:28 +0100 Message-Id: <1396533388-12069-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1396533388-12069-1-git-send-email-peter.maydell@linaro.org> References: <1396533388-12069-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , For the machine models which can have a Cortex-A15 CPU (vexpress-a15 and midway), silently continue if the CPU object has no reset-cbar property rather than failing. This allows these boards to be used under KVM with the "-cpu host" option, since the 'host' CPU object has no reset-cbar property. Signed-off-by: Peter Maydell --- hw/arm/highbank.c | 14 +++++++------- hw/arm/vexpress.c | 7 +++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index 03545aa..83e43fd 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -230,6 +230,7 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine) for (n = 0; n < smp_cpus; n++) { ObjectClass *oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model); + Object *cpuobj; ARMCPU *cpu; Error *err = NULL; @@ -238,15 +239,14 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine) exit(1); } - cpu = ARM_CPU(object_new(object_class_get_name(oc))); + cpuobj = object_new(object_class_get_name(oc)); + cpu = ARM_CPU(cpuobj); - object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar", - &err); - if (err) { - error_report("%s", error_get_pretty(err)); - exit(1); + if (object_property_find(cpuobj, "reset-cbar", NULL)) { + object_property_set_int(cpuobj, MPCORE_PERIPHBASE, + "reset-cbar", &error_abort); } - object_property_set_bool(OBJECT(cpu), true, "realized", &err); + object_property_set_bool(cpuobj, true, "realized", &err); if (err) { error_report("%s", error_get_pretty(err)); exit(1); diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 67628af..169eb06 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -192,10 +192,9 @@ static void init_cpus(const char *cpu_model, const char *privdev, Object *cpuobj = object_new(object_class_get_name(cpu_oc)); Error *err = NULL; - object_property_set_int(cpuobj, periphbase, "reset-cbar", &err); - if (err) { - error_report("%s", error_get_pretty(err)); - exit(1); + if (object_property_find(cpuobj, "reset-cbar", NULL)) { + object_property_set_int(cpuobj, periphbase, + "reset-cbar", &error_abort); } object_property_set_bool(cpuobj, true, "realized", &err); if (err) {