From nobody Sat Apr 5 01:14:29 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=1567527097; cv=none; d=zoho.com; s=zohoarc; b=Xo1KojgG1M8qelMYucqDYwpqYl+Cvszeg6pC5tJmXAYftpqoK6PlpX5A3TPzBp3HJQPRWf+YDl/tIuralvm7GnlRCYYvd0sh/HCJhJ7Dc9lN/MVnR+UDUfkWIH2yEk1OWQ9vIyLTMIrlFi3Y3KZaKL8i5WCFdRCLfeoPOr6Wk7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567527097; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=o9bye9mVTNv+px71+GweycFouVc7ymKkAXiyz/IcIpw=; b=DAaVOil2GYSaDSWgarinp0niYkMG8vO9A64IF6dEf0Od6ersHrtzs78OpR6mooChqIsOJWyQxWkC81+Vi1pDFTqmXCJN43/0bo1gwkC+PZyG+JJoGtiNUNvp9EMXF3d77e3NVsNNn+DyibKUYSLVMyfwBkR4v9AJEY2B1ZKN9AY= 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 1567527097301944.1417130685528; Tue, 3 Sep 2019 09:11:37 -0700 (PDT) Received: from localhost ([::1]:48582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5BP2-00036z-EJ for importer@patchew.org; Tue, 03 Sep 2019 12:11:32 -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) 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) 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-Google-Smtp-Source: APXvYqxLokP+AJbs4SzEnF3t+v8rnataWX7KJiIdlsp7o/MERKVxkbGQcBpiAJuTPV1xlq0LB9o2kg== X-Received: by 2002:a17:90a:1202:: with SMTP id f2mr23463pja.39.1567526947019; Tue, 03 Sep 2019 09:09:07 -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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Reviewed-by: Richard Henderson Message-Id: <21113bae2f54b45176701e0bf595937031368ae6.1566466906.git.tony.n= guyen@bt.com> Signed-off-by: Richard Henderson --- hw/intc/armv7m_nvic.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 =3D 0; - return memory_region_dispatch_write(mr, addr, value, size, attrs); + return memory_region_dispatch_write(mr, addr, value, size_memop(si= ze), + 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 =3D 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, h= waddr addr, =20 /* Direct the access to the correct systick */ mr =3D 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); } =20 static MemTxResult nvic_systick_read(void *opaque, hwaddr addr, @@ -2405,7 +2409,7 @@ static MemTxResult nvic_systick_read(void *opaque, hw= addr addr, =20 /* Direct the access to the correct systick */ mr =3D 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), a= ttrs); } =20 static const MemoryRegionOps nvic_systick_ops =3D { --=20 2.17.1