From patchwork Tue Sep 3 16:08:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 172833 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp61602ily; Tue, 3 Sep 2019 09:14:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKNGxMhcgGuQGjjOA4TWo4NqkdQyZA6H8GVOMhCfIt+7UieBq6Ab3mX+L/vummNYomXNpP X-Received: by 2002:ae9:ec02:: with SMTP id h2mr32527340qkg.343.1567527297566; Tue, 03 Sep 2019 09:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567527297; cv=none; d=google.com; s=arc-20160816; b=b1ptkH1CLS3gOhYI4chHkzmMuhivrQV8fnIM0aGuF91qhy/75MAAOAYkQ6qRTAmyF1 +AD+wwqOHd50W3Mrlqsk5skrDTgs9NFCLYzuIBhdtSW2IsfiGUB8Im1kBjkzCFS6cQuw xLvntBk1qFJ0EntgR1tIHHQYuTs7UwmNGV2mYUcOLZGyxT8+lsVcTo74olclM27JGohE 1p68lGNl+wMgboLA9oYVmlz2AHwDDVrwRrShqgpuqeb4AIibwNTXpN2IKP4FQpV/A3XR 14gdh/Eo+rnoeQRP7IsQeOHEK2cZz68+bvwt1/NDBjYaGJ2kEtvTU60hEyUjM0YL12Bv PC4Q== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=jbHPhdQZ7x2ZGV52UyjN/NFJrOm1MniRZwVlIjy7loQ=; b=hIi/cDadP7htejHzSmeG6txE6Yt95N9Kq/m4FJxEloYiIpPoSNkilRONuJ6+Pn9WVM rCkBp7MQ2jYU0VO5mL9Q/wbLJsI/Eof9c4SpmL4ZTvx8jH5kjrMA9Ps41nducXXAjF00 6yJ/5NBJO0SLGyHIVZtJVy306F/tT5JEHEYlXLGJ2/L7lL1JqxBI5AFMOjEqbcqWPKh0 doecrlxWqEM/M652YJYG1Wb1YHhuDJUAotu0u1XCNkjDaJEE1g9mwey75OtLqqhBI4jF ZKG5xK1rmWdHiD2UypN9f4g6X2w3vso0hn2aR3Jrkawj+2qtcomi6Xo9Q1WEULh+92G3 1XHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=olTZ2R3y; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b13si12014046qtr.108.2019.09.03.09.14.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Sep 2019 09:14:57 -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; dkim=fail header.i=@linaro.org header.s=google header.b=olTZ2R3y; 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=linaro.org Received: from localhost ([::1]:48642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BSK-0005pR-L8 for patch@linaro.org; Tue, 03 Sep 2019 12:14:56 -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) 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-Received: by 2002:aa7:9e50:: with SMTP id z16mr22416693pfq.83.1567526943260; Tue, 03 Sep 2019 09:09:03 -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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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.nguyen@bt.com> Signed-off-by: Richard Henderson --- include/exec/memop.h | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.17.1 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 = MO_SIZE | MO_SIGN, } MemOp; +/* Size in bytes to MemOp. */ +static inline unsigned size_memop(unsigned size) +{ + /* + * FIXME: No-op to aid conversion of memory_region_dispatch_{read|write} + * "unsigned size" operand into a "MemOp op". + */ + return size; +} + #endif