From patchwork Tue Mar 19 06:28:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781067 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1777587wrs; Mon, 18 Mar 2024 23:29:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU9v4YtCPatfU029KljHWpmFldlfNV2fNCndYR5TOfwI/3PnMnoQ+LoqCsUOJ1FKwpvdOizU9bJh3yfIaEXGXtk X-Google-Smtp-Source: AGHT+IFa2H/SpnpuxG505tb/Dvsm8xkbpDNdzpodfYEfUgzS2SyIwPSZiZ883e5VXyhZsWWG3ZXr X-Received: by 2002:a05:6102:225b:b0:473:c48:cd51 with SMTP id e27-20020a056102225b00b004730c48cd51mr9536848vsb.8.1710829777368; Mon, 18 Mar 2024 23:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829777; cv=none; d=google.com; s=arc-20160816; b=EypHB/UKAdtpSpOlVsqN+mHbhpwe7aaoHPs33wznm2GGhBN6/hvvW8jYyeUeVsQG3L YtJd3bJz/un0Taa9NALo49wDkO6pJ0Uf4ds6wD/an9pouRlwTjh8mqKjulZtUmVfdilP PGLCEAZGHU+bZ+3wLARw7e/+9El9vdrh454f6+LjfYioGyaqZp3K1d32Hb9V6k34avWM 7RgVCVASSmb5496WEx/+fEfXIMx1qKZsGJLOp1684z2tYii78nuZoej3IUsCDU53dhuN rB3EnlDSKiNwoOQO6B7pFLuLsw3enJfEkrRo/6WSQPuQFcTYh+oouLVzWDryfMDh+HjP 3Jyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+Ob9p1550HNpZVGfZEzfCR7AGiyEKvTVPMJN9EmG2s0=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=O43nYIebbr6hfCE+VvPPS2uY4cxDvDMNh0w+pNN/Ij8qXcKCnuDbet7cIFjrFigNph vBlOdEDUIzEpcZniGgxQRzMc64HPiYfTYvtSLZ/3qlArMFqTVrfTCVrPb7OMngzbTsET kk2LwLC5/h8QnfCjQ5ihX7n5LocWZJRd60cveCBDemZPgZbjZXUPtbIHy7RWcocmC67S nQgGnoV7pzh+1D1KmZd6/oov1hOFkSBoYSRHN9YJAXAcg7YDNgcoJxXOKzbrUwkU9M6/ XFDd4xeQwOLFoJhX14b+/iRt3XwexZ7fGK4lZlDzvUVZi3famfWNtxlP70Peta1vrnQ3 VcHA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vzDqpreD; 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=pass (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 u21-20020a05620a455500b0078823630f6dsi7745801qkp.469.2024.03.18.23.29.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:29:37 -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=pass header.i=@linaro.org header.s=google header.b=vzDqpreD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSyF-00053K-Pe; Tue, 19 Mar 2024 02:29:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSyE-00052t-CZ for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:10 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSy9-0005cE-LU for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:10 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4146172fb7eso8502275e9.1 for ; Mon, 18 Mar 2024 23:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829744; x=1711434544; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+Ob9p1550HNpZVGfZEzfCR7AGiyEKvTVPMJN9EmG2s0=; b=vzDqpreD66K6NJnqr1M9le42pTHHgLvlcyNXh3pa++DyQZZFtSsHINXGd7Gp5TKSzS GhAcasSABzjEcCfzdOIOl/iT+af+D5tKVSiUnWCuzIW/odjMdZVZG/qhlIbs4Xhcb8Lx lGiy+B4BgazQaWE1X2EDKXq7C84Jp/o2lZihjEKHk8G6QFEcRLG7Fk7SAgHBXvmiig3M Qkj6syj+S/EpUtg1x89CFdemu9YpfZfUkydYvMBWyoFDehnR/bEaiXnA34wQ6XnvWdTG D30p79wgMq2ManseWAK7rT9REh3XK38u41674WAhcDEXt+VhXBrABaL1x0Ifbmjl+rhs 1MqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829744; x=1711434544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+Ob9p1550HNpZVGfZEzfCR7AGiyEKvTVPMJN9EmG2s0=; b=rp8geKI5vFWe7iqRJOu39AqQPahYjb1DpxIK7b0uvtSKmjxbMMBRF/eBq+WJpU/BLw Jn0KL/KRBxQDJ/C/eoC7gp3vdOfh3wDpubqPNSHIHYMTmzy+ebhF+v+nS0k2PhY3zMKr FrQDvb8vCMSf83JXmxVrTUCJ7tuZwwtU0oI/Ud5jXX9fLRqBEhRWbYOEf902uY6/rrU0 iqucnxh5sStqekTPqzRcgDF8kTGd0CK4COS0e7+/LiP+gUr/2QlOFgRvSv3CSqjBqFPE F1P0N1gXFHL2OvBIcT0CDvqxJHhxVgZRkhvrp43DvbREZmfRc7Ongy1haGdWYRQarcXq tstg== X-Gm-Message-State: AOJu0YxAupwdMKxJbvuGw1kocLah3bkLJordJJh/tNLbZa8Cb8Gel4Dz 1C9WZvfxERhwgA86hlZKviEdkDtWHsIBKgPPRGVK7d9pfjBuzhl2fy+jHN5dONHzrlMGtug3wBA U X-Received: by 2002:a05:600c:1914:b0:413:ff13:cd8e with SMTP id j20-20020a05600c191400b00413ff13cd8emr8004849wmq.5.1710829743802; Mon, 18 Mar 2024 23:29:03 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id fl25-20020a05600c0b9900b004140a3d34fasm8493344wmb.41.2024.03.18.23.29.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 1/8] target/microblaze: Use correct string format in do_unaligned_access() Date: Tue, 19 Mar 2024 07:28:48 +0100 Message-ID: <20240319062855.8025-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'addr' is of type 'vaddr'; no need to cast, use the corresponding format string. Fixes: ab0c8d0f5b ("target/microblaze: Use cc->do_unaligned_access") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- target/microblaze/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index d25c9eb4d3..0a12c4ea94 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -279,8 +279,8 @@ void mb_cpu_do_unaligned_access(CPUState *cs, vaddr addr, iflags = cpu->env.iflags; qemu_log_mask(CPU_LOG_INT, - "Unaligned access addr=" TARGET_FMT_lx " pc=%x iflags=%x\n", - (target_ulong)addr, cpu->env.pc, iflags); + "Unaligned access addr=0x%"VADDR_PRIx" pc=0x%x iflags=0x%x\n", + addr, cpu->env.pc, iflags); esr = ESR_EC_UNALIGNED_DATA; if (likely(iflags & ESR_ESS_FLAG)) { From patchwork Tue Mar 19 06:28:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781073 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1778092wrs; Mon, 18 Mar 2024 23:31:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXX/ycBZhAYeqjaodSlRIQ7aYLmt4LBS7W9LQNFDxmKLhgjgBSOxLdR6d25vxuF2SobrjaZtRobK6rHJzNwNK1b X-Google-Smtp-Source: AGHT+IFc7wleNL6fD6jP1L5NJ2Ue7FSYi2NXGF3+Qi0kvo17DYF2HsfCDKVH/u+UnkfT+n87Wmpk X-Received: by 2002:a05:620a:2190:b0:789:fa4d:eebb with SMTP id g16-20020a05620a219000b00789fa4deebbmr1988929qka.69.1710829871829; Mon, 18 Mar 2024 23:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829871; cv=none; d=google.com; s=arc-20160816; b=lU9bcMm4+77zHV0UQrleiOrL/COLl3V+nmeTmQt8sA92xtyTytpCIWZ5zyLuJbn7wy 35UagaxXI2i9UMslfE3KTByElEUuQSbrj/PTb0AWjtpqP5oD6Kv5sTQp4IhKeBNAOT3w EqS7Tl14xZdpe623BFvOfP1Ll5Qqp6mS6kFBvQSELgLY2C8gRDkshi5aCrN+/uqqRJ8r ka3XLb4l9E5INOmYw6DKTP42PFL/Ekx3w6oL3rdWMRJb2I3RMz7M/rGgLkgJuVW1X4oy c3DYYWu9UtnhJA0cl3xnC2eMRVN0jirxoJ9lPDVjP+g4kzKDbXYk6Ut45EKVsi6QvKAG vQ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fCgoP8SLDbVfo8JThgfHljHZ06CYNyRI0w/tkagv/vk=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=D+v2iPALWikZG/Oz0x1wBmr7fxWhSD/QnhxDWRxPp7K+sMwHGuCwlv7MJEBpDxZzwL kcO13JcdzLEJNcEu3zCgg2XxMqT43i73XgEmCzQD1oAoZ4MatFzLDt0BCX1wXKmEpsXM pMa18fYUbo/bArb8Qi7k3Ts9PJHzwtHuFG/w7qXq/K5gPjsgMDxjMgf8ZP2mM07bMqPH 5YizqKI+odnzqU1N1pLyCuoYnzg0S7hUpeh9lkbj/SV5ByJiOG4cRS5kcb66s/cvxeVK QaDnzpWCkFYsgVeHpPZ7LZFXtcRQcoc5pNtz8BD+iNWlIC4EVwufejFOtdQm+GD45FDk cjHw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wUnKRgth; 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=pass (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 d29-20020a05620a205d00b0078a01ee19f4si3353687qka.773.2024.03.18.23.31.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:31:11 -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=pass header.i=@linaro.org header.s=google header.b=wUnKRgth; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSyH-00053h-HJ; Tue, 19 Mar 2024 02:29:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSyG-00053S-Jh for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:12 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSyF-0005cc-4a for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:12 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-414676fe047so33825e9.2 for ; Mon, 18 Mar 2024 23:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829749; x=1711434549; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fCgoP8SLDbVfo8JThgfHljHZ06CYNyRI0w/tkagv/vk=; b=wUnKRgthxzgT02Sh3wX8JlB+5GL0xjfZLXYWbk2xjF/7ScZibTId4wZ9oGxV2I2yWv tyMOH047uFHB4+xPAx+kmrnXvyFyW2i+2EcTh/vlk/3NchIbAuKjDV4/seA0JwbokST5 2ymU6KXJa4FsWBH33fA6qvJJ2Qf99MReCv0YNPsE9SEps7NfOIVYJNREC18Mi4LfzDAD F9aEOtaaNhEP8akEAhMPanK7IpWOrW3xCPpQAanUMxRNrlFBTzB3gq1iKTFAZ99iTFD7 KA+Y6uGFMS7s2ndawmpUEX4U9BZ+3uo2JS35WayLq+d8BlF7nC5RWOeA/qMPxt6ep4HJ w4UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829749; x=1711434549; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fCgoP8SLDbVfo8JThgfHljHZ06CYNyRI0w/tkagv/vk=; b=VpGsNaEh6QcPbGyNrecr/eeJOh+UcnVkFNkOGkWUag5IfEjZthaYQcTbZVQ3QO4Z5R hqx4ZtXNc/U0vIKdyOL5bdsgM89NLBTu797X8e39NVDJog/eXuxHeqiszwpP5ZXkp43K UqgWXhyELnQ2dEYUL4OUME3CrJkNdW/udDHbrP7dX5BP+Ch03B9+guZ8o1nB6XwjoTWN SDoLWXmCXaieSeIh2LEfyO10V4LO7bSPLf7Jvv0SzxPi7Nb6HXV9Mb/pnMay015hfTg0 Bp2qztqV1fFe9NuDONpTbazlZfkQyFyBdLs/f7/uv1lM2eBzwsCmud28wxH7ljvivvYf I8tw== X-Gm-Message-State: AOJu0YwP9MEbNH9IUoYTjDHEtVbc9mzOEPGSkexHA6WTbMrYLg+E65Di stBbdeYA7Hv05jI3cMxeC+mym6QG1d1SDJxwJEOxQx2S1Xd2FzPteRiOOKxKVwk5sSjh/xgN3Xo 9 X-Received: by 2002:a5d:4590:0:b0:33e:cf68:7345 with SMTP id p16-20020a5d4590000000b0033ecf687345mr8214247wrq.61.1710829749489; Mon, 18 Mar 2024 23:29:09 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id a26-20020a5d457a000000b0033e7e9c8657sm11509428wrc.45.2024.03.18.23.29.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 2/8] target/microblaze: Use hwaddr/vaddr in cpu_get_phys_page_attrs_debug() Date: Tue, 19 Mar 2024 07:28:49 +0100 Message-ID: <20240319062855.8025-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- target/microblaze/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index 0a12c4ea94..3f410fc7b5 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -228,7 +228,8 @@ hwaddr mb_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr addr, MemTxAttrs *attrs) { MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs); - target_ulong vaddr, paddr = 0; + vaddr vaddr; + hwaddr paddr = 0; MicroBlazeMMULookup lu; int mmu_idx = cpu_mmu_index(cs, false); unsigned int hit; From patchwork Tue Mar 19 06:28:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781074 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1778127wrs; Mon, 18 Mar 2024 23:31:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXxyhOCQyw4Rpr3IZZiVglW0KM0Bas2f0UMUjpYveMePb0uFABd9YSTczB+Z1e29skCWqx+quPsXvYVzRQTInh X-Google-Smtp-Source: AGHT+IEkSm+ZEzBdXleufTCcG4Vz9wluuEzpppc4MwKLbrTHMtP7mJNJsMkGX0ZYIY3wTKeri2+K X-Received: by 2002:a05:620a:1095:b0:789:d334:619c with SMTP id g21-20020a05620a109500b00789d334619cmr1889792qkk.29.1710829879508; Mon, 18 Mar 2024 23:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829879; cv=none; d=google.com; s=arc-20160816; b=jkjgioBaJIUoW62yF2c0E6CPxSod5LKllIGCKqvs6xAasftaqSsoe171y8Mz2WwnUQ 0MfekrtTVLZVyHAnoRKcDFyVrmfj3pR2bxgSiyLW7uNYsKW/Lm4ujmnZjSfvNHcSxRHR BOkNfYMyjLeELCUqiOfj+j/OzDLRjch9x3mdaQ2l7q5PSMH0a5vvqk8vk3cp73w295M8 PDuqvys9ZHxunZpefLZ+INHff2aUqgGpqUs2Dd1SyyaG1LsZ0GWhdHOsr4HxKjepogag 3qDFV3CJwOh6ItZNvaxRsq5U6RtIUz0186X215Y17nZjK/sI/19UKjBG7PH8pEFJlvSr enbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zLi8HPYzQKK0ulsJCWUrgKiQfFdRxTHI+3UszDXzaTk=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=DW5CPwyTFzYmSCPUcUXrw2lt8pOfhNp4o2LC3gTYIX6XjEQ4AnKR+YoPQF84sQS1Ya mR69r663dkRgXpwvEqBPPKxxsT85cJbWXWQ3MHApQto0PloTImSkC62luC/7M31pRBti tHT+tC42a4g5aeXoafUYyS/udW38lsxqSCOqjCLkXXdZHMWedlGeNAqTDMXrdJq1sMXv FPWWlG5+hUtcLtUseFoRxxnGIHLRAARs5ZEbylyVY5AvUIMrJNE8XMcjK5a2yNTf7Msv X23CtLsdnZ5tnglDkPpqyTbDmsiyPOuBU8PaujEmXK3bbXHIOSc97+3yeoiXYDE3R9ae Rgmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oYEfSHzd; 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=pass (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 f12-20020a05620a20cc00b0078a0b4987cesi2029570qka.609.2024.03.18.23.31.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:31:19 -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=pass header.i=@linaro.org header.s=google header.b=oYEfSHzd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSyQ-00056k-5w; Tue, 19 Mar 2024 02:29:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSyN-000540-Il for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:19 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSyM-0005dC-6H for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:19 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-513e14b2bd9so3256018e87.2 for ; Mon, 18 Mar 2024 23:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829755; x=1711434555; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zLi8HPYzQKK0ulsJCWUrgKiQfFdRxTHI+3UszDXzaTk=; b=oYEfSHzdZLrDQZlnB93SNcjUv1dBWlwx9Bg1DE1rosXuNVy9OT9Y024aZB3KSBTwqZ dxSh8lcy7xnJlyzLlcpS6vAM/17lRu/dGoraOalZVQ9dGAnV2F2YGxzirqsV8IDwxco3 cjh60n/rouRFfk9c3QTgLaeSs00svvfeP7IWKno1ApuW1Hn3S6Kl6v1Mz378MfOJmbQx sPvYl/swyCNq7ZHgHq1sj/1KAPxEB8c9/sowOxTCFuErJD1TjrD9Ja6pYsweoyj/n7wo 1aD7d05CUkAzxLBgWHAvQkdQx07Dt33y0ANtSoRfRbqtAQFAVAv1+ZeDZ4U0g06CaMpV YsPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829755; x=1711434555; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zLi8HPYzQKK0ulsJCWUrgKiQfFdRxTHI+3UszDXzaTk=; b=Jb8pRa3Y6Gu7oq4synAy4/U0ba0z0ISx+H+0Ynu9MeYIHEi6anXGw0cLUNCS98YfCc mH76Zoe2ypbiCYYqHwcLuBlVlt8VmAXnSHICWi5gefziQHdpyRdnwy5v2DqWCthFr+iQ akak3WF5r0/IGVKgUhR0JGhmUS6GWHma8wuc2NL6butvGtXatmxL6EHBwlX8VSrYU7mb HzYMGDmNOr7lfCZpKEQI306tH+Zl1wsvwxMug7YxRZJWUMLBBywlHRDUVpv9q7qey99C I8Y+t6PwaUiXQSx2T4KluYNaB/FhpDlo1BQbhmkN5YaYVeKwXp3JkAeUWtR/wvC8TH4A T7OA== X-Gm-Message-State: AOJu0YyVHJYNL3Kq+IXwC4qrp8tGhCVv1damZnZEVaIAxubzndCM82L8 sjeAn/ltBTpP67k0nkCDBKmV63oWeSIPj+ONIbzdmmgtvkSrs0c59+sy9tkA9pkcCru53Wxk2jY o X-Received: by 2002:a19:8c4d:0:b0:513:cc24:c464 with SMTP id i13-20020a198c4d000000b00513cc24c464mr9866935lfj.15.1710829754972; Mon, 18 Mar 2024 23:29:14 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id k3-20020adff5c3000000b0033e7eba040dsm11624669wrp.97.2024.03.18.23.29.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 3/8] target/microblaze: Widen vaddr in mmu_translate() Date: Tue, 19 Mar 2024 07:28:50 +0100 Message-ID: <20240319062855.8025-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use 'vaddr' type for virtual addresses. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- target/microblaze/mmu.h | 2 +- target/microblaze/mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/microblaze/mmu.h b/target/microblaze/mmu.h index 1068bd2d52..2aca39c923 100644 --- a/target/microblaze/mmu.h +++ b/target/microblaze/mmu.h @@ -86,7 +86,7 @@ typedef struct { } MicroBlazeMMULookup; unsigned int mmu_translate(MicroBlazeCPU *cpu, MicroBlazeMMULookup *lu, - target_ulong vaddr, MMUAccessType rw, int mmu_idx); + vaddr vaddr, MMUAccessType rw, int mmu_idx); uint32_t mmu_read(CPUMBState *env, bool ea, uint32_t rn); void mmu_write(CPUMBState *env, bool ea, uint32_t rn, uint32_t v); void mmu_init(MicroBlazeMMU *mmu); diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c index 234006634e..eb7c683020 100644 --- a/target/microblaze/mmu.c +++ b/target/microblaze/mmu.c @@ -75,7 +75,7 @@ static void mmu_change_pid(CPUMBState *env, unsigned int newpid) /* rw - 0 = read, 1 = write, 2 = fetch. */ unsigned int mmu_translate(MicroBlazeCPU *cpu, MicroBlazeMMULookup *lu, - target_ulong vaddr, MMUAccessType rw, int mmu_idx) + vaddr vaddr, MMUAccessType rw, int mmu_idx) { MicroBlazeMMU *mmu = &cpu->env.mmu; unsigned int i, hit = 0; From patchwork Tue Mar 19 06:28:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781068 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1777613wrs; Mon, 18 Mar 2024 23:29:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUsjgjlQ/HgV3KiCpsQRsBQYnElhBxf4TrdQidyDdW256I73ytr4ADOYbrzthVvIjLTWoc3cyo09qaTpAZhtfiO X-Google-Smtp-Source: AGHT+IFBjDxnzl6jTVJcSdWZOLIVAxh4FoT8ZbwAfz9SjJZhkRU/5bYTf4Xav1XKBoyTzhPOAVGG X-Received: by 2002:ae9:e70f:0:b0:78a:883:1752 with SMTP id m15-20020ae9e70f000000b0078a08831752mr1780050qka.71.1710829784659; Mon, 18 Mar 2024 23:29:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829784; cv=none; d=google.com; s=arc-20160816; b=hxpesmjVTj/ReikXZs3IU73J4/+VM3aYrItT/fB5SLgp2rxJWiJsJ+t9iOzoaZPML9 z7lyj6G3CJOPTEmZCb4kMIKd64x/Gtclnt12H6ug47/JI8T2qszWeQ2ARVqBb1SCCQB0 UrMcJ81zCC06FDRBiRqVap83ZZDd/xtalzbORoEKOPjI7KDSJTs82uwfVm9Jeo90fNn9 7mspS94AmRQ/drNbDn7tZ6g2SvijlgkZ1UUoUrMcG2mm4w1wn+h/+tD5WMfAFCkb3dwI /XaMtxOd4BUdoyZrqgEmsIwm1aNEsHpxpE5PBBaEi0PlyqZhPUSrDD/3XLSu9Wn+IVr/ tzPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OUMu/SnjGuIrmF5U5VN8reZH7HV2LtE5n6DxI3xZ0h0=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=rNAP0g+lAObHRU3T575mZz8inn3xdTg9BWeLh83QyKcJy09cIaBu9oTlpgdvHDDB7o Ws1ArbmuFYt8HisbAl5orrI6naXE2BOyCrZN407XXjIg609ZPF9NHe3LAJVJGCcmj/Hc mXIS8YNQ1pZgRNUrOZnJmgeIz7mTaBrxPyq+d448ualU99Sloy/e5QrDqgINbuF/5oqx aaGVg5fZ3RFAVfAzrpj4gn251k7Zl3JASlh+eawzAi8Uns2uZcjG6+LQLoCa6WXR6PO1 me2eLKeAWGfsiI/I+JY0mOHeCtfzZdyYdNbkDpW8v3t9uljuxOgBRNHG0nMBGLIG1juY YyBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=plwc0dqH; 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=pass (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 q19-20020ae9e413000000b00789e94fc666si7591531qkc.42.2024.03.18.23.29.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:29:44 -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=pass header.i=@linaro.org header.s=google header.b=plwc0dqH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSyW-000596-Et; Tue, 19 Mar 2024 02:29:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSyU-00058R-7N for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:26 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSyQ-0005dh-MC for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:25 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-41461c256c4so5249425e9.0 for ; Mon, 18 Mar 2024 23:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829760; x=1711434560; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OUMu/SnjGuIrmF5U5VN8reZH7HV2LtE5n6DxI3xZ0h0=; b=plwc0dqHA3AAP69WtK89dB9Fxl5671UXEgvyOfgBFEuM0sSHjjO6kydLN/MTb7/a/X 0ir43r0E7gUd1AE7+rb8cykUPLCD2uFq3Osqtt8MDpy7pUOb7EbV6KRXR8MlsIpcVlq0 X4k87UCgvJUf1xMhudJDZ/kuK9UuAIV7UnBYPkt3nA9aUiH0FfVl92B3hSjf3c6Gp5+H VfFnW+b6nUfbKCQu3YVv9xXCp1WtM2gOUfYSCdcMTQ+Ut+wkW1T2M3cT0MbHtqPRcwok U+NONCg1rZS0QtFk2alGozJV599qc/Dsx+eHv2+apNM9DcJ7gCbMQ71SC0lyHXo7oWA8 NlHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829760; x=1711434560; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OUMu/SnjGuIrmF5U5VN8reZH7HV2LtE5n6DxI3xZ0h0=; b=nJ2Cxc3UT3ABm8JAqQiy7636BR4ikjJGJ71BpJorZVsjhKo6htWxvIodDfKtzAdKYl peoeTqMcZEqHXCcFT+BGQvMcT+FkRTWT290OC25lvNCfxuUj9kxitGAZtnkVczcf+BxF Y9ZIZdSXgIfDzxSnEidZW19QEiVKpLF1msmF82khYL347Zext9QkD4jTcBoiU76017xZ ZGcxhGbBPoGCZNANZNfEh1FfBWBvHB+6HxuiMUqf1y/QssUa5xyN1tJPEICoeX8Qtrid Upb5Yrh8WPLDhcVMCYJw28DcUS/GMgj4s+EQ0XVXXOpHwNG4UOUJuK3Uu3lzieMGmkCm s92w== X-Gm-Message-State: AOJu0YxkaPKkX0mU5Jna9y42nTpyPVFS0cjkJr+nTh3pdhLFGCH0KkNI wJYMidIS5cA+zyKS/oBjWuD/+h5YUXcgcGO+cXquvxqX1cAcFm7PdBXSmpyfzs8Hp/KTO9m0Moc A X-Received: by 2002:a05:600c:5494:b0:414:624c:aaf with SMTP id iv20-20020a05600c549400b00414624c0aafmr866477wmb.35.1710829760636; Mon, 18 Mar 2024 23:29:20 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id t6-20020a05600c450600b004133365bbc6sm20189118wmo.19.2024.03.18.23.29.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 4/8] target/microblaze: Use 32-bit destination in gen_goto_tb() Date: Tue, 19 Mar 2024 07:28:51 +0100 Message-ID: <20240319062855.8025-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org cpu_pc and jmp_dest are 32-bit. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- target/microblaze/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4e52ef32db..d6a42381bb 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -121,7 +121,7 @@ static void gen_raise_hw_excp(DisasContext *dc, uint32_t esr_ec) gen_raise_exception_sync(dc, EXCP_HW_EXCP); } -static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) +static void gen_goto_tb(DisasContext *dc, int n, uint32_t dest) { if (translator_use_goto_tb(&dc->base, dest)) { tcg_gen_goto_tb(n); From patchwork Tue Mar 19 06:28:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781075 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1778140wrs; Mon, 18 Mar 2024 23:31:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWvHLwRZCI5YC1g9akq1UEjChRR97fUJJWz1Do11e8/SAifFFUITW28XwlwKJZs9g4RI2oAYK7HabtQvnygySOX X-Google-Smtp-Source: AGHT+IEAopUbOR0ZlDWnNYP5rDMwmeQBfHASKbtyzTBYidUeRLwG9bMQuGCzgC9eQFRV5KnAyyyj X-Received: by 2002:a5b:c8b:0:b0:dd0:453b:485e with SMTP id i11-20020a5b0c8b000000b00dd0453b485emr10832375ybq.58.1710829882888; Mon, 18 Mar 2024 23:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829882; cv=none; d=google.com; s=arc-20160816; b=1HTGo85jR17Im+2Lu9aU3fdg6/YyYbT0T45VMYKp0sY75P0kvpmKJyXAfrpcJq3THz MRnk0m2QzIm3gGerNw2IA9H7rFoLUaygkouJiLN1Nl2x5Qwpm8pWj+gmI7QFx4GJbvOo kvNUPes17z2f//dTB9MaAcRUfHtCOfmpIIfh09zkQhDMtfI3UweBn7H+cK2mhk9qsK1v ff8Q7BT6JGweq3i4dHiTUuQ532b/jNptQ6kBnOdlUKXY1yeIIbkIJAzIi32yAk25R2lM 3iACt7YLF0EskVhAb7hno7tSYWVNjNwAZrhhMPm0beZAHYnXJ9fnenzSBw5Fn0pxQ4gG 2Ssg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n1MPot1rwOH2sHZ4KnXL6/xrTAyUEmTpRKdgwXMTPjQ=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=ThvCB43c9G2lLrccM5kv0W9I/10Y+yCEEzWHxtunMPNyzzJQn/SqwyC7abioBhZOu7 PFFCuwslp3SBd6PsnzRq34uRdoqXrzsRy1cIIhfvJu14aUfF19Qir19QBVoqz7Xq00fG oLuq+X2tjbgki9jJkCBVTNyevLpODkcMy2gCWWnzmiPhbOU1NhkkDQbIIkVTWiqwqo77 cHESfufNOC30NcB0XXFS9HecuVKLdkyjDRylaAvlSd4OXBlsy40lwpXas2tBFxjISpjt Z0vWTeGr3AuBfd8zydYDF5Vs2pOW0ApIRzhSUv1l6JlzHR7pyQiecDDJT+j+B8CyjNj5 F9Bg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=owwEE06F; 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=pass (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 s37-20020a05622a1aa500b0042f0f3b2fe3si11096443qtc.582.2024.03.18.23.31.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:31:22 -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=pass header.i=@linaro.org header.s=google header.b=owwEE06F; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSya-0005Dx-QN; Tue, 19 Mar 2024 02:29:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSyY-00059B-HL for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:30 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSyW-0005e9-U0 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:30 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-414618e6820so5819905e9.0 for ; Mon, 18 Mar 2024 23:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829766; x=1711434566; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n1MPot1rwOH2sHZ4KnXL6/xrTAyUEmTpRKdgwXMTPjQ=; b=owwEE06FNiM1zIBP72Rs2G0t0/gN4g4bRK+GvvWAg29woDcH9ua4qOphaS5MSdsSIR 7NVr8JuTTX3OcH9CGZ/1kSCC2ZLbYjQZHfX4gCAKF2kRP+2thVlIQac/KS1KFvdiTxHj T/6Lodr+CUvICEtcDaQ1zUiT6fZNVnQsTK8D++3fUAg1s23CoMklEGChN1wO02fXsj4/ XKyTS0x3h0gmFWoBm6xm/n04cz2HrU2F6MWtQgmgcZGzQnpcjbT0otRRLxKtTkI04soR ZNlOfIwQ5I6CHVKX8x2BQenvYfLA4Hz8k3oK6IGfdutunUeZpBYfoMSI8lXmixIaDUhW GI5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829766; x=1711434566; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n1MPot1rwOH2sHZ4KnXL6/xrTAyUEmTpRKdgwXMTPjQ=; b=sO6HR+30Ln0h6q74QSYiPGE+GbnGzDFAhbZUhiMnoWd8tJ5KuFdJqIX6mHL8bW41J+ 5N/XhV1sYUFAtHrDGLp17lJt8en4vJFaoqh1t6jsL0mSmOGSFFaNkyjKl9Ka4SRcTzLe Q+XY0kbakOMUhuqyNvpsa+BFcpZGGpVEqI6zhXUpr5hKcEPZDsqpcZXWQfHny3AcmlXp qj2B0LHjkJ8+ZZZKGqBqUo4vQEQ1t/X4Ayn0hJc6IjaXpsz0c4uBRClm72qHh+RtIrN4 DpqLcJzK/bS/7BFZGmTar+AEmH1NIBCLtpiqvxKKrhRlJRO8asGN6W4xQUeMq4p2esjS QpyQ== X-Gm-Message-State: AOJu0Ywi07YiGDvodmwsPzY1q5WSqlDCshMHQr8MawEakEejmwDlnn9Q f5ADzF3ujxZLxOsoChiVdJIrAOseAtpKXhFYMdOxdW7KtRr/c0adZS7Jo3/JmSq/c1NrsJU9xZK e X-Received: by 2002:a05:600c:4fc8:b0:414:6172:8366 with SMTP id o8-20020a05600c4fc800b0041461728366mr1300185wmq.15.1710829766185; Mon, 18 Mar 2024 23:29:26 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id j17-20020a05600c191100b00414659ba8c2sm650763wmq.37.2024.03.18.23.29.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 5/8] target/microblaze: Restrict 64-bit 'res_addr' to system emulation Date: Tue, 19 Mar 2024 07:28:52 +0100 Message-ID: <20240319062855.8025-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 'res_addr' is only used in system emulation, where we have TARGET_LONG_BITS = 64, so we can directly use the native uint64_t type instead of target_ulong. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson --- target/microblaze/cpu.h | 10 +++++----- target/microblaze/cpu.c | 2 ++ target/microblaze/machine.c | 2 +- target/microblaze/translate.c | 9 +++++++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index c0c7574dbd..c3e2aba0ec 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -260,11 +260,6 @@ struct CPUArchState { /* Stack protectors. Yes, it's a hw feature. */ uint32_t slr, shr; - /* lwx/swx reserved address */ -#define RES_ADDR_NONE 0xffffffff /* Use 0xffffffff to indicate no reservation */ - target_ulong res_addr; - uint32_t res_val; - /* Internal flags. */ #define IMM_FLAG (1 << 0) #define BIMM_FLAG (1 << 1) @@ -286,6 +281,11 @@ struct CPUArchState { uint32_t iflags; #if !defined(CONFIG_USER_ONLY) + /* lwx/swx reserved address */ +#define RES_ADDR_NONE 0xffffffff /* Use 0xffffffff to indicate no reservation */ + uint64_t res_addr; + uint32_t res_val; + /* Unified MMU. */ MicroBlazeMMU mmu; #endif diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 96c2b71f7f..9e393cf217 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -193,7 +193,9 @@ static void mb_cpu_reset_hold(Object *obj) } memset(env, 0, offsetof(CPUMBState, end_reset_fields)); +#ifndef CONFIG_USER_ONLY env->res_addr = RES_ADDR_NONE; +#endif /* Disable stack protector. */ env->shr = ~0; diff --git a/target/microblaze/machine.c b/target/microblaze/machine.c index 51705e4f5c..4daf8a2471 100644 --- a/target/microblaze/machine.c +++ b/target/microblaze/machine.c @@ -78,7 +78,7 @@ static const VMStateField vmstate_env_fields[] = { VMSTATE_UINT32(iflags, CPUMBState), VMSTATE_UINT32(res_val, CPUMBState), - VMSTATE_UINTTL(res_addr, CPUMBState), + VMSTATE_UINT64(res_addr, CPUMBState), VMSTATE_STRUCT(mmu, CPUMBState, 0, vmstate_mmu, MicroBlazeMMU), diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index d6a42381bb..493850c544 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1872,7 +1872,9 @@ void mb_tcg_init(void) SP(iflags), SP(bvalue), SP(btarget), +#if !defined(CONFIG_USER_ONLY) SP(res_val), +#endif }; #undef R @@ -1883,6 +1885,9 @@ void mb_tcg_init(void) tcg_global_mem_new_i32(tcg_env, i32s[i].ofs, i32s[i].name); } - cpu_res_addr = - tcg_global_mem_new(tcg_env, offsetof(CPUMBState, res_addr), "res_addr"); +#if !defined(CONFIG_USER_ONLY) + cpu_res_addr = tcg_global_mem_new_i64(tcg_env, + offsetof(CPUMBState, res_addr), + "res_addr"); +#endif } From patchwork Tue Mar 19 06:28:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781071 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1777973wrs; Mon, 18 Mar 2024 23:30:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU27/DInvTROhb9Zxp8DeY8cWNw6ZffamfdJVEI8e7/YXNSQ7dejZmSJJl/E21eDJMeMmn4KKrxYp4Cx8Ao6HOd X-Google-Smtp-Source: AGHT+IGyJGdFUyd/LQB0RH39QH1Y/PgNGQWhWVyimVJoziuisA7BeHyin6muQR2df9VFNWLGJ9HX X-Received: by 2002:a1f:7dc9:0:b0:4ca:80c5:753d with SMTP id y192-20020a1f7dc9000000b004ca80c5753dmr10733129vkc.4.1710829853491; Mon, 18 Mar 2024 23:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829853; cv=none; d=google.com; s=arc-20160816; b=TnqAz6/JpLgF/u6eCv2Pa2q/NajPq3taqXIlpZgVUVuQ5pWITWn9pWrdROXIe4JP3W nzdkIFO/lK4NZUWtE5fuwyLsCpw50CEQjitHsk+ssmT5uMBVrG43Z+VnVVEcelSpp/++ 8mNbo+pT+FBnW0pnnfXZWRDm0SevS6TrI/Fij+ie8DDbT7WtPfb4v0X0v45+KcPewjeO VF1vX9fNvakungxggNO/06lvJAt/WlDwk2edFpTHJxVOly3yB7lcUzXgNf51HqKrmhGW ZN46ODvhckmiqe15qEDYAlmGGBMj6pmCxcQQ4OikkeDyMubMLiHKFbHcWK9AotaHp9PC Cmkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jaSTDZWCvnDQFHGWaMWeelLWgiRSqaaIXlBIS7H4n9A=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=sJ19EjPvpXrRz34jVTaEfk3CrL90Nco4p46l9l43OKfcVgxCa4EhNZEJxrpgiERtyJ ki2vfnrO7yUx3fSFNAOQ8vwWc4WlVyefDKx6uJliVvKtKHXwTOerAD7jIlLTEAte849c Ya4GISI/kK9WdW2g0NS6Lv8g/lOK7TmtZBMj1B/7Lo9gtTw1/lf04z+ChtbFwv8q6cZe t4ta7eFIJ+MWp6mf4T62rxnxS1hQ89RscKGoSAMWbAMOj06OE/PlPcpDeTmJsHoY51pW RjCzEQpoYUTtKeABU9GgVwxQXEib5Tqi6J3avEl1Fo2oqvC8oNQiyTp6NC9L9UnYpFGh RRdA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=heLJNLTV; 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=pass (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 gu14-20020a056214260e00b006915cc16349si10193494qvb.100.2024.03.18.23.30.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:30:53 -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=pass header.i=@linaro.org header.s=google header.b=heLJNLTV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSyk-0005Yh-IK; Tue, 19 Mar 2024 02:29:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSye-0005Lb-Bo for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:37 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSyb-0005ea-Lx for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:36 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-41461c256c4so5250185e9.0 for ; Mon, 18 Mar 2024 23:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829772; x=1711434572; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jaSTDZWCvnDQFHGWaMWeelLWgiRSqaaIXlBIS7H4n9A=; b=heLJNLTVIkvO4B3F7/mDF8jdEk0hazqFz3rTaMhKKxf4SlX4XCC/i/JoSaDCKwOJyA LDQzE0LJJExZeFNVxHNxXmqvBowtQA+L3h5dTKC0y3Nsc3DysqIOQa9CmVAXNywhXSMo yPhUGoSp7HPtB3HGYS8cpDUx0gYIoc3AcvJZmGYa77zP5FSr1WQR7r4O6JnTVin87CQM COuq51VESAm8PaA8VPKltrbprNDGJy4O60xtvW0yf1ZPGhjjI1apYT2frYjygdVIEWCy uo68xaIRryvBL6WxCWDA3aqPlSALSrZ/lxUMNuX/wN4fK1ScnAZ4z5F1APiZYdj2tHzM Ii0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829772; x=1711434572; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jaSTDZWCvnDQFHGWaMWeelLWgiRSqaaIXlBIS7H4n9A=; b=TCpa8E9YhVk2fIlZ8FpNJ087GtciaJQMmqHFHGGxb2I7XgEJ3Jr1yM8wztbCmh6eIG FboPQT1m1pFuiVZ2H7miIlu9loCpu+uU41/ayf4en6+oD8sqTCMDh4r8zFOME90l+LJQ LXzhuZgdIt+JFh1juHmxdFa4YJi/hgcg+loqb1uaRnPOCF1BZfLsVxK8acZ0XpUaqoS1 q7SGN4gotxY5oo4OcBR3iUwmnu6vpEmsdN9Jns0hjkCRKv3D3ZFpuWN6sd2OU3DKemS8 zCls2sbBvEI5lHQ0xIKU7dt0e5OuJGR76/P3GQScz5zgpRPKefusWwWqXPrYk5nnXiyW qrhQ== X-Gm-Message-State: AOJu0YxJD2R3gsIXmu4IWMxjQ5Ny71EuQAZc/pyR7+7DATMvuY1zWQ8p 0RyCzNhvYA8jVoWQw+F5B+9RwgTcv2O9gmqIHoAZgIrj+TM2DfauAYcOGGEp333392dQlfBQ6mj 7 X-Received: by 2002:adf:e392:0:b0:33d:746b:f360 with SMTP id e18-20020adfe392000000b0033d746bf360mr939268wrm.51.1710829771832; Mon, 18 Mar 2024 23:29:31 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id bw28-20020a0560001f9c00b003418364032asm1933168wrb.112.2024.03.18.23.29.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 6/8] target/microblaze: Rename helper.c -> sys_helper.c Date: Tue, 19 Mar 2024 07:28:53 +0100 Message-ID: <20240319062855.8025-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org helper.c only contains system emulation helpers, rename it as sys_helper.c. Adapt meson and remove pointless #ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- target/microblaze/{helper.c => sys_helper.c} | 5 +---- target/microblaze/meson.build | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) rename target/microblaze/{helper.c => sys_helper.c} (99%) diff --git a/target/microblaze/helper.c b/target/microblaze/sys_helper.c similarity index 99% rename from target/microblaze/helper.c rename to target/microblaze/sys_helper.c index 3f410fc7b5..5180500354 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/sys_helper.c @@ -1,5 +1,5 @@ /* - * MicroBlaze helper routines. + * MicroBlaze system helper routines. * * Copyright (c) 2009 Edgar E. Iglesias * Copyright (c) 2009-2012 PetaLogix Qld Pty Ltd. @@ -24,7 +24,6 @@ #include "qemu/host-utils.h" #include "exec/log.h" -#ifndef CONFIG_USER_ONLY static bool mb_cpu_access_is_secure(MicroBlazeCPU *cpu, MMUAccessType access_type) { @@ -266,8 +265,6 @@ bool mb_cpu_exec_interrupt(CPUState *cs, int interrupt_request) return false; } -#endif /* !CONFIG_USER_ONLY */ - void mb_cpu_do_unaligned_access(CPUState *cs, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) diff --git a/target/microblaze/meson.build b/target/microblaze/meson.build index 3ed4fbb67a..013ea542be 100644 --- a/target/microblaze/meson.build +++ b/target/microblaze/meson.build @@ -5,7 +5,6 @@ microblaze_ss.add(gen) microblaze_ss.add(files( 'cpu.c', 'gdbstub.c', - 'helper.c', 'op_helper.c', 'translate.c', )) @@ -14,6 +13,7 @@ microblaze_system_ss = ss.source_set() microblaze_system_ss.add(files( 'mmu.c', 'machine.c', + 'sys_helper.c', )) target_arch += {'microblaze': microblaze_ss} From patchwork Tue Mar 19 06:28:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781070 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1777847wrs; Mon, 18 Mar 2024 23:30:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU9iKad/uPkoWirMB7m6YAOq+T8UxxBPC7aZtVcZUeEcr8DjdyibSbYbzv9ejJBN4BUKidojmzwYuQm5wKND4gK X-Google-Smtp-Source: AGHT+IFmTwuU8dcEIR5fzxTVr5Aa6BFouQyEcm+GN7bO3tZcF+lQc8nYW1wLqMlJa5/efpqxMeDw X-Received: by 2002:ae9:f443:0:b0:789:e512:2cc4 with SMTP id z3-20020ae9f443000000b00789e5122cc4mr12997890qkl.11.1710829830997; Mon, 18 Mar 2024 23:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829830; cv=none; d=google.com; s=arc-20160816; b=AH/og18D57SXFsDdY3d5LphfcE3AZKJSWuFkK+N7XRQ7PkowrmzjYoCPKTiCm8h7Wt V5md5Sl5ICmneAVMOSPv5EaZNYiAgZawP5asXjRW4teo3fmh7fgzo5dzEl/PBIi+9vQp y1JOKOzlmcJ3RU8E+EUp/uhCOJSAwyFcEbJ7Z4zl+wUz7C8NjibYOlTjpAB/xQeWzrsR xWWg7lAESjuqL/Ut4fmhpVL97MI4qnjrlUfo6uMDFeLYEGIiglaiHRLHr45T/YinX5Kr ib7B3pm6ui8+PmuWAiqiT6MLsKzmUqR3LIYoZFfL+sXgf8JTahLI50kmoNtD9A/j3gFO iHkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qcBm1WCPymqKaSwa7fzwzI3+ewkz+Zw4jwIqPMQqMRg=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=O8Cw5ydFvGOCrzTBa3ViMwuDu4LtyDeW8bJNZn8PONziOk910i+uxwrQdGaI+lhfqB Srgnp6LfRIuMftyLEzDE+mOiQzcXLmQ9HSbF3/Sxi8tvil9d2zpLI/gsCUpHLpE2/ZSc prayW1+MDiq4QzXWVnj6HuNp2+lcyNOAoZzbYUR7xmLga1ccoFqppQs+5wB6zPuah4aU 2jRFCxPA5M4wpKf0SOA2kLSOSVedtzBlJEPB2RVvY4m4yVW/9avMqgY1Q9UNPlBPaDC0 QpYWTr2NouNf1+artxztbjP3K0YXAGjMLeOwSiC/YjMvJSD79p+FDs7JP4uCrtQKIofs wXpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W7OcNObL; 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=pass (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 a10-20020a05620a066a00b00789f0f147d5si5791099qkh.497.2024.03.18.23.30.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:30:30 -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=pass header.i=@linaro.org header.s=google header.b=W7OcNObL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSyy-0006X0-SU; Tue, 19 Mar 2024 02:29:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSyw-0006Mp-TT for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:54 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSyh-0005gL-Ib for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:54 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-41461c256c4so5250535e9.0 for ; Mon, 18 Mar 2024 23:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829777; x=1711434577; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qcBm1WCPymqKaSwa7fzwzI3+ewkz+Zw4jwIqPMQqMRg=; b=W7OcNObLAT1qv5oSj4Lvp4rPID97WylZ1KXmKJOGcK21H13v9FkkMLH4gllWemOenr U1f9BKLEIAf7bO0gynpf/CsJH/tk7nf0CuNmSSi/3XLm1VZyGwmA+lrFQ4VkJpAK4IhG dJTkVKqNFE0O6lyXM1XJHCtSuBgtj1Sz30fTdxUQJU224hIGck4rHGFaIOpQHqKMJRmC 98MKHE4b3YF6EXi6ArKBv8wKsiD2ixOmNT/VZiGqDmgg43rPvnE/kdEZhmu81dXVjqFB 20DuOE5DshAsAJVBaEWeiQSbp9ksmK5341O9bqBfFIEkahJnoYGy5Bb/XWiCUXHlwX4z Gb/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829777; x=1711434577; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qcBm1WCPymqKaSwa7fzwzI3+ewkz+Zw4jwIqPMQqMRg=; b=W6Ih8otiw/ZUHW97AD8iH75W/Zt4RFtbBue+aCaeJtYEaq0sekRZJLHnD72Ci4S/VG 4wO6f21Gi1xUBmD+xysXIIP55H8yJCf4VSBW/52CFYqEjpqQ6ruPvoqJFDB+Ant68Xz0 TYMcGRiMM/AO0iSQn4ambWC9HXM6UXojWukB7oB3BPfqetcD8XyQ57mIU/C++ga47cMm Enq0GzQNQjV7FeDeHntOcHFyjsCxiHB3V98izQ5O5AXWAUeIvGJuJTCQwPs29igPiL2w swd8If0VmXyanPewolZwKYaYohXdvW4nNRNZiUGIYG9N9EUmnRVEitU7dKqD/XMtHTJZ iI4w== X-Gm-Message-State: AOJu0Yy4gxZF7VCTePEUFHBuTPyru/337ubFk7YmT8I7lg6r95I1Q7ig ur5Dehqbrzkw3FHav9gr1mcn5zJT7X+vhuSyXDPcAtKUdnKYs8AW3TflCcPbtZa1XjWSngWGKFF w X-Received: by 2002:a5d:4112:0:b0:33e:48f9:169d with SMTP id l18-20020a5d4112000000b0033e48f9169dmr944178wrp.31.1710829777460; Mon, 18 Mar 2024 23:29:37 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id y4-20020a5d4704000000b0033e7603987dsm11513647wrq.12.2024.03.18.23.29.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.1 7/8] target/microblaze: Move MMU helpers to sys_helper.c Date: Tue, 19 Mar 2024 07:28:54 +0100 Message-ID: <20240319062855.8025-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org MMU helpers are only used during system emulation, move them to sys_helper.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- target/microblaze/op_helper.c | 48 ---------------------------------- target/microblaze/sys_helper.c | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c index f6378030b7..45dbed4aaa 100644 --- a/target/microblaze/op_helper.c +++ b/target/microblaze/op_helper.c @@ -381,51 +381,3 @@ void helper_stackprot(CPUMBState *env, target_ulong addr) cpu_loop_exit_restore(cs, GETPC()); } } - -#if !defined(CONFIG_USER_ONLY) -/* Writes/reads to the MMU's special regs end up here. */ -uint32_t helper_mmu_read(CPUMBState *env, uint32_t ext, uint32_t rn) -{ - return mmu_read(env, ext, rn); -} - -void helper_mmu_write(CPUMBState *env, uint32_t ext, uint32_t rn, uint32_t v) -{ - mmu_write(env, ext, rn, v); -} - -void mb_cpu_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, - unsigned size, MMUAccessType access_type, - int mmu_idx, MemTxAttrs attrs, - MemTxResult response, uintptr_t retaddr) -{ - MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs); - CPUMBState *env = &cpu->env; - - qemu_log_mask(CPU_LOG_INT, "Transaction failed: vaddr 0x%" VADDR_PRIx - " physaddr 0x" HWADDR_FMT_plx " size %d access type %s\n", - addr, physaddr, size, - access_type == MMU_INST_FETCH ? "INST_FETCH" : - (access_type == MMU_DATA_LOAD ? "DATA_LOAD" : "DATA_STORE")); - - if (!(env->msr & MSR_EE)) { - return; - } - - if (access_type == MMU_INST_FETCH) { - if (!cpu->cfg.iopb_bus_exception) { - return; - } - env->esr = ESR_EC_INSN_BUS; - } else { - if (!cpu->cfg.dopb_bus_exception) { - return; - } - env->esr = ESR_EC_DATA_BUS; - } - - env->ear = addr; - cs->exception_index = EXCP_HW_EXCP; - cpu_loop_exit_restore(cs, retaddr); -} -#endif diff --git a/target/microblaze/sys_helper.c b/target/microblaze/sys_helper.c index 5180500354..7531f95ca7 100644 --- a/target/microblaze/sys_helper.c +++ b/target/microblaze/sys_helper.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/log.h" @@ -292,3 +293,49 @@ void mb_cpu_do_unaligned_access(CPUState *cs, vaddr addr, cs->exception_index = EXCP_HW_EXCP; cpu_loop_exit(cs); } + +/* Writes/reads to the MMU's special regs end up here. */ +uint32_t helper_mmu_read(CPUMBState *env, uint32_t ext, uint32_t rn) +{ + return mmu_read(env, ext, rn); +} + +void helper_mmu_write(CPUMBState *env, uint32_t ext, uint32_t rn, uint32_t v) +{ + mmu_write(env, ext, rn, v); +} + +void mb_cpu_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, + unsigned size, MMUAccessType access_type, + int mmu_idx, MemTxAttrs attrs, + MemTxResult response, uintptr_t retaddr) +{ + MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs); + CPUMBState *env = &cpu->env; + + qemu_log_mask(CPU_LOG_INT, "Transaction failed: vaddr 0x%" VADDR_PRIx + " physaddr 0x" HWADDR_FMT_plx " size %d access type %s\n", + addr, physaddr, size, + access_type == MMU_INST_FETCH ? "INST_FETCH" : + (access_type == MMU_DATA_LOAD ? "DATA_LOAD" : "DATA_STORE")); + + if (!(env->msr & MSR_EE)) { + return; + } + + if (access_type == MMU_INST_FETCH) { + if (!cpu->cfg.iopb_bus_exception) { + return; + } + env->esr = ESR_EC_INSN_BUS; + } else { + if (!cpu->cfg.dopb_bus_exception) { + return; + } + env->esr = ESR_EC_DATA_BUS; + } + + env->ear = addr; + cs->exception_index = EXCP_HW_EXCP; + cpu_loop_exit_restore(cs, retaddr); +} From patchwork Tue Mar 19 06:28:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 781072 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1778089wrs; Mon, 18 Mar 2024 23:31:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWnXOz9vFXPOd67CcGLyizocqshvhLhCxXvVcNtMJiBKlQDtUsCBV5OijldPLVYeL/mcZavWwtC4d2XKLHc0fUX X-Google-Smtp-Source: AGHT+IHf07Wub225Cu5jSDKa5pzeRr4hs7ap0+kVEyoBe1eCtCGR4vqXWepucgu0hdUtVdUnrpGM X-Received: by 2002:a05:6830:4406:b0:6e5:2f53:3965 with SMTP id q6-20020a056830440600b006e52f533965mr12848942otv.26.1710829870935; Mon, 18 Mar 2024 23:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710829870; cv=none; d=google.com; s=arc-20160816; b=abu/fophBFUIlf8iLgQbh24KwkCCOeA1GlOP8dU1LvCkTAlcDNOix/P86k/KGSAy7j gVAuWSGqhen8Pd/3D59CFumxMhOz2Q47itsBvrqQErevf1rpH/z7gbRA/55utzzICMVW 9MURsErBZ3VN1pWt6chrZH9MdTuwgfBgVymwEjNceAb0M72J47nfQS8Auym6Jg4csEUE NXo1jPir8gJkqEC+j7gtVVO6V8We7X0jIXEFa9Ag+3nngCXEJ08aPomAJz5afFhHENhL E4bc/2NS/cy8qOvuFP446+Ayj50Ze+7DRfo/kjnI/RO5Gk6XC0WfFgYZM15JrJEJZixl AzRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ioEuKggDYI9Ff6Tz/WlVRONFn4WVhfyxodNulYLHoYg=; fh=gePD3z8dMUYjJ8/ZZTN9tznSOiGIRTnAzPrBTUj0xb0=; b=e3SrYTiVXuWQhY4x/6rHYQeCjBl9FS4mavrYk8JS23oZYFYDwuXc6NRDs1pcSYUcP3 8LoPbRIktaat2+0vKsyuJNmq9WFo3pTYRkJe9TRW6ORdGxi2Lvs3W3wKayPfjoLTxMP3 99evPPK3+G0THJtc4wYQB83CuvViLkuILsz3HBzk0jgVBOpXksvrOzrL3rDjB2dT5bs8 ZJ4XDYol6fpLIupbTVmLIpqDnwd6DERdDIwtuiFMTI+VXDcGE3nOVA3lQKzr95S+jYah 6BDBhvx1QY+fPVZnkXup56Eu+YCNxpWm8CHM3m8bOyMrVN/pIPXCKCyPJ3JQUyRDn/kw U5WQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u4b51JvO; 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=pass (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 wj2-20020a05620a574200b00789f4dde9c3si5304561qkn.94.2024.03.18.23.31.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 23:31:10 -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=pass header.i=@linaro.org header.s=google header.b=u4b51JvO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmSyq-00068l-Oo; Tue, 19 Mar 2024 02:29:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmSyp-00064e-KI for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:47 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmSym-0005ge-S2 for qemu-devel@nongnu.org; Tue, 19 Mar 2024 02:29:47 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-41409fd8b6bso18479615e9.1 for ; Mon, 18 Mar 2024 23:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710829783; x=1711434583; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ioEuKggDYI9Ff6Tz/WlVRONFn4WVhfyxodNulYLHoYg=; b=u4b51JvOpgJlLelLd4XOlSrmP5nBL1RaoQru3+FWnFkSrEJvPe1qqeiK877AmBaGxk +qpzfx3ftWuy7XKPLjPN8sIJvbLl6sZKIT9fuaWw2UmdajIla13XyAdhzGiMbz/n8MoM pF6vhIbO7cviT3aHqy+5ttrKzXsxk12cRkPCIcv3oBHTcPjujtphZwvG7Txeb1lvxu42 QJN/LvnkVSP8XZD9lqkZ+Vgz3FLJPdPeMxeubhLJAgorrc1hlO4UnmVP1TZfzgs61cJR 1lmRp3z5Jg5p4QHUcPvMUecFAR/7Gy3efrhTK2cPIY/q73y/0GhDEfCI2PH+D2nt3w99 b4sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710829783; x=1711434583; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ioEuKggDYI9Ff6Tz/WlVRONFn4WVhfyxodNulYLHoYg=; b=rlCb94kcSs6/WIE3sU4VdasBtT0HOjV0lZAmN/fTlXs4lsg0YYs6pFyArpvTNoAv1+ i2w1UT1UYR0pecrKWzuYKIiOJ5PY/GjPf5aLmchOkgyHeAYmy1qEdcZSUMa8tZj4zT61 n/FZ1cHbUnYnINhVRBar6Kx2TPfs6Cl6OCbM22Mha+J8xrYyEL/IsaQOyycylo7ugSO3 PpqlnSa9NfnoOhEqosDlrfBrLXddo34T5jJhnr5SbKyRcCORt8zy4yPoumAkw7SoCq4a msChcOlbAGQ3svNkCF36yDYiPnK1jd37QX7Kaz59YRWlPk61beKtMOEGi5pGfKudlST1 fpTA== X-Gm-Message-State: AOJu0Yze7Bzg0uVEASc19zAV3WJ+PovdY8IkRYz/ImZDteKh21IgqflB ro+K1tqd4hMORFh5jceRdnGpzz3/TlAvT/ouZLJ0IRLy7z70dGWjx406xpOkh+ICGLPOAy7zJRw O X-Received: by 2002:a5d:6803:0:b0:33d:fb3:9021 with SMTP id w3-20020a5d6803000000b0033d0fb39021mr8936257wru.54.1710829783095; Mon, 18 Mar 2024 23:29:43 -0700 (PDT) Received: from m1x-phil.lan ([176.176.166.129]) by smtp.gmail.com with ESMTPSA id f1-20020a5d4dc1000000b0033e99b7cfa8sm6353382wru.13.2024.03.18.23.29.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 23:29:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , "Edgar E. Iglesias" , Laurent Vivier , Anton Johansson , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [RFC PATCH-for-9.1 8/8] target/microblaze: Widen $ear to 64-bit Date: Tue, 19 Mar 2024 07:28:55 +0100 Message-ID: <20240319062855.8025-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240319062855.8025-1-philmd@linaro.org> References: <20240319062855.8025-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The Exception Address Register is 64-bit wide. User emulation only access the 32 lower bits. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Edgar E. Iglesias --- target/microblaze/cpu.h | 2 +- linux-user/elfload.c | 2 +- target/microblaze/gdbstub.c | 2 +- target/microblaze/translate.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index c3e2aba0ec..a9f93b37b7 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -251,7 +251,7 @@ struct CPUArchState { uint32_t pc; uint32_t msr; /* All bits of MSR except MSR[C] and MSR[CC] */ uint32_t msr_c; /* MSR[C], in low bit; other bits must be 0 */ - target_ulong ear; + uint64_t ear; uint32_t esr; uint32_t fsr; uint32_t btr; diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 60cf55b36c..4612aef95a 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1498,7 +1498,7 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUMBState *env (*regs)[pos++] = tswapreg(env->pc); (*regs)[pos++] = tswapreg(mb_cpu_read_msr(env)); (*regs)[pos++] = 0; - (*regs)[pos++] = tswapreg(env->ear); + (*regs)[pos++] = tswapreg((uint32_t)env->ear); (*regs)[pos++] = 0; (*regs)[pos++] = tswapreg(env->esr); } diff --git a/target/microblaze/gdbstub.c b/target/microblaze/gdbstub.c index 09d74e164d..147d20c3e4 100644 --- a/target/microblaze/gdbstub.c +++ b/target/microblaze/gdbstub.c @@ -63,7 +63,7 @@ int mb_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) val = mb_cpu_read_msr(env); break; case GDB_EAR: - val = env->ear; + val = (uint32_t)env->ear; break; case GDB_ESR: val = env->esr; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 493850c544..19b180501f 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1835,7 +1835,7 @@ void mb_cpu_dump_state(CPUState *cs, FILE *f, int flags) } qemu_fprintf(f, "\nesr=0x%04x fsr=0x%02x btr=0x%08x edr=0x%x\n" - "ear=0x" TARGET_FMT_lx " slr=0x%x shr=0x%x\n", + "ear=0x%" PRIx64 " slr=0x%x shr=0x%x\n", env->esr, env->fsr, env->btr, env->edr, env->ear, env->slr, env->shr);