From patchwork Mon Dec 16 22:11: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: 181827 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4947788ile; Mon, 16 Dec 2019 14:32:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxv/QUungzCg25ZpPTkKemQxn1wXaqLFM50m6eEM7jR44F7Y8GabL9Ph6ORH4u9c/F/G5wF X-Received: by 2002:a05:6830:10f:: with SMTP id i15mr34750567otp.199.1576535578423; Mon, 16 Dec 2019 14:32:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535578; cv=none; d=google.com; s=arc-20160816; b=ETbpxrtD2z6tc1qb9B6UbZjpv/UWs8S+8mD6StBZk5KbdnViLJUjRD2IsdRI9JXisT 0vzl5fSUjV/do/rJQmjRhyZCji/bS2oFb8xiqYPGzYnMMsqDAREWVjd6PbRrUEjpNx84 SA2sfd1qL3fTq6xdTnV4/wmN0angep3SPBzG0KVr0ukQOfNZGJ7xKVZMIfCDenR3Cop/ LWowxMgsE7LDZuLRpr+91WxREPefka3DYp2p/XbpSFeA7psh5UfJYlV+Jgy1/fgcpZeJ gDvY9X+qDMqHy0SipZnMd5nw9Tp6NTmZolq0X7sYguoKRP+Cgtg8+1aHAt4NrAL+nTRB Ev9Q== 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=DPDM5gwX8Fn+IwrqOpQTWcLHE7dPxmxG57n6nMl0zxo=; b=Z6l3JI4C0te+aBVNemR65WSF6i6jAcQw32itTA/3krjmDx/idtYgm1qCfN81/2ByUc i8T9fPzyR4aaNshhqWFv8miE3+YH9u6Gg4iFSbB/xctBiFX3F1CTtDz46i7m4bC+w6NU Qn1G3NnlBNY2xGNZ+oquZsUsIXCo0q/sKa6UT/KsDtCeTMWp7BpGJi7pR/Jsei/7Gm4k 6HrHPrBkSQAkVa3shsF81Z1IMR/GtZ5TTFfxIe+pFwYrKOJZ3xfECTGbSgWLLxHZHPMK CR8LAwMxkqs+K/ndJEoi8Y5v34yQtRYyZ4pqNiklYOgHkDDvAifYIGRRVeTns8GDW9X6 MiAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UN7Bwu6+; 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 p16si10609952oto.287.2019.12.16.14.32.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:32:58 -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=UN7Bwu6+; 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]:32826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyvB-0005Kk-Pi for patch@linaro.org; Mon, 16 Dec 2019 17:32:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37148) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybb-0005ir-Pl for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyba-0007ma-Mo for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:43 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:42434) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyba-0007mQ-HL for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:42 -0500 Received: by mail-pg1-x541.google.com with SMTP id s64so4488991pgb.9 for ; Mon, 16 Dec 2019 14:12:42 -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=DPDM5gwX8Fn+IwrqOpQTWcLHE7dPxmxG57n6nMl0zxo=; b=UN7Bwu6+vOzTHBL6i9nPiI8ZiDgfElJLwM8FCB7zZWSEOagzuNJmZfuexqMfRBdd4I EwG1TXovlLiTAhK+gAU7fRxPJXmxvdbR1cEGzm0FV9yl7n2vplZL6wHWeOU/h1Mch96d ZfsQlJJdx/Q7mO9lWo5KseNk5WgRllfRI6XH7GVzGf+F53ohbdCXYUuzmB3bh6P1+aTS o5aKHLKbHXeAIxKXxDJXxiVeKAO9JBk1YeGJJmFbrPP+89EcGwFfo8vhuPkQnV+b8GgO kOdkCaZJ1ZVqhGw9WS9udTsoZsXw6sGqo+PkmndXRiwEsTRmrbX6ScOt/7EjRL4XHYWR cCQw== 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=DPDM5gwX8Fn+IwrqOpQTWcLHE7dPxmxG57n6nMl0zxo=; b=khcr6lyFvf+MKbJibmmnV0iLLooVvafQjHMFbh1CAobUAZR+j3UWXn5E89O+1t0IJB V0Nzk7TwCiM6jWzVhYUMSXkM8RLxVgbKwO4BwjolSZr/NDo9ClIlxZ6zMMAnsV/ssD8m IQrQVLhuAI6N4oAj8+tesOf8C1sTMMz39RIcS9C/hBbTqJH7ZjAPVCreW2Hy0Z8+TwbD I5uzIbszWPyjAQAGGf+NNKtKoV7V3mE9DOlgA6g4UqJrpDbdm9kqeWqPH0PD44RTYe3+ ctJ1qaDyYJ2OYJngwk4GPxqQAFqi+Chu4Jxz1x6NcS4xs6f81EwLYVLKVGj4Iz20MotT +6+w== X-Gm-Message-State: APjAAAVkioW3vemS3g5kCENvRyBDPNwQQIooIXYM+CAYjPiophpP2Wcp P0eNAlbeDNbFvG0GBxpr+4wxL0IjL7A= X-Received: by 2002:aa7:850c:: with SMTP id v12mr18697255pfn.188.1576534361333; Mon, 16 Dec 2019 14:12:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 26/28] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX Date: Mon, 16 Dec 2019 12:11:56 -1000 Message-Id: <20191216221158.29572-27-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::541 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. Acked-by: 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 Reviewed-by: Alex Bennée 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 }