Received: from eggs.gnu.org ([2001:4830:134:3::10]:43751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6LF9-0005gT-In for qemu-devel@nongnu.org; Mon, 14 Nov 2016 12:40:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6LF5-0000xW-8r for qemu-devel@nongnu.org; Mon, 14 Nov 2016 12:40:31 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:38008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c6LF4-0000wX-Qr for qemu-devel@nongnu.org; Mon, 14 Nov 2016 12:40:27 -0500 Received: by mail-wm0-x233.google.com with SMTP id f82so112294385wmf.1 for ; Mon, 14 Nov 2016 09:40:26 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 14 Nov 2016 17:40:08 +0000 Message-Id: <20161114174010.31040-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC 0/2] Clean-up tlb_flush and cpu reset functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: rth@twiddle.net Cc: qemu-devel@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Hi, These changes are cleanups for tlb_flush() and associated cpu reset functions. The first patch fixes up all vCPU reset functions to rely on the common reset code to issue a tlb_flush. This includes fixing up functions which blithely memset the TLB structures which upsets tsan in MTTCG. The second is a clean-up to drop the long ignored global flag. AFAICT we have never used it and there already exists more scoped functions that deal with MMU_IDX and pages for partial clearing of the TLB. A variant of these patches appeared in my last MTTCG patch set but this one fixes up all machines and targets. The changes are fairly mechanical but they span all the architectures. Alex Bennée (2): qom/cpu: move tlb_flush to cpu_common_reset cputlb: drop flush_global flag from tlb_flush cputlb.c | 21 ++++++--------------- exec.c | 4 ++-- hw/sh4/sh7750.c | 2 +- include/exec/exec-all.h | 14 ++++++-------- qom/cpu.c | 10 ++++++++-- target-alpha/cpu.c | 2 +- target-alpha/sys_helper.c | 2 +- target-arm/cpu.c | 5 ++--- target-arm/cpu.h | 5 ++++- target-arm/helper.c | 26 +++++++++++++------------- target-cris/cpu.c | 3 +-- target-cris/cpu.h | 9 ++++++--- target-i386/cpu.c | 2 -- target-i386/cpu.h | 6 ++++-- target-i386/fpu_helper.c | 2 +- target-i386/helper.c | 8 ++++---- target-i386/machine.c | 2 +- target-i386/misc_helper.c | 2 +- target-i386/svm_helper.c | 2 +- target-lm32/cpu.c | 3 +-- target-lm32/cpu.h | 3 +++ target-m68k/cpu.c | 3 +-- target-m68k/cpu.h | 3 +++ target-microblaze/cpu.c | 3 +-- target-microblaze/cpu.h | 3 +++ target-microblaze/mmu.c | 2 +- target-mips/cpu.c | 3 +-- target-mips/cpu.h | 5 ++++- target-mips/helper.c | 6 +++--- target-mips/op_helper.c | 8 ++++---- target-moxie/cpu.c | 4 +--- target-moxie/cpu.h | 3 +++ target-openrisc/cpu.c | 9 +-------- target-openrisc/cpu.h | 3 +++ target-openrisc/interrupt.c | 2 +- target-openrisc/interrupt_helper.c | 2 +- target-openrisc/sys_helper.c | 2 +- target-ppc/helper_regs.h | 4 ++-- target-ppc/misc_helper.c | 4 ++-- target-ppc/mmu_helper.c | 32 ++++++++++++++++---------------- target-ppc/translate_init.c | 3 --- target-s390x/cpu.c | 7 ++----- target-s390x/cpu.h | 5 +++-- target-s390x/gdbstub.c | 2 +- target-s390x/mem_helper.c | 8 ++++---- target-sh4/cpu.c | 3 +-- target-sh4/cpu.h | 3 +++ target-sh4/helper.c | 2 +- target-sparc/cpu.c | 3 +-- target-sparc/cpu.h | 3 +++ target-sparc/ldst_helper.c | 12 ++++++------ target-tilegx/cpu.c | 3 +-- target-tilegx/cpu.h | 3 +++ target-tricore/cpu.c | 2 -- target-unicore32/cpu.c | 2 +- target-unicore32/helper.c | 2 +- target-xtensa/op_helper.c | 2 +- 57 files changed, 151 insertions(+), 148 deletions(-) -- 2.10.1