From patchwork Mon Jul 17 16:52:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 108023 Delivered-To: patches@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4754219qge; Mon, 17 Jul 2017 09:52:24 -0700 (PDT) X-Received: by 10.28.93.1 with SMTP id r1mr4978234wmb.26.1500310344239; Mon, 17 Jul 2017 09:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500310344; cv=none; d=google.com; s=arc-20160816; b=EVWeBwXauN0GSZS3yJzUuDlM2YhC4LrCJ3kOU1coLEO/WafMu6r6dRn/NnfW9F2X3i NrMJN7Sw7K/gsPfX6wc0RAUKX0MyioTn5jszvC0oI/VGmZ/bW82nYJssJiqj7Gg3Twu6 rtfSC4JFKzOqzYfqGcPwp6+UqKu7W+xAZO5Y2tWgXrBDw9yfktqjw4iqNP4U2+bM/aN/ vCICCU5wcPcXnByFZApt8nrpxjBalyXqYSdTqiRcn+m+xsFosJvRLeSao1CoZCsvJJsx GBuYQMzCZKCXVEK4VwVp8SbIxXT2XAIw5diTd9WZlFT0LNgjoMHCgKd1u60BhC6QLk0L SnMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=GZGVGunsGtske2AH3ceH6gb0tB+CPMNDABLjXDOGAdY=; b=TUYoIhR9AY69bYzEZNytM/P2nwCPWh54nej8+p2yijOCRCtNZgdPl+8vPW9axdyYQt HhJVgvWMnkzy6U9st5G8enBBjs+2hW9xaKjKPa2attB2OOioe9f/U0h9GrsaYZ9K4dDy BiDbLHqFku3YmoAHU0m0Q33IYjcWBdpnnn8Bw8I+4NqMu8xpLlM9UaJgyw7nNfiNNQm1 HExAnKbFrmt5pZG1sCI2UzNt8y18iCstxaRGaQGSZ79ghD8rBGjKeoZSRScxSkZ3eA7v JvHKybu0isn58JWzTawv+BUmkR60Asr/fG0rEAJgzXZAlHnpjqE18uhoKCO0c/dFxkKt N2jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id 46si12782655wrm.49.2017.07.17.09.52.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 09:52:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dX9Fu-0003nD-Gm; Mon, 17 Jul 2017 17:52:22 +0100 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH for-2.10] integratorcp: Don't migrate flash using vmstate_register_ram_global() Date: Mon, 17 Jul 2017 17:52:21 +0100 Message-Id: <1500310341-28931-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 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 --- 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);