* [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering
@ 2020-07-16 19:38 Palmer Dabbelt
2020-07-16 22:38 ` Benjamin Herrenschmidt
2020-07-24 13:25 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2020-07-16 19:38 UTC (permalink / raw)
To: Will Deacon
Cc: mpe, benh, paulus, npiggin, msuchanek, tglx, bigeasy, jniethe5,
linuxppc-dev, linux-kernel, kernel-team, Palmer Dabbelt
From: Palmer Dabbelt <palmerdabbelt@google.com>
This primitive has been renamed, but because it was spelled incorrectly in the
first place it must have escaped the fixup patch. As far as I can tell this
logic is still correct: smp_mb__after_spinlock() uses the default smp_mb()
implementation, which is "sync" rather than "hwsync" but those are the same
(though I'm not that familiar with PowerPC).
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
arch/powerpc/kernel/entry_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index b3c9f15089b6..7b38b4daca93 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -357,7 +357,7 @@ _GLOBAL(_switch)
* kernel/sched/core.c).
*
* Uncacheable stores in the case of involuntary preemption must
- * be taken care of. The smp_mb__before_spin_lock() in __schedule()
+ * be taken care of. The smp_mb__after_spinlock() in __schedule()
* is implemented as hwsync on powerpc, which orders MMIO too. So
* long as there is an hwsync in the context switch path, it will
* be executed on the source CPU after the task has performed
--
2.28.0.rc0.105.gf9edc3c819-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering
2020-07-16 19:38 [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering Palmer Dabbelt
@ 2020-07-16 22:38 ` Benjamin Herrenschmidt
2020-07-24 13:25 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2020-07-16 22:38 UTC (permalink / raw)
To: Palmer Dabbelt, Will Deacon
Cc: mpe, paulus, npiggin, msuchanek, tglx, bigeasy, jniethe5,
linuxppc-dev, linux-kernel, kernel-team, Palmer Dabbelt
On Thu, 2020-07-16 at 12:38 -0700, Palmer Dabbelt wrote:
> From: Palmer Dabbelt <palmerdabbelt@google.com>
>
> This primitive has been renamed, but because it was spelled incorrectly in the
> first place it must have escaped the fixup patch. As far as I can tell this
> logic is still correct: smp_mb__after_spinlock() uses the default smp_mb()
> implementation, which is "sync" rather than "hwsync" but those are the same
> (though I'm not that familiar with PowerPC).
Typo ? That must be me ... :)
Looks fine. Yes, sync and hwsync are the same (by opposition to lwsync
which is lighter weight and doesn't order cache inhibited).
Cheers,
Ben.
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
> ---
> arch/powerpc/kernel/entry_64.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> index b3c9f15089b6..7b38b4daca93 100644
> --- a/arch/powerpc/kernel/entry_64.S
> +++ b/arch/powerpc/kernel/entry_64.S
> @@ -357,7 +357,7 @@ _GLOBAL(_switch)
> * kernel/sched/core.c).
> *
> * Uncacheable stores in the case of involuntary preemption must
> - * be taken care of. The smp_mb__before_spin_lock() in __schedule()
> + * be taken care of. The smp_mb__after_spinlock() in __schedule()
> * is implemented as hwsync on powerpc, which orders MMIO too. So
> * long as there is an hwsync in the context switch path, it will
> * be executed on the source CPU after the task has performed
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering
2020-07-16 19:38 [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering Palmer Dabbelt
2020-07-16 22:38 ` Benjamin Herrenschmidt
@ 2020-07-24 13:25 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2020-07-24 13:25 UTC (permalink / raw)
To: Palmer Dabbelt, Will Deacon
Cc: npiggin, tglx, bigeasy, jniethe5, msuchanek, paulus,
linuxppc-dev, Palmer Dabbelt, kernel-team, linux-kernel
On Thu, 16 Jul 2020 12:38:20 -0700, Palmer Dabbelt wrote:
> This primitive has been renamed, but because it was spelled incorrectly in the
> first place it must have escaped the fixup patch. As far as I can tell this
> logic is still correct: smp_mb__after_spinlock() uses the default smp_mb()
> implementation, which is "sync" rather than "hwsync" but those are the same
> (though I'm not that familiar with PowerPC).
Applied to powerpc/next.
[1/1] powerpc/64: Fix an out of date comment about MMIO ordering
https://git.kernel.org/powerpc/c/147c13413c04bc6a2bd76f2503402905e5e98cff
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-24 13:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 19:38 [PATCH] powerpc/64: Fix an out of date comment about MMIO ordering Palmer Dabbelt
2020-07-16 22:38 ` Benjamin Herrenschmidt
2020-07-24 13:25 ` Michael Ellerman
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).