Received: from eggs.gnu.org ([2001:4830:134:3::10]:49680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkSHr-00010z-C0 for qemu-devel@nongnu.org; Thu, 15 Sep 2016 04:44:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkSHn-00056T-4m for qemu-devel@nongnu.org; Thu, 15 Sep 2016 04:44:50 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:8250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkSHm-00055x-V3 for qemu-devel@nongnu.org; Thu, 15 Sep 2016 04:44:47 -0400 From: Leon Alrae Date: Thu, 15 Sep 2016 09:44:20 +0100 Message-ID: <1473929062-5548-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 0/2] target-mips: rework conditional stores for mttcg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net, rth@twiddle.net This small series changes MIPS conditional stores implementation for mttcg. Specifically we compare virtual address of LL and SC (rather than physical) which allows us to have just a single inlined implementation for user and system emulation and to use new atomic helpers. This is done in 2 steps: Patch 1: modifies existing SC implementation to use virtual addresses Patch 2: SC emulation rework and making use of cmpxchg These patches apply on top of Richard's atomic series. I've done only partial testing since many of my Linux images hit the abort() due to EXCP_ATOMIC -- but IIUC this is a missing piece in atomic helpers rather than a problem in the code gen. Leon Alrae (2): target-mips: compare virtual addresses in LL/SC sequence target-mips: reimplement SC instruction and use cmpxchg linux-user/main.c | 58 --------------------- target-mips/cpu.h | 7 +-- target-mips/helper.c | 6 +-- target-mips/helper.h | 2 - target-mips/machine.c | 7 +-- target-mips/op_helper.c | 52 ++++++------------- target-mips/translate.c | 135 ++++++++++++++++++++++++------------------------ 7 files changed, 91 insertions(+), 176 deletions(-) -- 2.7.4