All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC tools/memory-model] Add s390.{cfg,cat}
@ 2018-03-28 13:42 Paul E. McKenney
  2018-03-28 13:48 ` Peter Zijlstra
  2018-03-28 15:01   ` Alan Stern
  0 siblings, 2 replies; 18+ messages in thread
From: Paul E. McKenney @ 2018-03-28 13:42 UTC (permalink / raw)
  To: schwidefsky, borntraeger
  Cc: linux-kernel, linux-arch, stern, parri.andrea, will.deacon,
	peterz, boqun.feng, npiggin, dhowells, j.alglave, luc.maranget,
	akiyks

Hello!

The prototype patch shown below provides files required to allow herd7 to
evaluate C-language litmus tests for the multicopy-atomic TSO ordering
provided by s390.  This patch should be viewed with great suspicion.
It does what I expect it to do on SB (with and without barriers),
IRIW without barriers, and Alan's SB with read-of-write added, but my
expectations are quite likely faulty, and my test cases are very few
in number.

Either way, this is the easy part.  The hard part (which I am happy
to leave to others) is making litmus7 and klitmus7 able to do tests
on actual hardware, as well as enabling herd to handle litmus tests
containing BAL.  ;-)

Note that CPU architectures already supported by herd might well need
only a .cfg file that refers to herd's pre-existing support.

Thoughts?

							Thanx, Paul

------------------------------------------------------------------------

commit 2fff0ff161b71215e7f7292b9eff4bc77ba64f29
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Date:   Wed Mar 28 06:30:39 2018 -0700

    tools/memory-model: Add .cfg and .cat files for s390
    
    This commit adds s390.cat and s390.cfg files to allow users to check
    litmus tests for s390-specific code.  Note that this change only enables
    herd7 checking of C-language litmus tests.  Larger changes are required
    to enable the litmus7 and klitmus7 tools to check litmus tests on real
    hardare.
    
    Suggested-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/tools/memory-model/s390.cat b/tools/memory-model/s390.cat
new file mode 100644
index 000000000000..618e88f50d9a
--- /dev/null
+++ b/tools/memory-model/s390.cat
@@ -0,0 +1,12 @@
+s390
+
+include "fences.cat"
+include "cos.cat"
+
+(* Atomic *)
+empty rmw & (fre;coe) as atom
+
+(* TSO with multicopy atomicity *)
+acyclic (po \ (W * R)) | po-loc | fr | rf | co as sc
+
+(* Fences are somehow handled implicitly, at least for SB+mb... *)
diff --git a/tools/memory-model/s390.cfg b/tools/memory-model/s390.cfg
new file mode 100644
index 000000000000..d77e05d2395c
--- /dev/null
+++ b/tools/memory-model/s390.cfg
@@ -0,0 +1,21 @@
+macros linux-kernel.def
+bell linux-kernel.bell
+model s390.cat
+graph columns
+squished true
+showevents noregs
+movelabel true
+fontsize 8
+xscale 2.0
+yscale 1.5
+arrowsize 0.8
+showinitrf false
+showfinalrf false
+showinitwrites false
+splines spline
+pad 0.1
+edgeattr hb,color,indigo
+edgeattr co,color,blue
+edgeattr mb,color,darkgreen
+edgeattr wmb,color,darkgreen
+edgeattr rmb,color,darkgreen

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-04-03 15:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28 13:42 [PATCH RFC tools/memory-model] Add s390.{cfg,cat} Paul E. McKenney
2018-03-28 13:48 ` Peter Zijlstra
2018-03-28 14:20   ` Paul E. McKenney
2018-03-28 16:49     ` Paul E. McKenney
2018-03-28 15:01 ` Alan Stern
2018-03-28 15:01   ` Alan Stern
2018-03-28 16:33   ` Paul E. McKenney
2018-03-28 18:04     ` Alan Stern
2018-03-28 18:04       ` Alan Stern
2018-03-29  2:18       ` Paul E. McKenney
2018-03-29 14:40         ` Alan Stern
2018-03-29 14:40           ` Alan Stern
2018-04-02 19:31           ` Paul E. McKenney
2018-04-03 13:50             ` Alan Stern
2018-04-03 13:50               ` Alan Stern
2018-04-03 15:16               ` Paul E. McKenney
2018-03-28 17:51   ` Peter Zijlstra
2018-03-29  1:33     ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.