From patchwork Sat Dec 28 23:10:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 182503 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp4641089ild; Sat, 28 Dec 2019 15:14:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyphc2rvL1iUici/WQwUXdmGHvtJ2Gnb1z7aVBVbWyL6bjJh+E9T7Fva9X7xJSGk0XYgo2m X-Received: by 2002:a37:e317:: with SMTP id y23mr48893064qki.431.1577574855718; Sat, 28 Dec 2019 15:14:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577574855; cv=none; d=google.com; s=arc-20160816; b=zqIlpNdQaf32atTPdV4cfB1y8Phix/XRSZhvxw2LUiIb4rsuVSqcJ6Wq1CbNSsry0G +165gaBPj//sUzKzHxyIGCoy60s7vgV+O+0LNMFibtWnSvLitdFcDr11we0TQILnoqCr Qfpd4DTNiRU1t3tTdkWOuruZkEB4iCWmzxBYncgrNFLxwU8478BnA6VDtdfxajTnxxw3 qChNjLbp3ccDDXCHtUlc6lYU5it/2wFZgE4xmSPboOA+9nu+IZiYfS64gmJIa2bXDubT KdN6qCKKqdjzs0vR1XQzPDvbP6hxTGNKWS8HuC3Po//ZAiX/BUmnqDypb6R3Ypv3xCrN de3g== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=TefutcrMB9pareM/zxzC1lVLnwDD302zB/fR5vwwqMc=; b=aD2ko0b5HZLPZ9vvxHTyXx08L1Z1wRP7XydD7vLnd4v2yKTpjn/9pywSUEUO7Ta6tp 2gnuUqo6vsSJxj5bKoqN6m1VGZrjCx/ovx6Gcb7A1g6pIrV+6AnHWy0v2fsJI6Vww9b7 lsm+aDbaMpajA1ghu22itVab8UHV7XBZnku7EEnYCErvIv4hp9o2/++1t3oPImFweo17 r7+gCKujJ6fgQPjvnzpuDOjMDeSO9TUxVZ2W3d/+IK6TtXTU1MoFPUlG4Js1eCqBF3mQ mG0eICfUMxugdURfA5/OX+BE8oAu/ga7RM3QuSjqXINkVb0Qgk3OjsepbgekSMdO3Ozb NMOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=He482V05; 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 s34si16330958qtk.212.2019.12.28.15.14.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Dec 2019 15:14:15 -0800 (PST) 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=He482V05; 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]:47212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilLHi-0007NO-PK for patch@linaro.org; Sat, 28 Dec 2019 18:14:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38769) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilLFF-0004Dp-5r for qemu-devel@nongnu.org; Sat, 28 Dec 2019 18:11:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilLFE-0003Ss-7S for qemu-devel@nongnu.org; Sat, 28 Dec 2019 18:11:41 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:38320) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilLFE-0003OF-0Y for qemu-devel@nongnu.org; Sat, 28 Dec 2019 18:11:40 -0500 Received: by mail-pg1-x543.google.com with SMTP id a33so16263925pgm.5 for ; Sat, 28 Dec 2019 15:11:39 -0800 (PST) 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=TefutcrMB9pareM/zxzC1lVLnwDD302zB/fR5vwwqMc=; b=He482V05R9k0rygoGIICBNAFswxjxmfOc5nE59djzdhF6Psht9FBYdiKs0jxPfY7cz LMemqN1E8Kd1h1DjHwz/FLWnSNMep9IOK4R7Kch1VljgCRd9O6yEIOqkqbhAajGMWLG4 5mOqLejmNEVqzYpyJKqQf3iNj9d0aKw8IkFGMP4sp68W+B4VEZQRviGaDxRAaw9qLd4o 2a/kvouCtWeYBcLmQfiGrjm21xAtmGr3Cgd+CcdbaveaEBYQ+VwiTKaT7RUwbVEd9tp4 HrM7BY3YUGUIQLFK9uyaLlNhCMBjIYnCZSO4SwCestiJ100OXAkaSxws6DvYeU+BW5D0 OjtQ== 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=TefutcrMB9pareM/zxzC1lVLnwDD302zB/fR5vwwqMc=; b=JaOnFoi6MBKBPQAcgzbuTy/V7LASqPtDALq1/33yOEfe9kYWDX4yGnKsdSbtjL/GZl RPXsHLZHpr99kIPlAwlMFQe7hmBWmyGDWu9jAwGKA+F6G3Dpe0zaSH/XuUoWoWnFfXNW 6nMm8iavOJIY7s50wQsy1r7oISwezSJ1/6ZsDitacNyLcKNAsoqK3TElBd4EPycDMvh+ KYI0nCkbj4cPUdKTE5d8RAw1x7xjVPqMjMs9LJzViSfd3XdxSWOdlFpbwENQxx2Cz3q1 AbRk4Rc6wVxxmWaVfOSUivvgspjaMiHkl9FyXSsKW+/GgwbvWQblB+JJA/Oh94hDuTnY J7tQ== X-Gm-Message-State: APjAAAUvig8RF92sdeCfZgibPOcHonBgQNuA6HlcwTYz0cmciyZbpxwA 4x9zemJMuITsCbfCiIOiIyvU+b0Gqbk= X-Received: by 2002:a63:4f5c:: with SMTP id p28mr61537504pgl.409.1577574698647; Sat, 28 Dec 2019 15:11:38 -0800 (PST) Received: from localhost.localdomain (194-223-58-9.tpgi.com.au. [194.223.58.9]) by smtp.gmail.com with ESMTPSA id c18sm21077186pfr.40.2019.12.28.15.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2019 15:11:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 01/29] target/xtensa: Use probe_access for itlb_hit_test Date: Sun, 29 Dec 2019 10:10:56 +1100 Message-Id: <20191228231124.18307-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191228231124.18307-1-richard.henderson@linaro.org> References: <20191228231124.18307-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::543 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: Max Filippov , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We don't actually need the result of the read, only to probe that the memory mapping exists. This is exactly what probe_access does. This is also the only user of any cpu_ld*_code_ra function. Removing this allows the interface to be removed shortly. Acked-by: Max Filippov Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/xtensa/mmu_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index f15bff306f..b01ff9399a 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -63,10 +63,11 @@ void HELPER(itlb_hit_test)(CPUXtensaState *env, uint32_t vaddr) { /* - * Attempt the memory load; we don't care about the result but + * Probe the memory; we don't care about the result but * only the side-effects (ie any MMU or other exception) */ - cpu_ldub_code_ra(env, vaddr, GETPC()); + probe_access(env, vaddr, 1, MMU_INST_FETCH, + cpu_mmu_index(env, true), GETPC()); } void HELPER(wsr_rasid)(CPUXtensaState *env, uint32_t v)