From patchwork Tue Sep 3 16:08:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 172830 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp55235ily; Tue, 3 Sep 2019 09:10:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqx44vmKKbjynEWjYO07a+KJanyRrVmIZLViXe4IClLkZgZ57wFpfm3yU8ygVxVZQRxSg12w X-Received: by 2002:a37:9802:: with SMTP id a2mr35001299qke.346.1567527035723; Tue, 03 Sep 2019 09:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567527035; cv=none; d=google.com; s=arc-20160816; b=iAy9jPH/M6Udmf1s+EYcVM/J4aIed8Y80SU76xmW0bVoiemeNKUWdWRxsHDk/0pzgM e6KO6iC4E3I0JPUFs92iHI9OfidlPNE7A/SYgPHLkSZ1gsEwjVGt8HxlWwdSToNXLA4e aFmFUYoPAqqBy1HXHEmdiqR7HFA5tWUPw5pN4OLe7xGr4M713LJWsoq+CXCxmNS8jjJ3 VB1YpKJyk+Zdl1ww6GIjzwc7q4JOdyu3OtDRiCpRZoEjfdXfoKEylAeS/L6VK8CrXUmu G9pQeEoNGH4zMm05hMaVi+HUdGzEFeVTC0CpI31JrQVxl55arn/4IQrjEgoGKt2FBQfs e58A== 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:dkim-signature; bh=o9bye9mVTNv+px71+GweycFouVc7ymKkAXiyz/IcIpw=; b=RxJql+YSNC/umV/XbhO2cPYidSRjod6XnrKL5aBHVpG+JICZ1qzRvAhF1DALPgx6x3 6t9QmfV/Uw0ty1f7P8fVukYWelXpvUJ2SlGPkVnMyBYIanoO970DTTGAo495fVBPJr7N OZEy28TADGhe3Kxg35Y9u09nB8nlAyZSikVTEVpq2xKDSJsDVyDtjr1xdasrCg3LZBuA hWBjCOFMAoFKqnFsIbZCBvQxHvccaV8Xp9PRtlOxDLkZjZspbXVND134pRAAJgkWcUZz kLbHlqaJImlEP9rXXS9q9jjBBFJXjPQHCAi5wcbuln+JTLWzWku+gfPpxQsNJJnrDZFB j4ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Kaqk7hmJ; 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 x8si12840535qvf.135.2019.09.03.09.10.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Sep 2019 09:10:35 -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=Kaqk7hmJ; 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]:48402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BO6-00016L-AB for patch@linaro.org; Tue, 03 Sep 2019 12:10:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37117) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BMo-00010p-Mk for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5BMk-0003fJ-Ea for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:14 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:33805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5BMi-0003de-ET for qemu-devel@nongnu.org; Tue, 03 Sep 2019 12:09:08 -0400 Received: by mail-pf1-x443.google.com with SMTP id b24so11104232pfp.1 for ; Tue, 03 Sep 2019 09:09:08 -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 :mime-version:content-transfer-encoding; bh=o9bye9mVTNv+px71+GweycFouVc7ymKkAXiyz/IcIpw=; b=Kaqk7hmJIhkEl7cf8RCqAbkuSeyIhSsLplF/6J5IPLjOE2niCp7CcbEeAnNjzbSBZA +mo8LcI1fr2Uvw5V6NCp6UqBtkMrt4MAlGHaEboGLsqYnuTv78cfIqceYQPeYYKagARI Yceq0hK5Nh0mdIELb5MWBGS8727HVBj0WFqHwfUgx8wpu8VDSgyyQJ9F/ZCYJBMg2TFf nAWKugjLeWVrizVCHgr4XIGL53uhs13s83wB0Bbmg4CalbepIoMsMiwY/DTV5yHg+bhi 5IdLY4CfWrZUEpjIDpsFlkfO4LY6aZp4bvEOrZ6Jpc4UYuIWp0D3WINW7kmeOBbH7ajt nIBg== 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:mime-version:content-transfer-encoding; bh=o9bye9mVTNv+px71+GweycFouVc7ymKkAXiyz/IcIpw=; b=jNGGOo8gtX7AcbC0bjAodpXv848BrpfAJuV66siZ9U6+xU+pKRlRpnpJfI/HJST00v ACN+VLhllK78GoQsTkmSoCznVf0XV5RmIltYvbypwnQgGrj7QLYPZrddKQcbQEpkr65D hcWORrkJv2BnUnj2Ddyt3e/PNVvpxVec9FL2fz2OP3zAEdPQkK0Yk98KqTTILFmBM17R 2CSwnOHCvkeX4oPjhYlf0S/SQueb3oZXiRbGCWDHI0kuNLFlJMIs7Dk1sLEpwljc/5kw 3eDFuZNMp4Aj26ugSaZk1ft1Sy8AjwTUz+L0BoXcbBnNPRWjZ6JJojDFdMfgUk7pw8dd JZtg== X-Gm-Message-State: APjAAAWokr7PEWhBTOD3fxT/dswOtXuTTMWavD8RNS/uxZFeJHgXzP8Q YkfwbzhwXC0zbsQoUFpR0BMBsNpnu2I= X-Received: by 2002:a17:90a:1202:: with SMTP id f2mr23463pja.39.1567526947019; Tue, 03 Sep 2019 09:09:07 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 09:09:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2019 09:08:27 -0700 Message-Id: <20190903160858.5296-6-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> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::443 Subject: [Qemu-devel] [PATCH 05/36] hw/intc/armv7m_nic: Access MemoryRegion with 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". Convert interfaces by using no-op size_memop. After all interfaces are converted, size_memop will be implemented and the memory_region_dispatch_{read|write} operand "unsigned size" will be converted into a "MemOp op". As size_memop is a no-op, this patch does not change any behaviour. Signed-off-by: Tony Nguyen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <21113bae2f54b45176701e0bf595937031368ae6.1566466906.git.tony.nguyen@bt.com> Signed-off-by: Richard Henderson --- hw/intc/armv7m_nvic.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 62ab8b7273..7220940133 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -21,6 +21,7 @@ #include "hw/qdev-properties.h" #include "target/arm/cpu.h" #include "exec/exec-all.h" +#include "exec/memop.h" #include "qemu/log.h" #include "qemu/module.h" #include "trace.h" @@ -2348,7 +2349,8 @@ static MemTxResult nvic_sysreg_ns_write(void *opaque, hwaddr addr, if (attrs.secure) { /* S accesses to the alias act like NS accesses to the real region */ attrs.secure = 0; - return memory_region_dispatch_write(mr, addr, value, size, attrs); + return memory_region_dispatch_write(mr, addr, value, size_memop(size), + attrs); } else { /* NS attrs are RAZ/WI for privileged, and BusFault for user */ if (attrs.user) { @@ -2367,7 +2369,8 @@ static MemTxResult nvic_sysreg_ns_read(void *opaque, hwaddr addr, if (attrs.secure) { /* S accesses to the alias act like NS accesses to the real region */ attrs.secure = 0; - return memory_region_dispatch_read(mr, addr, data, size, attrs); + return memory_region_dispatch_read(mr, addr, data, size_memop(size), + attrs); } else { /* NS attrs are RAZ/WI for privileged, and BusFault for user */ if (attrs.user) { @@ -2393,7 +2396,8 @@ static MemTxResult nvic_systick_write(void *opaque, hwaddr addr, /* Direct the access to the correct systick */ mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->systick[attrs.secure]), 0); - return memory_region_dispatch_write(mr, addr, value, size, attrs); + return memory_region_dispatch_write(mr, addr, value, size_memop(size), + attrs); } static MemTxResult nvic_systick_read(void *opaque, hwaddr addr, @@ -2405,7 +2409,7 @@ static MemTxResult nvic_systick_read(void *opaque, hwaddr addr, /* Direct the access to the correct systick */ mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->systick[attrs.secure]), 0); - return memory_region_dispatch_read(mr, addr, data, size, attrs); + return memory_region_dispatch_read(mr, addr, data, size_memop(size), attrs); } static const MemoryRegionOps nvic_systick_ops = {