From patchwork Thu Dec 12 04:00:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181415 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp390099ile; Wed, 11 Dec 2019 20:06:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwEtNC8p+9hp14z+ZRQBDJIK4ySeOE8dck3DSeh+3zOKyENFIYB8thmmqB0Htk7woH3FRdx X-Received: by 2002:a0c:e790:: with SMTP id x16mr6310657qvn.18.1576123597038; Wed, 11 Dec 2019 20:06:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576123597; cv=none; d=google.com; s=arc-20160816; b=uTpyEMgUFyUvJCQZM5O9YYSfk1nmA6ZWjKsjHtaGhGVOOTXmbfTOT4B/fyHGDD7AvE qVQVZD8FbHy6VDtcF2nLREhjOAMYtZm/Jxd1zXq2/aNjmlK0Z/FNhpC5ECD0/YFslLaM EqYAd45mmYtz0R41xVwQ5GqzVWnxyeESxglxO6HZ8NeyNe4LHk1+uE5n0yD1BB/9spq1 6wqasghcYZdTW/e5F8xkviOdCvAsrZaAajI5GcNzR7OyB0G9YzDMLARov5zhfzSs5loR U2LATIa5Px5n8175driBvgP2YfOql0bBY7j7jILYtVlzYytuKAntFU0f58J+Iytu7ltB Eu6Q== 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:message-id:date:subject:to:from:dkim-signature; bh=W/IrtrUk4g6Dwcqz2tLntq918adD2bGYeEMjuC4fyfU=; b=uic56pQtMqi9x4+CbTjnlbbwRI8LS31rvOrEiRPMJOq6jsAUQRmQqIUOxsRheOE9ee AQsOVvn3xeDvVeZh6Y5/DvVOptqF2QEl25odTpUOuKIKtpG6NmAZPw76t4LAX++0F22k sz54M39/9NhJfJv2mTF7UXKBCwsqnb2QRy0zQI4hfa3Ij5CuT3x5n39WqSaHaP1pxfbF kn67VbkM1l0JRzg8bXOny5bTC7bQ0G3pxitZmLhxm48ITe4kDqL4M+qgyzP5JvoxP6kd DogH2d6IpltPnRCF4y18t7PTYq+wXmWcRAcFGKPJIm8JPq1dDrA3CcCNP5GrML5/ecui /DXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mQVHAd+B; 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 q21si2186418qtc.234.2019.12.11.20.06.36 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Dec 2019 20:06: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=fail header.i=@linaro.org header.s=google header.b=mQVHAd+B; 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]:53946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifFkK-00082M-7N for patch@linaro.org; Wed, 11 Dec 2019 23:06:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47375) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifFeh-0000mb-Ar for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:00:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifFed-0003py-VG for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:00:47 -0500 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:39057) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifFed-0003mp-GP for qemu-devel@nongnu.org; Wed, 11 Dec 2019 23:00:43 -0500 Received: by mail-pg1-x535.google.com with SMTP id b137so431644pga.6 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:mime-version :content-transfer-encoding; bh=W/IrtrUk4g6Dwcqz2tLntq918adD2bGYeEMjuC4fyfU=; b=mQVHAd+BwxgklYnel0XpxkwrERfid/9HfybVC3HaJm8FnxS7kMlcu4DnX7g//WlySr 5i3larzYs+uM172LVd4V18X+aRnzlrhV6nH2jhGmEg9+bB+kW4jGToduMfgk90T+rgdX kYg+6EcELxmEC/1f0si+U4WBaD04T2rhIeJZIL3bubS0Ym8YvhYQZEo5/UL/TBZ8+L1q j0RtuGneZ+MOLfDKJlPDGwG+iSFnWk6Vi7fRMODirY4xGKNyOIerpshbnf5vQcGD0/r0 urI7yFsxwcm+YEbyM9SKQICKotaps1MtklWy/av/tjvHrxv7vizGZqA4VQv05DKyaU4i dDBg== 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:mime-version :content-transfer-encoding; bh=W/IrtrUk4g6Dwcqz2tLntq918adD2bGYeEMjuC4fyfU=; b=gxewESHs3oSmU8lKy8ayq184xjMJIZvkqjjfg32ADOI4uz2+dwkpp3pVmVbJmG8+rc bHwN1rhC7o3sxBhz7bSZ9zlZWm24Msoo4BBueVnVGW3kmPvEagCeLWmGS36FKesHo0Q+ BfEvlJ0T3drtVLDNIhc6nOfU5zZEuDpzKU2jTc/c+2CLZo5HUODExGURNfxRYEkg4+UA uq4C0DfcUftjmuln5kIHPMqp86sbLJ/cZ3SYjRz3EGSFUzY7+H+JtlkFnw1HAqaZnOMf bvhaUbjV2WcTzvGzhih1QFbD0W7j9jCFl7Unpu8KlT1L7seSdplXmnd1JExBpyBlt/P/ Lupg== X-Gm-Message-State: APjAAAXmFpP0q5gle6hpxi7o6RBLD+zQWnZF3msLR3G6b2z8OlvlDtqA 3+bCo6DbDZSKfDIRMt6p6ElYbBFJlFo= X-Received: by 2002:a62:b402:: with SMTP id h2mr7541642pfn.55.1576123241427; Wed, 11 Dec 2019 20:00:41 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 20:00:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 00/28] cputlb: Remove support for MMU_MODE*_SUFFIX Date: Wed, 11 Dec 2019 20:00:11 -0800 Message-Id: <20191212040039.26546-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 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::535 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: Marek Vasut , Peter Maydell , Eduardo Habkost , David Hildenbrand , Chris Wulff , Laurent Vivier , Max Filippov , Aleksandar Markovic , Paolo Bonzini , "Edgar E . Iglesias" , Aleksandar Rikalo , Guan Xuetao , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is part of a project to raise the limit on NB_MMU_MODES. One of those is in cpu_ldst.h, in support of MMU_MODE*_SUFFIX. While this could be extended, it's not the best interface for such things. Better is a single interface that allows a variable mmu_idx. The best exemplars of that is the usage in target/mips and target/ppc. In the process, I tried to clean up the implementation of these functions for softmmu and user-only. r~ Cc: Aleksandar Markovic Cc: Aleksandar Rikalo Cc: Aurelien Jarno Cc: Chris Wulff Cc: David Gibson Cc: David Hildenbrand Cc: Edgar E. Iglesias Cc: Eduardo Habkost Cc: Guan Xuetao Cc: Laurent Vivier Cc: Marek Vasut Cc: Max Filippov Cc: Paolo Bonzini Cc: Peter Maydell Richard Henderson (28): target/xtensa: Use probe_access for itlb_hit_test cputlb: Use trace_mem_get_info instead of trace_mem_build_info trace: Remove trace_mem_build_info_no_se_[bl]e cputlb: Move body of cpu_ldst_template.h out of line translator: Use cpu_ld*_code instead of open-coding cputlb: Rename helper_ret_ld*_cmmu to cpu_ld*_code cputlb: Provide cpu_(ld,st}*_mmuidx_ra for user-only target/i386: Use cpu_*_mmuidx_ra instead of templates target/s390x: Include tcg.h in mem_helper.c target/arm: Include tcg.h in sve_helper.c accel/tcg: Include tcg.h in tcg-runtime.c linux-user: Include tcg.h in syscall.c linux-user: Include trace-root.h in syscall-trace.h cputlb: Expand cpu_ldst_useronly_template.h in user-exec.c target/nios2: Remove MMU_MODE{0,1}_SUFFIX target/alpha: Remove MMU_MODE{0,1}_SUFFIX target/cris: Remove MMU_MODE{0,1}_SUFFIX target/i386: Remove MMU_MODE{0,1,2}_SUFFIX target/microblaze: Remove MMU_MODE{0,1,2}_SUFFIX target/sh4: Remove MMU_MODE{0,1}_SUFFIX target/unicore32: Remove MMU_MODE{0,1}_SUFFIX target/xtensa: Remove MMU_MODE{0,1,2,3}_SUFFIX target/m68k: Use cpu_*_mmuidx_ra instead of MMU_MODE{0,1}_SUFFIX target/mips: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX target/s390x: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX cputlb: Remove support for MMU_MODE*_SUFFIX cputlb: Expand cpu_ldst_template.h in cputlb.c accel/tcg/atomic_template.h | 67 ++-- include/exec/cpu_ldst.h | 448 +++++++--------------- include/exec/cpu_ldst_template.h | 211 ---------- include/exec/cpu_ldst_useronly_template.h | 159 -------- include/exec/translator.h | 48 +-- include/user/syscall-trace.h | 2 + target/alpha/cpu.h | 2 - target/cris/cpu.h | 2 - target/i386/cpu.h | 3 - target/m68k/cpu.h | 2 - target/microblaze/cpu.h | 3 - target/mips/cpu.h | 4 - target/nios2/cpu.h | 2 - target/ppc/cpu.h | 2 - target/s390x/cpu.h | 5 - target/sh4/cpu.h | 2 - target/unicore32/cpu.h | 2 - target/xtensa/cpu.h | 4 - tcg/tcg.h | 29 -- trace/mem-internal.h | 17 - accel/tcg/cputlb.c | 315 +++++++++++---- accel/tcg/tcg-runtime.c | 1 + accel/tcg/user-exec.c | 236 ++++++++++++ linux-user/syscall.c | 1 + target/arm/sve_helper.c | 1 + target/i386/seg_helper.c | 75 ++-- target/m68k/op_helper.c | 5 + target/mips/op_helper.c | 182 +++------ target/ppc/mem_helper.c | 11 +- target/s390x/mem_helper.c | 6 + target/xtensa/mmu_helper.c | 5 +- docs/devel/loads-stores.rst | 4 +- 32 files changed, 788 insertions(+), 1068 deletions(-) delete mode 100644 include/exec/cpu_ldst_template.h delete mode 100644 include/exec/cpu_ldst_useronly_template.h -- 2.20.1