From nobody Sat Apr 5 01:11:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1567527344; cv=none; d=zoho.com; s=zohoarc; b=JiFQzkPz7Is3EjqYPjHkgRe1A5wYFsIHHSkkRq5nBw+bAMe1F732Dm7kNYSzZ5h3eNJcLSe15NIDyeQZab7KwXOcZDjKNCdUih37LXCZaH0VCIAi6AW59RcvAkqBqV3er7Aa2/j5EKtzgVyv9Ni/trbJ9p0mY4PYboLliDAjE1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567527344; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jbHPhdQZ7x2ZGV52UyjN/NFJrOm1MniRZwVlIjy7loQ=; b=W/tTZshIK02GIyRu4A2thfnVdZW7vH3xz4xQTlFusJBbqPOjEAO5ly3rRwAufsF9OnKVtYd/R9+Zo4sxOSHlyYgKa13RDzYMwnJ+ijKKkSIIHwTnPmHDJgFcNIL5uyBNdg+z3ftrFq3HbUTdp2vQZB/RHM2qloBxdUhHoDjWVTg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567527344993590.4197676104751; Tue, 3 Sep 2019 09:15:44 -0700 (PDT) Received: from localhost ([::1]:48664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BT5-0007ZO-A1 for importer@patchew.org; Tue, 03 Sep 2019 12:15:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37053) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BMg-0000wa-79 for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5BMe-0003bt-NC for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:06 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:32981) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5BMe-0003bW-HT for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:04 -0400 Received: by mail-pf1-x433.google.com with SMTP id q10so6012952pfl.0 for ; Tue, 03 Sep 2019 09:09:04 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id 127sm28089711pfy.56.2019.09.03.09.09.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 09:09:02 -0700 (PDT) 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; bh=jbHPhdQZ7x2ZGV52UyjN/NFJrOm1MniRZwVlIjy7loQ=; b=olTZ2R3y5GJDgg8sueEejnL6LMZHLCjZpdExlJyUFvbSx089gTh3f9bNjbJ0oYxwxP 7CtFBZ0YLskkl4Fruh2qpT13feJLMPy63vUoLC8HAjeqbeGB2UWL8CGHQfLEdYtVIRnM jgf1Ew4z+txqn9lbJeFq/veuHvrIGTXUnYi6OSsRztnS/hiAeTGh9Wl19xxERhVSsh8s jl9rvyfX+uaKFiBQIhKTniiXSvj6XBnGb+etpS95fyttJpwCGZjdDP6/j0wObUgwHJGP CuYzkEE0nyfuVf4lmKIm7sVzP0Eb+n3qMYIqO3Km3uSZsKv0P5MMevzNxJwkEbIgoE3q 0bDQ== 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; bh=jbHPhdQZ7x2ZGV52UyjN/NFJrOm1MniRZwVlIjy7loQ=; b=UoZTUbbhujRCMP8AlfTr+yonF6gY0jw3MDVPp/lNOgdMBeSs6FROSv0RwsWSXgXLb0 dLmIdYCDpYPOdddGidx+zJjJ5uG8f+X5UFRIIj/ysvAdnL0JLmb3CofVXbMVE9q7DFSv 4X5i4tMekwNTfV7pE1u2X0svwLqUNYQJOvgjQaTCN1FDSWNqYRKABcfwkU74ERZfaJTq DjN/kN0Aoxo8L6+7wBMSLJO9YbCMVbdiGKILk6bbjdF81ze3gUL+r9sl0N3cF3QXTo4W Lsxmng/EDSXksyfAkmrewp08Vqj3S7HjmNBHwxzzQjnbetwQtrfVdCO4Q+d18iIwITTI cDmg== X-Gm-Message-State: APjAAAUUEmz6+3bXk1SO1g+4kkwMaA7pAEgSeGCf1MXNdDHG6555NxzH m7UxdgkFbss9FpO3kRhHR4Vgy8u65Z8= X-Google-Smtp-Source: APXvYqywtrWCdPX0cen7M+npCdlRP6YhLHI/yPk2AJ+gb82tFadkDkGpZozwriawdk+bKNQRjcfS/w== X-Received: by 2002:aa7:9e50:: with SMTP id z16mr22416693pfq.83.1567526943260; Tue, 03 Sep 2019 09:09:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2019 09:08:24 -0700 Message-Id: <20190903160858.5296-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903160858.5296-1-richard.henderson@linaro.org> References: <20190903160858.5296-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::433 Subject: [Qemu-devel] [PATCH 02/36] memory: Introduce size_memop X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Tony Nguyen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Tony Nguyen The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Introduce no-op size_memop to aid preparatory conversion of interfaces. Once interfaces are converted, size_memop will be implemented to return a MemOp from size in bytes. Signed-off-by: Tony Nguyen Reviewed-by: Richard Henderson Message-Id: <35b8ee74020f67cf40848fb7d5f127cf96c851d6.1566466906.git.tony.n= guyen@bt.com> Signed-off-by: Richard Henderson --- include/exec/memop.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/exec/memop.h b/include/exec/memop.h index 7262ca3dfd..dfd76a1604 100644 --- a/include/exec/memop.h +++ b/include/exec/memop.h @@ -107,4 +107,14 @@ typedef enum MemOp { MO_SSIZE =3D MO_SIZE | MO_SIGN, } MemOp; =20 +/* Size in bytes to MemOp. */ +static inline unsigned size_memop(unsigned size) +{ + /* + * FIXME: No-op to aid conversion of memory_region_dispatch_{read|writ= e} + * "unsigned size" operand into a "MemOp op". + */ + return size; +} + #endif --=20 2.17.1