From patchwork Thu Dec 12 04:00:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181438 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp397621ile; Wed, 11 Dec 2019 20:16:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzZD4isSikVE+vu/3I2Hw8NLuWwTnUGADNwtI6TPJm7OiUevcOefHDHCTLkXvWmc7hJwWzG X-Received: by 2002:ae9:dc82:: with SMTP id q124mr6550258qkf.20.1576124189384; Wed, 11 Dec 2019 20:16:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576124189; cv=none; d=google.com; s=arc-20160816; b=Ve+Pq821DwDeWDGX6megCd6+0RvTHkv8Ia4371pjtBhz2mkrlWMiLaUItFV0eFcEqE CyJVSwByF6Kn3hpivSgeEUcrlLwG1XHDFbamNrAQtToewBmmYMo4vncFOPwCCAbszZcJ S+AAsVrfE1/qORZFg+qgnDWXRXZcnHLthZSE7b7q1omgztaBnJbbKTY8z6KhPu3iOUtN xzcMD5BAe7m9a6EsnZmvFdV+VMq+9g9xcbnzB4dPOr4WOOyyMjbBDsjwO0aPUWhOP+DS D94gwwmiylch9d6hASofKQF0dpkOpAHdiQ4imcWkoq1mOU6+5DKuU1Eq/R/PCl+fqFaG ii/A== 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=JWpl4dTJywBw8dk4WBNibniYDIKR8WNVBGRxmrDjrqI=; b=mtxOWboZwgxenRr4nbnzwe3BQp0HanmLHZnMUSSqJX2HSWVlWFC9xSJl2sOXwr5WqU TfHuJRy0ev5GToX6h8z1PsUJ0+NQddZxdzRg3nHArRej5P2+ImSxegeHkIq4DgXyh39F v74yBpUYDzxd5Hdu8LGb7ZeiW2o2C1A9VdmAwrT3sS6Pw0ddRzNXk23E8y1kVdkAG8sT kSQVICtgD/inxn2aRwRRehMwhRPSH9YrqpkHZYuJ9riRBFQOor2uI3tSHw0vXHO3omSF Bm2h9qqnMzZu/tibemTALBVKy+uAbvaWTT0hTLJmTCC7XNmmDITEoqz8mvoq41xj+N37 39YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lKAF37rD; 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 u7si2199611qtv.353.2019.12.11.20.16.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Dec 2019 20:16:29 -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=lKAF37rD; 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]:54158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifFts-0004Ir-3i for patch@linaro.org; Wed, 11 Dec 2019 23:16:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50938) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifFfB-00016n-Ad for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:01:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifFfA-0004XO-04 for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:01:17 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:42167) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifFf9-0004Vw-QA for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:01:15 -0500 Received: by mail-pl1-x642.google.com with SMTP id x13so443510plr.9 for ; Wed, 11 Dec 2019 20:01:15 -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=JWpl4dTJywBw8dk4WBNibniYDIKR8WNVBGRxmrDjrqI=; b=lKAF37rDeJwPJJzCVjRsrmVOwoq2hL4644wwI/qCwCYqryAMD88LiuofJSjSc2wbx1 L+ali8Cl+rvvOXZDCOdY2yqCQwz01B6uLU6X3f2//gZhf/ndHjU4zyBjcCkiPiNkrz4C i6SgCednOhD+cK05Y/08UsbAHvzN7FqQGmwnI64I23E7UxI7Px7nBzW5CeaqKa6LN0+K mLIRH31VOO4pc+BYw5g9MK0XRljkZ/O/cj2IEFwtsA+DLZe7whzvtL6Bcz5XQDifTcM9 PPiGZyV6to7o1o0M6x1wOgJLrlX9CTq+sbkGn2uidWNJUzHHBs/vjMTfaWgPwMOrlbxv tJHw== 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=JWpl4dTJywBw8dk4WBNibniYDIKR8WNVBGRxmrDjrqI=; b=SRxpjtnjuW7+HliNEKHPNL83zFLEQ1a8DHJeW+hgAr0MoDOWiQnhUx+p/lQvg7AiR0 m1geQY7WpZM6xtxyyO3exiTwqiX6+7NcBb7nn/qJtphDWwDKQrfS1xCAPTcdg0ctbnjj 6wVZLrzn4JawNeQ4zA6A4Vg/UlIQz1cRg9djGmFwjuppPKtVgTgnYzIT35K7KOPvrFLA oNgIkCzZMeaKSvMmkNNf5srrer6wir3bu1hqhzFXO+pCIy4nQnrv5bxuqbUX66t60RBV traPPSh7KCaBI3uZ11CtXqmcRp4DYX4qz8EANUgSobEbfcrgIRHdZhIZbuOeD7N8iXCy dkfw== X-Gm-Message-State: APjAAAVm6hLQzw/h6FOcna6+zkQtn6IFt1OPSGcU4WdNhv9E9nh5bQCJ JYKMk8FnABwmYQFADAevzHEVH5ZQzc8= X-Received: by 2002:a17:90b:8cf:: with SMTP id ds15mr7663891pjb.134.1576123274493; Wed, 11 Dec 2019 20:01:14 -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.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 20:01:13 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 26/28] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX Date: Wed, 11 Dec 2019 20:00:37 -0800 Message-Id: <20191212040039.26546-27-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: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 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: David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There are only two uses. Within dcbz_common, the local variable mmu_idx already contains the epid computation, and we can avoid repeating it for the store. Within helper_icbiep, the usage is trivially expanded using PPC_TLB_EPID_LOAD. Cc: David Gibson Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 2 -- target/ppc/mem_helper.c | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) -- 2.20.1 Acked-by: David Gibson diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index e3e82327b7..3bd983adaa 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -951,8 +951,6 @@ struct ppc_radix_page_info { * + real/paged mode combinations. The other two modes are for * external PID load/store. */ -#define MMU_MODE8_SUFFIX _epl -#define MMU_MODE9_SUFFIX _eps #define PPC_TLB_EPID_LOAD 8 #define PPC_TLB_EPID_STORE 9 diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c index 1351b53f28..56855f2381 100644 --- a/target/ppc/mem_helper.c +++ b/target/ppc/mem_helper.c @@ -177,14 +177,7 @@ static void dcbz_common(CPUPPCState *env, target_ulong addr, } else { /* Slow path */ for (i = 0; i < dcbz_size; i += 8) { - if (epid) { -#if !defined(CONFIG_USER_ONLY) - /* Does not make sense on USER_ONLY config */ - cpu_stq_eps_ra(env, addr + i, 0, retaddr); -#endif - } else { - cpu_stq_data_ra(env, addr + i, 0, retaddr); - } + cpu_stq_mmuidx_ra(env, addr + i, 0, mmu_idx, retaddr); } } } @@ -216,7 +209,7 @@ void helper_icbiep(CPUPPCState *env, target_ulong addr) #if !defined(CONFIG_USER_ONLY) /* See comments above */ addr &= ~(env->dcache_line_size - 1); - cpu_ldl_epl_ra(env, addr, GETPC()); + cpu_ldl_mmuidx_ra(env, addr, PPC_TLB_EPID_LOAD, GETPC()); #endif }