From patchwork Tue Mar 26 09:05:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 161166 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4964324jan; Tue, 26 Mar 2019 02:08:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPSKLQPHGIK12LElVqUhP5okgXzYBYCVwzjHJ4XQo9LgqGALpY84riv6CKWVw9hg0o+DUK X-Received: by 2002:a5b:51:: with SMTP id e17mr25929040ybp.64.1553591284468; Tue, 26 Mar 2019 02:08:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553591284; cv=none; d=google.com; s=arc-20160816; b=p9BCNlUOSBCZd2DmMXtjYIMRU6FofoWBJ0FXUknbkNtdImpUw0tdfZ79CMbfXDhmvY wNUNolYlXc+GiDWvlPmeayq6pB0F5Hbz9yePV6NbELL8YKYJ2yJhEPP5HTlPs0h3fojV aGQpswbZpS+dDZRtVk9huwsGBe8m9bOz2WH4STHXuHSCIvQfy914YPdoyFTw6XlMHO+X AlC8/IW2ix3X3Pc8QJ5TLV/trHB6/oGrjsEykaU9M+ZkPq4fHrdV1SGsKysrQ8vRYneP yQ81hc0PLHNU2GwoUxy9UIGeC9H1RqjVmcZ5iE5NgEGL8K5+yLu7J+nVXr4U4ednnycR zFGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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; bh=vbhLEGgPFIzC889Gd3aDXPsZoSHtxTiXhLY/Z8C7ff4=; b=AZ9ABRhxfhC6uuvigCoCxX9aH3Vmgea8ee931uAHBdlHUjE6Zbrc1ZRdcM+sKG2V4/ nMZsnDQqNQ9wX4sONK+jy6Q0voiuzHSY0sJ3AJS7rCcbtysVdFapHhUnV7zGEP2+S/RY xYaAlZRMD3yCvqMAHw/9TcJjwZxUc8X3Ri9EEZu+0EwNbClkjOCyZb7HYmW0FMznNpyM tM3OQHE/x6Fn7hmdoZgXkqrx3X0RpMUu9WuBH3oTjXvYTeLuCBFNWOuIwPjJeaaabFtt +d4f9ay9ClqUOUUR35WiiIAg1EyeaDaetXP/05S5M1fxwpITwG8Zscz8rYjbo6QvxBVh hkxg== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r132si10926761yba.161.2019.03.26.02.08.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 26 Mar 2019 02:08:04 -0700 (PDT) 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; 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=redhat.com Received: from localhost ([127.0.0.1]:55184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8i3v-0003b3-RW for patch@linaro.org; Tue, 26 Mar 2019 05:08:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8i13-0001Cu-1D for qemu-devel@nongnu.org; Tue, 26 Mar 2019 05:05:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8i11-0004Ig-Tv for qemu-devel@nongnu.org; Tue, 26 Mar 2019 05:05:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35388) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8i11-0004Hw-Kj for qemu-devel@nongnu.org; Tue, 26 Mar 2019 05:05:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4BC6307FBCB; Tue, 26 Mar 2019 09:05:02 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 952718386A; Tue, 26 Mar 2019 09:05:02 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 188551132BD3; Tue, 26 Mar 2019 10:05:01 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 26 Mar 2019 10:05:01 +0100 Message-Id: <20190326090501.15253-3-armbru@redhat.com> In-Reply-To: <20190326090501.15253-1-armbru@redhat.com> References: <20190326090501.15253-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 26 Mar 2019 09:05:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] pflash: Bury disabled code to limit device sizes 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: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée We disabled code to limit device sizes to 8, 16, 32 or 64MiB more than a decade ago in commit 95d1f3edd5e and c8b153d7949, v0.9.1. Bury. Signed-off-by: Alex Bennée Reviewed-by: Laszlo Ersek [Extracted from a larger patch, extended to pflash_cfi02.c] Signed-off-by: Markus Armbruster Message-Id: <20190319163551.32499-3-armbru@redhat.com> --- hw/block/pflash_cfi01.c | 7 ------- hw/block/pflash_cfi02.c | 6 ------ 2 files changed, 13 deletions(-) -- 2.17.2 diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 9937739a82..16dfae14b8 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -731,13 +731,6 @@ static void pflash_cfi01_realize(DeviceState *dev, Error **errp) } device_len = sector_len_per_device * blocks_per_device; - /* XXX: to be fixed */ -#if 0 - if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) && - total_len != (32 * 1024 * 1024) && total_len != (64 * 1024 * 1024)) - return NULL; -#endif - memory_region_init_rom_device( &pfl->mem, OBJECT(dev), &pflash_cfi01_ops, diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 9b934305fa..f2c6201f81 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -551,12 +551,6 @@ static void pflash_cfi02_realize(DeviceState *dev, Error **errp) } chip_len = pfl->sector_len * pfl->nb_blocs; - /* XXX: to be fixed */ -#if 0 - if (total_len != (8 * 1024 * 1024) && total_len != (16 * 1024 * 1024) && - total_len != (32 * 1024 * 1024) && total_len != (64 * 1024 * 1024)) - return NULL; -#endif memory_region_init_rom_device(&pfl->orig_mem, OBJECT(pfl), pfl->be ? &pflash_cfi02_ops_be : &pflash_cfi02_ops_le,