From patchwork Thu Dec 12 04:00:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181411 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp388045ile; Wed, 11 Dec 2019 20:03:37 -0800 (PST) X-Google-Smtp-Source: APXvYqxA12pnvOwDuXZmWzoqIIdioBcW/XiqFY5XOPxZ10ZLLqv5Nk8sT86OinZaNgldjf+42ERQ X-Received: by 2002:a05:620a:8d7:: with SMTP id z23mr5884855qkz.15.1576123417055; Wed, 11 Dec 2019 20:03:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576123417; cv=none; d=google.com; s=arc-20160816; b=p4TFxvSbbfhYGny2cgr9yMsGtVmXY6vlEuLK38G+Pr8z7H529bJhDI7zjj5JaPdTmQ lcU5Mewb8hHJuFfaSEjtNktYQ0a3qoeJsDkizUqPjbwHy7P9CvAAEs5R3ZjBd9fOzZmK MGZYev+1esV3VII6vy7dMW8v+9xmxqO86e2PRuo5hgWHjgb4WHOGbtoEf25XhSVVI3OF yfMQfwEOcrQ3BT5EuN8CQED1Qbm/VQpQdvRkYQIHlqs++73krEBGU8OKgS/32upSioLP N4o/RmxjvlvbPwpgpBUsC+fFi9VeVGmEnQT+oocnLtf1r2gvz4nzgbG8jkENrxO6x+Hz lHlA== 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=k7TVKqC6wpnG6/oe5COCiVkS66yxk1gF0iSSBffTaF8=; b=I0SpZDl/ok3n8mAyZ1vmOgNA4x8grniaKBG4LSC9Jv1Bi0G2eQcmB5UGc67c+Ens0A Z24wu6ydarZFgl6T5nvJU7G90b1+0Z1myiNmqaba4Zx0bXnmVU40BY+BIlpGQre45C7u wdHXD7N4htZgLm5EYdL4ZxyRcpBhP/MWFAEU86xRT7X6RSsnQOPrxREVVypwtgr0sy7V AQZYeJp7p0uw/fOM2jkft09ScZd4TgMUJ91OwlCxdOVvJMJqUCshWGRUO0avq3zLYwfp bSCtNdjHruIGGL1tI9qHIPGtuDiZu5s7NAndO2bfESJKHVVT+q/U32/ALxuia7JeTqOy +uSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D9ifO4x8; 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 l63si2100468qkb.57.2019.12.11.20.03.36 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Dec 2019 20:03:37 -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=D9ifO4x8; 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]:53876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifFhQ-00047q-7z for patch@linaro.org; Wed, 11 Dec 2019 23:03:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47098) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifFef-0000mS-Hf for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:00:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifFee-0003qQ-5X for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:00:45 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:41156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifFed-0003oo-V5 for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:00:44 -0500 Received: by mail-pf1-x443.google.com with SMTP id s18so28492pfd.8 for ; Wed, 11 Dec 2019 20:00:43 -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=k7TVKqC6wpnG6/oe5COCiVkS66yxk1gF0iSSBffTaF8=; b=D9ifO4x8Xh5HI25dUv+e8Tai+TGpxXXG8oTF+hw+0uAvkV8339NGkCvhlnrmwB7+uz dsKQknGzebL//SWhY/XHBrG+0i3oP+RfelBJdxMrQQ6sXpgLxGZtYvHtFVPF904Tn2sN kog5EAb4Z4SzmJzulxyVlSZobBfaueiYwDxo0MQ+UME2ZzE0V/3nHICNpVmOYkW/lQOx qZQ006BJvdBo1jmupk3GV5X30vcXt1ZJuGEUJrU8WdTgnFqqBjXHhv+XQG0E0ls9mg7/ 5seGp49L8aeKUG6X85Uuel+U2ij7bXL/7HxaDyUdUWFBzelhQ3ZbMCmNXhNsNeGJ2Y1D +xeg== 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=k7TVKqC6wpnG6/oe5COCiVkS66yxk1gF0iSSBffTaF8=; b=hvnPyb7eTMibu5vwREh1vIWkDeZB8eaPCc+V1UUwOuYnXAPmjGatGOH/0MrJZtn+3w gr8P4CwmVfCweResho7UCccowOFbl77jzzTgZBBbfrl+HN41dGRwMe0d1kErcwWYo/vf mGPt5BvOEJbx5VRoQ57ahlWsmYZ4vKNqpqDSYObSF7xDqQyfrZH9Gd8wcPHi5vjQfOw6 MYymlN9um3HbhOyddrmxdw83VTsJSIWQzBN5QKf8lYDgISqP2H6OyF5TP7a4FLbZmTV0 YWJWG/YYazrUgtaYsvumcZuGvqwJSvj8v6zIKt2fMjF0m7PQg82L7tjG2dTmTMW2bLIp SW8Q== X-Gm-Message-State: APjAAAVsl3po1p0GKLwhYwhXiViEuRawBc/3A6CSh9a8c4sESO1q0BM3 t8gN7O3C7nw/aRmcWLXdq6WZpqqSmHU= X-Received: by 2002:a62:33c6:: with SMTP id z189mr7684937pfz.246.1576123242515; Wed, 11 Dec 2019 20:00:42 -0800 (PST) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id z130sm4666391pgz.6.2019.12.11.20.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 20:00:41 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 01/28] target/xtensa: Use probe_access for itlb_hit_test Date: Wed, 11 Dec 2019 20:00:12 -0800 Message-Id: <20191212040039.26546-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191212040039.26546-1-richard.henderson@linaro.org> References: <20191212040039.26546-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Received-From: 2607:f8b0:4864:20::443 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 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. Cc: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/mmu_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 Acked-by: Max Filippov 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)