From patchwork Mon Dec 16 22:11:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181799 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4925850ile; Mon, 16 Dec 2019 14:12:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyqsON26t/YnC5gwRdrmz3GbAyxIx4S5gscQo+AE62liX8/zXat6cqFl6FIF8z12lfOxAbK X-Received: by 2002:a05:6830:160c:: with SMTP id g12mr33343519otr.82.1576534341608; Mon, 16 Dec 2019 14:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534341; cv=none; d=google.com; s=arc-20160816; b=E3dhX89kUeHs302kEYKpQVtVj/m+z8c6xRr7wvrcYQxOQtpXSSFgkLV0ToCACWMQbs GVbvItibeGKlBRfidTKLJg8HXPTmLCsNz75b+Aowzl6mI00anavF68P+VQ+nblfiTiVe k69Gn8zJfuEho/11d36vI8ubXWXMj7kj7XTjgxLH3GD33UG/1JMLA7ekdn7PDdxhR/r3 Jqx7sRrAvi4Umx7mv+ode9Pmg1MSuKot2nRLIyFwYTNj0onuzytpuPFbLobMLOXmOjQl rouFJVR5a1voGrlsbaRfcFnWQCC79Yt+hKXlR9YbDBvvgR0PNmjPGDXUmBfO93icW91j V8Mw== 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=mkGQo9JLGR6e+tkSUmklU8FYrD77VgZJcPg0K42unB0=; b=LpJ9+IbGg1uqD2BM9Obd/Qp2AKiTW4Ek8jcIy4Y8FAZlep6Ilh2GVllNinqi/6zHP2 ohgzs/zQVlKbmm0JrM5dHlDOb6inEsRKZ0hj4yBIzxP6dh1TlNQuZycG7r2QuK8ujL8x pAeoUz+JOIsIAEgtp9miAyI8yRZcGl+L9eLoG2wggSNupD9djrMhMAbTUTbzn4UR6qkh 35FkL2JExq4d7nya1XUvcQsYLjoe8A+Uyzg6tgv4gR1u3zUlN3xOb+6Dam670qzSrsqg lf97L3NEk+Tie7ftD53lIj+A59UTD9WPVMyAxNDFE4u63/q3VJQGpoS+zK3r70M75s99 XNUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZBNnvLPc; 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 b20si11001384otl.159.2019.12.16.14.12.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:12:21 -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=ZBNnvLPc; 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]:60446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybE-0004lF-FD for patch@linaro.org; Mon, 16 Dec 2019 17:12:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36573) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyb0-0004l7-84 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyaz-0006ux-56 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:05 -0500 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:33246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyaz-0006uM-09 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:05 -0500 Received: by mail-pf1-x442.google.com with SMTP id y206so6391479pfb.0 for ; Mon, 16 Dec 2019 14:12:04 -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=mkGQo9JLGR6e+tkSUmklU8FYrD77VgZJcPg0K42unB0=; b=ZBNnvLPc3i/1x2D21xmEqk2Y0xOIwQ3QoZVxwjkpg6uHJmNsz6ogUhm5qgovjNao2Q DuUDp++WaI7lviLQ7EfApsaKyDjkR/9Ssvs40eXPUaRBALOWQI1KkGr8EZjf7QoqwYUz TJNEv0ZONze7XUVmIY3qRh9Nw1DL3VICtzJ370oWEO+Fo0BOs6If7GvWJK5fH+UuD9BG CcVoiRtge2De1DpEdINLVi5b7gByoJAUWniEjAJH437teDQ/dp0Xqswxm1SZ+4Tj2nCe mA1BNr8RLamBHLnBLPy6JGb6slR30DjJqibQJ2u4CKpwEEjp5RHY9qoY7Cqlw5DrxZ5P 8krg== 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=mkGQo9JLGR6e+tkSUmklU8FYrD77VgZJcPg0K42unB0=; b=DPZYeW1wq1zfr48iOT5qWbgMgMzVGeU7zo6cleBRhJNsqdmA88GkoOYQ9+J8Gkg+KE yL4ndgTPy8XVNmdfQJY+9G/H9rZ3iKjw3aRKy08koyo5xCiPSMMyInP1Qs2VY8enbpbP O0GzNpeDw5ocOxmIbId1/j5unEl7UyIAUHbquNGRKyDNORdyflwWIbFoTb+UBorH72Ht RF48yGq9MPYjtZJXO0WClna6p3hUpRirruIJ7rSet9s9EvG+a9Hl+ELaZbKrMrCVBUA5 ni0vWTJ3y8xm7jllqxfXpPdfFa9L0HUCbVAojYbdNzJx+yxvxG24PVxV8AcYA02p7uv8 UvXQ== X-Gm-Message-State: APjAAAURLRWOkgKru1a430DAXgumkSC6ykKa9BvXbhVjPqIdLt1Fflv9 0tL7PJhVQBqY+3Ee/f5kwfkiNpnrQXg= X-Received: by 2002:aa7:8a88:: with SMTP id a8mr18783531pfc.224.1576534323719; Mon, 16 Dec 2019 14:12:03 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 01/28] target/xtensa: Use probe_access for itlb_hit_test Date: Mon, 16 Dec 2019 12:11:31 -1000 Message-Id: <20191216221158.29572-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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::442 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. Acked-by: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/mmu_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée 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)