From patchwork Mon Mar 23 13:54:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 453483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AED7014016B for ; Tue, 24 Mar 2015 00:56:29 +1100 (AEDT) Received: from localhost ([::1]:56086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya2qB-00058V-LT for incoming@patchwork.ozlabs.org; Mon, 23 Mar 2015 09:56:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya2pT-0004DW-9D for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:55:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ya2pO-00011r-7z for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:55:43 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:33459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya2pO-00011a-28 for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:55:38 -0400 Received: by lbcmq2 with SMTP id mq2so8650263lbc.0 for ; Mon, 23 Mar 2015 06:55:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H8064z6ScBe904jLPfPFbgMrArzhKrX/PX69Pr4PqGc=; b=b9J03E28Kw3OHeVC18w8FlOlnSgxmZ+X3FgPNgz8NqjDcVP2U33apoG16NS41qLrHY h1wMu1ukBe00l6VLT2nJsDLWItLbQ110CKGw5z9Mxy/PiPpO5yZemRiGC8BRo1PTyFXT kqv/hLjTvZ1iP7muSd0hqtVhQosUFM70KjkSapC6FlyxkvlxBtDTVf8B167U6M4y83TM oXvJmW6rPuyq4+eY1BFupniTug2tI0vQunpS/ma5+uycD+1hE0isATfgszKmi+mQr3iU GXgCOox0JeEnZTiCxde9Mmy17fG/EGa2w4FNtXSRzw/TWf4ZlxmvKYOEkpixCbXVZGm+ 4FAg== X-Gm-Message-State: ALoCoQmUCBWtEx1lYrNRzrVDsWDSIMoxlsLXH7nASHekQjEkmRMWZ0O9Dpn9dw2Iww1lqU9A9Z04 X-Received: by 10.152.179.139 with SMTP id dg11mr78308542lac.28.1427118937209; Mon, 23 Mar 2015 06:55:37 -0700 (PDT) Received: from localhost.localdomain (91-157-196-38.elisa-laajakaista.fi. [91.157.196.38]) by mx.google.com with ESMTPSA id j6sm204311laf.5.2015.03.23.06.55.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Mar 2015 06:55:36 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 23 Mar 2015 15:54:52 +0200 Message-Id: <92bed463d12ab9e1e34cdd44673ab9c4315ad1d2.1427118794.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.169 Cc: Chen Gang S Subject: [Qemu-devel] [PULL 1/3] linux-user/main.c: Remove redundant end_exclusive() in arm_kernel_cmpxchg64_helper() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Chen Gang S start/end_exclusive() need be pairs, except the start_exclusive() in stop_all_tasks() which is only used by force_sig(), which will be abort. So at present, start_exclusive() in stop_all_task() need not be paired. queue_signal() may call force_sig(), or return after kill pid (or queue signal). If could return from queue_signal(), stop_all_task() would not be called in time, the next end_exclusive() would be issue. So in arm_kernel_cmpxchg64_helper() for ARM, need remove end_exclusive() after queue_signal(). The related commit: "97cc756 linux-user: Implement new ARM 64 bit cmpxchg kernel helper". Signed-off-by: Chen Gang Signed-off-by: Riku Voipio --- linux-user/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 6e446de..31eb60f 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -525,8 +525,6 @@ segv: info.si_code = TARGET_SEGV_MAPERR; info._sifields._sigfault._addr = env->exception.vaddress; queue_signal(env, info.si_signo, &info); - - end_exclusive(); } /* Handle a jump to the kernel code page. */