Received: by 10.192.165.156 with SMTP id m28csp834479imm; Mon, 16 Apr 2018 09:25:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49zkYR5n9CB9gtilzNNTjie7xfvfE1ocHitw0hOOYCi1ObaO4CzsxV5hdEROCrLcaAnHUPX X-Received: by 2002:a17:902:6ac3:: with SMTP id i3-v6mr10217352plt.142.1523895931125; Mon, 16 Apr 2018 09:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523895931; cv=none; d=google.com; s=arc-20160816; b=LJ4jMOSqQZcBfIr+06wAETFFRG4NoUb2vW9aAfYkn6kJG+qaD1TUo72Tux7JCeXdUs jMgPXLBFtnpZ9fDzj8jKFXaO9xRCK7/sixq45EsWV4geSHe02u41JoSHXBLUP+5Bcf2j qnZWajT/K0dWYQ8NQZfHg/brL6z1FjoRfvBjWkDN0F4346rTS7n/+KhOIEwbS7aHgOFR lpXp/Ih8hfvSyZMaumDh5OVoF3YF5vraUtNee9KuWdgKu+yr+Im5vw2+w7pQZbx4hCJK QNW+x7k5lfNd0HkGFRo1+I5F+W5ROH1sr3A0O3G89QfIPwyWxvBDT3iHDwT4+Vx6ce7m +Ycg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=6YvBabKOERqxO2VhCq4po5AwPSaHOUWMRcAfUm1zcK4=; b=0E5AuTYI4MiK4Pzo2uUcpdgNwY0e7qf0LBwfZA82zY1NuA7dlxGPe+QvTlSxGx3NJD 7pVyo+Of31NtnV5X/4eqBL/TsC8ze14ulEI9lAzMJTZJ4eqDb74PfmATTRLXy/NI3zy7 /hAJpnFg1v6TK6GUj21nRbX0E8eVP5ImhAEfqsFPplLNgl1oiswhFr4+LBi6L1Ptx59Z 3BLDWZjOCnO4zI/oYWdo4Y8e9OCqFCjjZPMepDqhnlQ4oF9Fm8Q+Dn5cjYPtpXNSunGC 44Xbl+88HCht/L/U/VXd0nduTAL8Qas1vqsWrz94XL2k7KOM2lnZFsTNE0z2SaFMWhkk GOJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z124si11117135pfb.188.2018.04.16.09.25.17; Mon, 16 Apr 2018 09:25:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753346AbeDPQW3 (ORCPT + 99 others); Mon, 16 Apr 2018 12:22:29 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53062 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752776AbeDPQVv (ORCPT ); Mon, 16 Apr 2018 12:21:51 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3GGKevx027759 for ; Mon, 16 Apr 2018 12:21:50 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hcxu2hfsk-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 16 Apr 2018 12:21:50 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Apr 2018 12:21:49 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 16 Apr 2018 12:21:46 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3GGLjHE56754430; Mon, 16 Apr 2018 16:21:45 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB26DB2056; Mon, 16 Apr 2018 13:23:49 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.108]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id B382DB204D; Mon, 16 Apr 2018 13:23:49 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 7375F16C38BB; Mon, 16 Apr 2018 09:22:53 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: mingo@kernel.org, stern@rowland.harvard.edu, parri.andrea@gmail.com, will.deacon@arm.com, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, "Paul E. McKenney" Subject: [PATCH RFC tools/memory-model 2/5] tools/memory-model: Add litmus test for multicopy atomicity Date: Mon, 16 Apr 2018 09:22:48 -0700 X-Mailer: git-send-email 2.5.2 In-Reply-To: <20180416162228.GA18167@linux.vnet.ibm.com> References: <20180416162228.GA18167@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18041616-0056-0000-0000-0000043EB554 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008863; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01018805; UDB=6.00519705; IPR=6.00798046; MB=3.00020599; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-16 16:21:49 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041616-0057-0000-0000-00000882B8C0 Message-Id: <1523895771-19224-2-git-send-email-paulmck@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-16_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804160148 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit adds a litmus test suggested by Alan Stern that is forbidden on multicopy atomic systems, but allowed on non-multicopy atomic systems. Note that other-multicopy atomic systems are examples of non-multicopy atomic systems. Suggested-by: Alan Stern Signed-off-by: Paul E. McKenney --- .../litmus-tests/SB+poonceoncescoh.litmus | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus diff --git a/tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus b/tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus new file mode 100644 index 000000000000..991a2d6dec63 --- /dev/null +++ b/tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus @@ -0,0 +1,31 @@ +C SB+poonceoncescoh + +(* + * Result: Sometimes + * + * This litmus test demonstrates that LKMM is not multicopy atomic. + *) + +{} + +P0(int *x, int *y) +{ + int r1; + int r2; + + WRITE_ONCE(*x, 1); + r1 = READ_ONCE(*x); + r2 = READ_ONCE(*y); +} + +P1(int *x, int *y) +{ + int r3; + int r4; + + WRITE_ONCE(*y, 1); + r3 = READ_ONCE(*y); + r4 = READ_ONCE(*x); +} + +exists (0:r2=0 /\ 1:r4=0 /\ 0:r1=1 /\ 1:r3=1) -- 2.5.2