public inbox for kernelnewbies@kernelnewbies.org
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Wonhyuk Yang <vvghjk1234@gmail.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: arm64: Question about barriers with the mmu off
Date: Mon, 16 Nov 2020 21:14:28 -0500	[thread overview]
Message-ID: <213088.1605579268@turing-police> (raw)
In-Reply-To: <CAEcHRTre6z_16yLrpr-_m+mjeY4ZHCNzx=DQEhRnbhftM5sf-g@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 520 bytes --]

On Mon, 16 Nov 2020 20:58:52 +0900, Wonhyuk Yang said:

> str w0, [x1]
So we dirtied the cache line.
> dmb sys
> dc ivac, x1   // Invalidate potentially stale cache line

So we invalidate it.

> Is there any problem, if the dc operation precedes the store operation?

If you swap them, you get...

dc ivac,x1   // invalidate a cache line that's probably OK
str w0,[x1   // and now we do a store that leaves a possibly stale cache line

In other words, if you swap them you may leave an un-invalidated
stale cache line.


[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-11-17  2:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 11:58 arm64: Question about barriers with the mmu off Wonhyuk Yang
2020-11-17  2:14 ` Valdis Klētnieks [this message]
2020-11-17  3:00   ` Wonhyuk Yang
2020-11-17  3:45     ` Valdis Klētnieks
2020-11-17  5:08       ` Wonhyuk Yang
2020-11-17  6:25         ` Valdis Klētnieks
2020-11-18  0:53           ` Wonhyuk Yang

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=213088.1605579268@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=vvghjk1234@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox