From patchwork Mon Jul 24 17:06: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: 108593 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4280673qge; Mon, 24 Jul 2017 10:10:02 -0700 (PDT) X-Received: by 10.237.36.195 with SMTP id u3mr18998126qtc.151.1500916202445; Mon, 24 Jul 2017 10:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500916202; cv=none; d=google.com; s=arc-20160816; b=KlAdycjX64ArLqx9oPr/ODaOJrDqfB5CXnfqxUl7R/Oqs/C83ZZQSXkYqdn/EuLSAz ZxU+l7ot5kvu1O3GyEJ5rzjmdvQXgt7qbY3GW/3fJkjuUE11R2D0El3FN0/eKV8m2y+W Dn5QHaaxuSRPtVi95i0LLZW5M1Lglgf75uOPrEZP0A+l7lZrtRbQk/A4MXMQjU1+yH5X yKGV8aRhbUJwnUta8xUOxCCTecDO+2y0Xk2yHuOnuj5QMZrKwB7dfKCCuu80vUusHcgl iDQI1lYWIyL2C+1DovJcB77DBjhgbILQ7+B5jW6tgQG6WpCZEoool7GItpUfCWVIC9Ip t02g== 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=fHK+ph+WEH94dGuog8CWQfdGalUi2Tma3RBcBg2vo1o=; b=stYqNgd12gODtADefLQAYrQR64hXwqdMsBHdA3PWx/dLlMqtI9ou/n6iSgWbsY0vSm m2lD62t/AcETUY7Ryo1daxbLy6uFCGCw94m6HLib5UGW05hlB8gi5ti+ab37dI88IlDy logDLdI5r4kF538kCkWReC08wKRj46JIk+8OyXjtFbWpDNtvvVAPmmzDp1V9K97hnAfU hLwBUbkoZEnct9RnrWX71DX9EVJPyKu3Bbxw1D6gMfU5GQX6jTb/gQIwbJLjkkA8xWKo m2RQffFUqQqvmfQkxj5fXRB5kFOoGyq/g4Xnr+zvrJdwgHMgwF49rEP81aWucEUcldm/ pHdg== 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 r11si9462872qti.314.2017.07.24.10.10.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 24 Jul 2017 10:10:02 -0700 (PDT) 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]:55998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZgro-0001O9-3n for patch@linaro.org; Mon, 24 Jul 2017 13:10:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dZgoJ-0007BY-Kt for qemu-devel@nongnu.org; Mon, 24 Jul 2017 13:06:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dZgoI-0001cx-OC for qemu-devel@nongnu.org; Mon, 24 Jul 2017 13:06:23 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dZgoI-0001cR-HQ for qemu-devel@nongnu.org; Mon, 24 Jul 2017 13:06:22 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dZgoH-00009y-Hq for qemu-devel@nongnu.org; Mon, 24 Jul 2017 18:06:21 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 24 Jul 2017 18:06:18 +0100 Message-Id: <1500915978-29213-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500915978-29213-1-git-send-email-peter.maydell@linaro.org> References: <1500915978-29213-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 4/4] integratorcp: Don't migrate flash using vmstate_register_ram_global() 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" Instead of migrating the flash by creating the memory region with memory_region_init_ram_nomigrate() and then calling vmstate_register_ram_global(), just use memory_region_init_ram(), which now handles migration registration automatically. This is a migration compatibility break for the integratorcp board, because the RAM region's migration name changes to include the device path. This is OK because we don't guarantee migration compatibility for this board. Signed-off-by: Peter Maydell Message-id: 1500310341-28931-1-git-send-email-peter.maydell@linaro.org --- hw/arm/integratorcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.4 diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index d79221d..d9530ed 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -276,9 +276,8 @@ static void integratorcm_init(Object *obj) s->cm_init = 0x00000112; s->cm_refcnt_offset = muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), 24, 1000); - memory_region_init_ram_nomigrate(&s->flash, obj, "integrator.flash", 0x100000, + memory_region_init_ram(&s->flash, obj, "integrator.flash", 0x100000, &error_fatal); - vmstate_register_ram_global(&s->flash); memory_region_init_io(&s->iomem, obj, &integratorcm_ops, s, "integratorcm", 0x00800000);