From patchwork Sat Dec 28 23:11:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 182527 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp4655693ild; Sat, 28 Dec 2019 15:33:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxIrRlMvtFfpRBKAFfBXslq0zKuWmuzT24iFuazhOX5ZcIyNAHWs8vInD+wBzB+Ru6489nf X-Received: by 2002:a05:6214:1090:: with SMTP id o16mr46210741qvr.105.1577576021079; Sat, 28 Dec 2019 15:33:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577576021; cv=none; d=google.com; s=arc-20160816; b=VcHuVkI64c0qX43HSmmR15kQPY1DSt/QlaO6GbT6FWqhTLekiNRdFca0d26GYZqRJV cokmx4nGbA+qOljQ94alO9biiL84b9AMF93HrZmPNhOl3htvJrnnQT+oOhxTlwEyVzoT TzKCu3aHY4aY933hbJSuKw0VIT9tly3rqHtQ7xQWvpcSXfUsSOEJodV1CQF2UZAyk8SO oXM4BuA9ZKdiEkbJdalFGStfJQJvmrLtaCdLqVo/hX2ElLou6mGZVtOUUSx8foJy3wZa gwpH84dgVWd/MiCZQUM+iF9R/JQ8wwts0qn1pEqp8WRDSgNqCzSUMqFH32Wk62DA+taP O+iQ== 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=SEzpAukoAQn83lsfCzdS88MYe9lG7G86695cNY7gsMY=; b=UPiH0X7UTC3j316Gmcczx3W6W0azp26Mro3Zojfv0jLb5ByGDRflTOwsDelEc3Qtqc 2MyGpu0dg4YUfJAk0FyjUSyh5zSGoebtSRV/H62QqV7Jr9rZHW0PkxmEvZJKLLRsi7nB etlzA7i8FzVkIh1b76fnkgRaF9yyHD3Upy8DrxqXlZ3Auxw/Qccg35rzATpp94zzLsu9 oNSBbraNZFI8d027NrZhh3hi1cymHkVJ03hRKGk3ZPDjgzuxPFoSnrTwR6P47fKBe4od gInv3iVcQosCPHT9QRoG+qgwKlFzeH+NZBh/KNo2MIcmlFQL7UGfRk/1Nyqj3IOcaEIW VXaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="s3dkP/VL"; 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=fail (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 t8si15454864qti.35.2019.12.28.15.33.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Dec 2019 15:33:41 -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=fail header.i=@linaro.org header.s=google header.b="s3dkP/VL"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilLaW-0006qy-Ll for patch@linaro.org; Sat, 28 Dec 2019 18:33:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43244) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilLGQ-000639-C0 for qemu-devel@nongnu.org; Sat, 28 Dec 2019 18:12:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilLGP-0001eh-6e for qemu-devel@nongnu.org; Sat, 28 Dec 2019 18:12:54 -0500 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:52139) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilLGO-0001Zm-Nc for qemu-devel@nongnu.org; Sat, 28 Dec 2019 18:12:53 -0500 Received: by mail-pj1-x1043.google.com with SMTP id j11so6314056pjs.1 for ; Sat, 28 Dec 2019 15:12:52 -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=SEzpAukoAQn83lsfCzdS88MYe9lG7G86695cNY7gsMY=; b=s3dkP/VLX154ub2oVFcY1BumUMIENcyb7ivyYPRbHlGSEOBXr2M2HGbG3tB8kRdJQy BxHLD4t04VzGFawFz4765/5i4+sGeClLVK+M/M96HW3NpRV+83tNiWRkeN7d7sUQySmW pxr8PCDCZTjalhKZeHGnGLHyv817VP3lYZEm8Q+lYaMAeFz0bLGKjmhWeM9GfRFnVGB1 T4sVMl19ClaAb9tCfIgc0X4COlwgN5LAWdfuNBTIiMmAB3oxDvubEUdtYdF/mcJEl7hd uCXjCAqiaSQ6AkvxXmYavLSLlm+UTG6WOTs4X9MpL4S1+bg/CkqGeXX+BvP5SIaEp9jr NRQQ== 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=SEzpAukoAQn83lsfCzdS88MYe9lG7G86695cNY7gsMY=; b=FraUW4THu3iEFg7x7HUS61/zgGrdqSq6Njfwq+yOzPzGQz8KJyQBFNMGO97urHBShI 5/0SzfbqDyvkihRYra5IcxqmYkTE9iCoaw3MeaoZkTiRxg+lqIDIRS0LJxARdSVH8Unx aWpddj8FjMHRAi3nOZo/hnCkRykRa4vA3VzkidJ7l6m0Hi1fSVxGgzSw/ge5LMH5kNBh Q/xrGq9t9izbZXEE/TQSmg7cioLb5ELr1VTr3tRz3pJisTjs74SMauekmXD5nzlUl0S3 MFAGJmFuLfgZ51QALl9fQNbGfH0USC+O6Oa+qzz5FkXd4w2MrdbFawCb6A307lRDEe2p 5KmA== X-Gm-Message-State: APjAAAV7LVi5XRJN6DN8989FTOKeKaf/gbkwOZgRQxvdbYVpdS3IHW05 DBAdRfj3KwuJrDUDGOtfJmUnTEqriiU= X-Received: by 2002:a17:90a:191a:: with SMTP id 26mr35286932pjg.111.1577574771414; Sat, 28 Dec 2019 15:12:51 -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.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2019 15:12:50 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 27/29] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX Date: Sun, 29 Dec 2019 10:11:22 +1100 Message-Id: <20191228231124.18307-28-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::1043 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: =?utf-8?q?Alex_Benn=C3=A9e?= , 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 Reviewed-by: Alex Bennée 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 diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 103bfe9dc2..8ebeaba649 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 }