From: Michael Ellerman <mpe@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH 4/4] powerpc/64s: Use POWER10 stsync barrier for wmb()
Date: Tue, 13 Jun 2023 23:59:31 +1000 [thread overview]
Message-ID: <87wn07foos.fsf@mail.lhotse> (raw)
In-Reply-To: <20230609100026.8946-4-npiggin@gmail.com>
Nicholas Piggin <npiggin@gmail.com> writes:
> The most expensive ordering for hwsync to provide is the store-load
> barrier, because all prior stores have to be drained to the caches
> before subsequent instructions can complete.
>
> stsync just orders stores which means it can just be a barrer that
> goes down the store queue and orders draining, and does not prevent
> completion of subsequent instructions. So it should be faster than
> hwsync.
>
> Use stsync for wmb(). Older processors that don't recognise the SC
> field should treat this as hwsync.
qemu (7.1) emulating ppc64e does not :/
mpic: Setting up MPIC " OpenPIC " version 1.2 at fe0040000, max 1 CPUs
mpic: ISU size: 256, shift: 8, mask: ff
mpic: Initializing for 256 sources
Oops: Exception in kernel mode, sig: 4 [#1]
No more output.
(qemu) info registers │
NIP c000000000df4264 LR c0000000000ce49c CTR 0000000000000000 XER 0000000020000000 CPU#0 │
MSR 0000000080001000 HID0 0000000000000000 HF 24020006 iidx 1 didx 1 │
...
SRR0 c0000000000ce7c4 SRR1 0000000080081000 PVR 0000000080240020 VRSAVE 0000000000000000
$ objdump -d vmlinux | grep c0000000000ce7c4
c0000000000ce7c4: 7c 03 04 ac stsync
That's qemu -M ppce500 -cpu e5500 or e6500.
I guess just put it behind an #ifdef 64S.
cheers
next prev parent reply other threads:[~2023-06-13 14:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 10:00 [PATCH 1/4] powerpc: Make mmiowb a wmb Nicholas Piggin
2023-06-09 10:00 ` [PATCH 2/4] powerpc/64s: Add POWER10 store sync mnemonics Nicholas Piggin
2023-06-13 5:31 ` Joel Stanley
2023-06-14 5:31 ` Nicholas Piggin
2023-06-09 10:00 ` [PATCH 3/4] powerpc/64s: Use stncisync instruction for smp_wmb() when available Nicholas Piggin
2023-06-09 10:00 ` [PATCH 4/4] powerpc/64s: Use POWER10 stsync barrier for wmb() Nicholas Piggin
2023-06-13 13:59 ` Michael Ellerman [this message]
2023-06-14 5:56 ` Michael Ellerman
2023-06-15 1:53 ` Nicholas Piggin
2023-06-15 3:09 ` Michael Ellerman
2023-08-24 12:11 ` Michael Ellerman
2023-08-24 12:12 ` Michael Ellerman
2023-08-25 0:28 ` Joel Stanley
2023-08-25 6:59 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn07foos.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.