linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for 4.16] membarrier-sync-core: Document architecture support
@ 2018-02-09 20:30 Mathieu Desnoyers
  2018-02-10 11:47 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mathieu Desnoyers @ 2018-02-09 20:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Mathieu Desnoyers, Thomas Gleixner,
	Peter Zijlstra (Intel), Andrea Parri, Andrew Hunter,
	Andy Lutomirski, Avi Kivity, Benjamin Herrenschmidt, Boqun Feng,
	Dave Watson, David Sehr, Greg Hackmann, H. Peter Anvin,
	Linus Torvalds, Maged Michael, Michael Ellerman, Paul E. McKenney,
	Paul Mackerras, Russell King, Will Deacon, linux-api, linux-arch

Ensure we gather architecture requirements about each architecture
supporting the "sync_core" membarrier command in a single file under
Documentation/features.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrea Parri <parri.andrea@gmail.com>
Cc: Andrew Hunter <ahh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Avi Kivity <avi@scylladb.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Dave Watson <davejwatson@fb.com>
Cc: David Sehr <sehr@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maged Michael <maged.michael@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
---
 .../sched/membarrier-sync-core/arch-support.txt    | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 Documentation/features/sched/membarrier-sync-core/arch-support.txt

diff --git a/Documentation/features/sched/membarrier-sync-core/arch-support.txt b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
new file mode 100644
index 0000000..2c815a7
--- /dev/null
+++ b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
@@ -0,0 +1,62 @@
+#
+# Feature name:          membarrier-sync-core
+#         Kconfig:       ARCH_HAS_MEMBARRIER_SYNC_CORE
+#         description:   arch supports core serializing membarrier
+#
+# Architecture requirements
+#
+# * arm64
+#
+# Rely on eret context synchronization when returning from IPI handler, and
+# when returning to user-space.
+#
+# * x86
+#
+# x86-32 uses IRET as return from interrupt, which takes care of the IPI.
+# However, it uses both IRET and SYSEXIT to go back to user-space. The IRET
+# instruction is core serializing, but not SYSEXIT.
+#
+# x86-64 uses IRET as return from interrupt, which takes care of the IPI.
+# However, it can return to user-space through either SYSRETL (compat code),
+# SYSRETQ, or IRET.
+#
+# Given that neither SYSRET{L,Q}, nor SYSEXIT, are core serializing, we rely
+# instead on write_cr3() performed by switch_mm() to provide core serialization
+# after changing the current mm, and deal with the special case of kthread ->
+# uthread (temporarily keeping current mm into active_mm) by issuing a
+# sync_core_before_usermode() in that specific case.
+#
+    -----------------------
+    |         arch |status|
+    -----------------------
+    |       alpha: | TODO |
+    |         arc: | TODO |
+    |         arm: | TODO |
+    |       arm64: |  ok  |
+    |    blackfin: | TODO |
+    |         c6x: | TODO |
+    |        cris: | TODO |
+    |         frv: | TODO |
+    |       h8300: | TODO |
+    |     hexagon: | TODO |
+    |        ia64: | TODO |
+    |        m32r: | TODO |
+    |        m68k: | TODO |
+    |       metag: | TODO |
+    |  microblaze: | TODO |
+    |        mips: | TODO |
+    |     mn10300: | TODO |
+    |       nios2: | TODO |
+    |    openrisc: | TODO |
+    |      parisc: | TODO |
+    |     powerpc: | TODO |
+    |        s390: | TODO |
+    |       score: | TODO |
+    |          sh: | TODO |
+    |       sparc: | TODO |
+    |        tile: | TODO |
+    |          um: | TODO |
+    |   unicore32: | TODO |
+    |         x86: |  ok  |
+    |      xtensa: | TODO |
+    -----------------------
-- 
1.9.1


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

* Re: [PATCH for 4.16] membarrier-sync-core: Document architecture support
  2018-02-09 20:30 [PATCH for 4.16] membarrier-sync-core: Document architecture support Mathieu Desnoyers
@ 2018-02-10 11:47 ` Ingo Molnar
  2018-02-10 17:00   ` [PATCH for 4.16] Documentation: Allow comments in arch features files Mathieu Desnoyers
  2018-02-11 12:08 ` [tip:sched/urgent] membarrier-sync-core: Document architecture support tip-bot for Mathieu Desnoyers
  2018-02-11 12:13 ` [tip:core/core] Documentation/features, membarriers: Document membarrier-sync-core " tip-bot for Mathieu Desnoyers
  2 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2018-02-10 11:47 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: linux-kernel, Thomas Gleixner, Peter Zijlstra (Intel),
	Andrea Parri, Andrew Hunter, Andy Lutomirski, Avi Kivity,
	Benjamin Herrenschmidt, Boqun Feng, Dave Watson, David Sehr,
	Greg Hackmann, H. Peter Anvin, Linus Torvalds, Maged Michael,
	Michael Ellerman, Paul E. McKenney, Paul Mackerras, Russell King,
	Will Deacon, linux-api, linux-arch


* Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:

> Ensure we gather architecture requirements about each architecture
> supporting the "sync_core" membarrier command in a single file under
> Documentation/features.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: Andrea Parri <parri.andrea@gmail.com>
> Cc: Andrew Hunter <ahh@google.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Avi Kivity <avi@scylladb.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Boqun Feng <boqun.feng@gmail.com>
> Cc: Dave Watson <davejwatson@fb.com>
> Cc: David Sehr <sehr@google.com>
> Cc: Greg Hackmann <ghackmann@google.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Maged Michael <maged.michael@gmail.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-api@vger.kernel.org
> Cc: linux-arch@vger.kernel.org
> ---
>  .../sched/membarrier-sync-core/arch-support.txt    | 62 ++++++++++++++++++++++
>  1 file changed, 62 insertions(+)
>  create mode 100644 Documentation/features/sched/membarrier-sync-core/arch-support.txt
> 
> diff --git a/Documentation/features/sched/membarrier-sync-core/arch-support.txt b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
> new file mode 100644
> index 0000000..2c815a7
> --- /dev/null
> +++ b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
> @@ -0,0 +1,62 @@
> +#
> +# Feature name:          membarrier-sync-core
> +#         Kconfig:       ARCH_HAS_MEMBARRIER_SYNC_CORE
> +#         description:   arch supports core serializing membarrier

This breaks the output of the Documentation/features/list-arch.sh script.

Thanks,

	Ingo

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

* [PATCH for 4.16] Documentation: Allow comments in arch features files
  2018-02-10 11:47 ` Ingo Molnar
@ 2018-02-10 17:00   ` Mathieu Desnoyers
  2018-02-11 12:12     ` [tip:core/core] Documentation/features: " tip-bot for Mathieu Desnoyers
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Desnoyers @ 2018-02-10 17:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Mathieu Desnoyers, Thomas Gleixner,
	Peter Zijlstra (Intel), Andrea Parri, Andrew Hunter,
	Andy Lutomirski, Avi Kivity, Benjamin Herrenschmidt, Boqun Feng,
	Dave Watson, David Sehr, Greg Hackmann, H. Peter Anvin,
	Linus Torvalds, Maged Michael, Michael Ellerman, Paul E. McKenney,
	Paul Mackerras, Russell King, Will Deacon, linux-api, linux-arch

The list-arch.sh script considers lines beginning with "#" as match for
the feature table.

Given that those tables are never in lines beginning with "#",
add a reverse grep on "^#" when matching the "ok/TODO" state of
the architecture.

This allows adding comments within the feature files, for instance
describing the architecture requirements for the feature in each
architecture.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrea Parri <parri.andrea@gmail.com>
Cc: Andrew Hunter <ahh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Avi Kivity <avi@scylladb.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Dave Watson <davejwatson@fb.com>
Cc: David Sehr <sehr@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maged Michael <maged.michael@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
---
 Documentation/features/list-arch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/features/list-arch.sh b/Documentation/features/list-arch.sh
index c16b5b5..1ec47c3 100755
--- a/Documentation/features/list-arch.sh
+++ b/Documentation/features/list-arch.sh
@@ -17,7 +17,7 @@ for F in */*/arch-support.txt; do
   N=$(grep -h "^# Feature name:"        $F | cut -c25-)
   C=$(grep -h "^#         Kconfig:"     $F | cut -c25-)
   D=$(grep -h "^#         description:" $F | cut -c25-)
-  S=$(grep -hw $ARCH $F | cut -d\| -f3)
+  S=$(grep -hv "^#" $F | grep -w $ARCH | cut -d\| -f3)
 
   printf "%10s/%-22s:%s| %35s # %s\n" "$SUBSYS" "$N" "$S" "$C" "$D"
 done
-- 
1.9.1


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

* [tip:sched/urgent] membarrier-sync-core: Document architecture support
  2018-02-09 20:30 [PATCH for 4.16] membarrier-sync-core: Document architecture support Mathieu Desnoyers
  2018-02-10 11:47 ` Ingo Molnar
@ 2018-02-11 12:08 ` tip-bot for Mathieu Desnoyers
  2018-02-11 12:13 ` [tip:core/core] Documentation/features, membarriers: Document membarrier-sync-core " tip-bot for Mathieu Desnoyers
  2 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Mathieu Desnoyers @ 2018-02-11 12:08 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: parri.andrea, peterz, mingo, mathieu.desnoyers, benh, tglx,
	davejwatson, sehr, ghackmann, linux-kernel, boqun.feng, ahh,
	paulmck, maged.michael, avi, torvalds, linux, hpa, luto, paulus,
	will.deacon, mpe

Commit-ID:  6a546c7e69ff0b69581377cc70d7e8a601b98fce
Gitweb:     https://git.kernel.org/tip/6a546c7e69ff0b69581377cc70d7e8a601b98fce
Author:     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
AuthorDate: Fri, 9 Feb 2018 15:30:56 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 10 Feb 2018 12:45:10 +0100

membarrier-sync-core: Document architecture support

Ensure we gather architecture requirements about each architecture
supporting the "sync_core" membarrier command in a single file under
Documentation/features.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrea Parri <parri.andrea@gmail.com>
Cc: Andrew Hunter <ahh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Avi Kivity <avi@scylladb.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Dave Watson <davejwatson@fb.com>
Cc: David Sehr <sehr@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maged Michael <maged.michael@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Link: http://lkml.kernel.org/r/1518208256-22034-1-git-send-email-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 .../sched/membarrier-sync-core/arch-support.txt    | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/Documentation/features/sched/membarrier-sync-core/arch-support.txt b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
new file mode 100644
index 0000000..2c815a7
--- /dev/null
+++ b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
@@ -0,0 +1,62 @@
+#
+# Feature name:          membarrier-sync-core
+#         Kconfig:       ARCH_HAS_MEMBARRIER_SYNC_CORE
+#         description:   arch supports core serializing membarrier
+#
+# Architecture requirements
+#
+# * arm64
+#
+# Rely on eret context synchronization when returning from IPI handler, and
+# when returning to user-space.
+#
+# * x86
+#
+# x86-32 uses IRET as return from interrupt, which takes care of the IPI.
+# However, it uses both IRET and SYSEXIT to go back to user-space. The IRET
+# instruction is core serializing, but not SYSEXIT.
+#
+# x86-64 uses IRET as return from interrupt, which takes care of the IPI.
+# However, it can return to user-space through either SYSRETL (compat code),
+# SYSRETQ, or IRET.
+#
+# Given that neither SYSRET{L,Q}, nor SYSEXIT, are core serializing, we rely
+# instead on write_cr3() performed by switch_mm() to provide core serialization
+# after changing the current mm, and deal with the special case of kthread ->
+# uthread (temporarily keeping current mm into active_mm) by issuing a
+# sync_core_before_usermode() in that specific case.
+#
+    -----------------------
+    |         arch |status|
+    -----------------------
+    |       alpha: | TODO |
+    |         arc: | TODO |
+    |         arm: | TODO |
+    |       arm64: |  ok  |
+    |    blackfin: | TODO |
+    |         c6x: | TODO |
+    |        cris: | TODO |
+    |         frv: | TODO |
+    |       h8300: | TODO |
+    |     hexagon: | TODO |
+    |        ia64: | TODO |
+    |        m32r: | TODO |
+    |        m68k: | TODO |
+    |       metag: | TODO |
+    |  microblaze: | TODO |
+    |        mips: | TODO |
+    |     mn10300: | TODO |
+    |       nios2: | TODO |
+    |    openrisc: | TODO |
+    |      parisc: | TODO |
+    |     powerpc: | TODO |
+    |        s390: | TODO |
+    |       score: | TODO |
+    |          sh: | TODO |
+    |       sparc: | TODO |
+    |        tile: | TODO |
+    |          um: | TODO |
+    |   unicore32: | TODO |
+    |         x86: |  ok  |
+    |      xtensa: | TODO |
+    -----------------------

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

* [tip:core/core] Documentation/features: Allow comments in arch features files
  2018-02-10 17:00   ` [PATCH for 4.16] Documentation: Allow comments in arch features files Mathieu Desnoyers
@ 2018-02-11 12:12     ` tip-bot for Mathieu Desnoyers
  0 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Mathieu Desnoyers @ 2018-02-11 12:12 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, linux-kernel, mathieu.desnoyers, torvalds, corbet, hpa,
	peterz, tglx

Commit-ID:  26be459c9c4431984ad4b576f975ce6d3184d71d
Gitweb:     https://git.kernel.org/tip/26be459c9c4431984ad4b576f975ce6d3184d71d
Author:     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
AuthorDate: Sat, 10 Feb 2018 12:00:58 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 11 Feb 2018 12:18:50 +0100

Documentation/features: Allow comments in arch features files

The list-arch.sh script considers lines beginning with "#" as match for
the feature table.

Given that those tables are never in lines beginning with "#",
add a reverse grep on "^#" when matching the "ok/TODO" state of
the architecture.

This allows adding comments within the feature files, for instance
describing the architecture requirements for the feature in each
architecture.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-doc@vger.kernel.org
Link: http://lkml.kernel.org/r/1518282058-24226-1-git-send-email-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 Documentation/features/list-arch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/features/list-arch.sh b/Documentation/features/list-arch.sh
index c16b5b5..1ec47c3 100755
--- a/Documentation/features/list-arch.sh
+++ b/Documentation/features/list-arch.sh
@@ -17,7 +17,7 @@ for F in */*/arch-support.txt; do
   N=$(grep -h "^# Feature name:"        $F | cut -c25-)
   C=$(grep -h "^#         Kconfig:"     $F | cut -c25-)
   D=$(grep -h "^#         description:" $F | cut -c25-)
-  S=$(grep -hw $ARCH $F | cut -d\| -f3)
+  S=$(grep -hv "^#" $F | grep -w $ARCH | cut -d\| -f3)
 
   printf "%10s/%-22s:%s| %35s # %s\n" "$SUBSYS" "$N" "$S" "$C" "$D"
 done

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

* [tip:core/core] Documentation/features, membarriers: Document membarrier-sync-core architecture support
  2018-02-09 20:30 [PATCH for 4.16] membarrier-sync-core: Document architecture support Mathieu Desnoyers
  2018-02-10 11:47 ` Ingo Molnar
  2018-02-11 12:08 ` [tip:sched/urgent] membarrier-sync-core: Document architecture support tip-bot for Mathieu Desnoyers
@ 2018-02-11 12:13 ` tip-bot for Mathieu Desnoyers
  2 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Mathieu Desnoyers @ 2018-02-11 12:13 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, corbet, mathieu.desnoyers, boqun.feng, paulmck, benh,
	mingo, ahh, sehr, luto, hpa, davejwatson, ghackmann, linux-kernel,
	maged.michael, avi, parri.andrea, torvalds, paulus, mpe,
	will.deacon, linux, tglx

Commit-ID:  ac65ddad4a23d46529f921fdf8f7b7b6d14a15d8
Gitweb:     https://git.kernel.org/tip/ac65ddad4a23d46529f921fdf8f7b7b6d14a15d8
Author:     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
AuthorDate: Fri, 9 Feb 2018 15:30:56 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 11 Feb 2018 12:19:03 +0100

Documentation/features, membarriers: Document membarrier-sync-core architecture support

Ensure we gather architecture requirements about each architecture
supporting the "sync_core" membarrier command in a single file under
Documentation/features.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrea Parri <parri.andrea@gmail.com>
Cc: Andrew Hunter <ahh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Avi Kivity <avi@scylladb.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Dave Watson <davejwatson@fb.com>
Cc: David Sehr <sehr@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maged Michael <maged.michael@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Link: http://lkml.kernel.org/r/1518208256-22034-1-git-send-email-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 .../sched/membarrier-sync-core/arch-support.txt    | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/Documentation/features/sched/membarrier-sync-core/arch-support.txt b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
new file mode 100644
index 0000000..2c815a7
--- /dev/null
+++ b/Documentation/features/sched/membarrier-sync-core/arch-support.txt
@@ -0,0 +1,62 @@
+#
+# Feature name:          membarrier-sync-core
+#         Kconfig:       ARCH_HAS_MEMBARRIER_SYNC_CORE
+#         description:   arch supports core serializing membarrier
+#
+# Architecture requirements
+#
+# * arm64
+#
+# Rely on eret context synchronization when returning from IPI handler, and
+# when returning to user-space.
+#
+# * x86
+#
+# x86-32 uses IRET as return from interrupt, which takes care of the IPI.
+# However, it uses both IRET and SYSEXIT to go back to user-space. The IRET
+# instruction is core serializing, but not SYSEXIT.
+#
+# x86-64 uses IRET as return from interrupt, which takes care of the IPI.
+# However, it can return to user-space through either SYSRETL (compat code),
+# SYSRETQ, or IRET.
+#
+# Given that neither SYSRET{L,Q}, nor SYSEXIT, are core serializing, we rely
+# instead on write_cr3() performed by switch_mm() to provide core serialization
+# after changing the current mm, and deal with the special case of kthread ->
+# uthread (temporarily keeping current mm into active_mm) by issuing a
+# sync_core_before_usermode() in that specific case.
+#
+    -----------------------
+    |         arch |status|
+    -----------------------
+    |       alpha: | TODO |
+    |         arc: | TODO |
+    |         arm: | TODO |
+    |       arm64: |  ok  |
+    |    blackfin: | TODO |
+    |         c6x: | TODO |
+    |        cris: | TODO |
+    |         frv: | TODO |
+    |       h8300: | TODO |
+    |     hexagon: | TODO |
+    |        ia64: | TODO |
+    |        m32r: | TODO |
+    |        m68k: | TODO |
+    |       metag: | TODO |
+    |  microblaze: | TODO |
+    |        mips: | TODO |
+    |     mn10300: | TODO |
+    |       nios2: | TODO |
+    |    openrisc: | TODO |
+    |      parisc: | TODO |
+    |     powerpc: | TODO |
+    |        s390: | TODO |
+    |       score: | TODO |
+    |          sh: | TODO |
+    |       sparc: | TODO |
+    |        tile: | TODO |
+    |          um: | TODO |
+    |   unicore32: | TODO |
+    |         x86: |  ok  |
+    |      xtensa: | TODO |
+    -----------------------

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

end of thread, other threads:[~2018-02-12  2:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-09 20:30 [PATCH for 4.16] membarrier-sync-core: Document architecture support Mathieu Desnoyers
2018-02-10 11:47 ` Ingo Molnar
2018-02-10 17:00   ` [PATCH for 4.16] Documentation: Allow comments in arch features files Mathieu Desnoyers
2018-02-11 12:12     ` [tip:core/core] Documentation/features: " tip-bot for Mathieu Desnoyers
2018-02-11 12:08 ` [tip:sched/urgent] membarrier-sync-core: Document architecture support tip-bot for Mathieu Desnoyers
2018-02-11 12:13 ` [tip:core/core] Documentation/features, membarriers: Document membarrier-sync-core " tip-bot for Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).