From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Arnd Bergmann <arnd@arndb.de>, Dennis Zhou <dennis@kernel.org>,
Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
kasan-dev@googlegroups.com, linux-arch@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v2 1/2] mm: Introduce flush_cache_vmap_early()
Date: Wed, 13 Dec 2023 09:36:15 +0100 [thread overview]
Message-ID: <CAMuHMdWMuSBKHaPGKTf2pGdgsD5dMaxcrZw3Ox3G=ShjnOAKnQ@mail.gmail.com> (raw)
In-Reply-To: <20231212213457.132605-2-alexghiti@rivosinc.com>
On Tue, Dec 12, 2023 at 10:36 PM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
> The pcpu setup when using the page allocator sets up a new vmalloc
> mapping very early in the boot process, so early that it cannot use the
> flush_cache_vmap() function which may depend on structures not yet
> initialized (for example in riscv, we currently send an IPI to flush
> other cpus TLB).
>
> But on some architectures, we must call flush_cache_vmap(): for example,
> in riscv, some uarchs can cache invalid TLB entries so we need to flush
> the new established mapping to avoid taking an exception.
>
> So fix this by introducing a new function flush_cache_vmap_early() which
> is called right after setting the new page table entry and before
> accessing this new mapping. This new function implements a local flush
> tlb on riscv and is no-op for other architectures (same as today).
>
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> arch/m68k/include/asm/cacheflush_mm.h | 1 +
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2023-12-13 8:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 21:34 [PATCH v2 0/2] riscv: Enable percpu page first chunk allocator Alexandre Ghiti
2023-12-12 21:34 ` [PATCH v2 1/2] mm: Introduce flush_cache_vmap_early() Alexandre Ghiti
2023-12-13 8:36 ` Geert Uytterhoeven [this message]
2023-12-12 21:34 ` [PATCH v2 2/2] riscv: Enable pcpu page first chunk allocator Alexandre Ghiti
2023-12-14 8:40 ` [PATCH v2 0/2] riscv: Enable percpu " Dennis Zhou
2024-01-20 21:09 ` patchwork-bot+linux-riscv
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='CAMuHMdWMuSBKHaPGKTf2pGdgsD5dMaxcrZw3Ox3G=ShjnOAKnQ@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=akpm@linux-foundation.org \
--cc=alexghiti@rivosinc.com \
--cc=andreyknvl@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=cl@linux.com \
--cc=dennis@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=ryabinin.a.a@gmail.com \
--cc=tj@kernel.org \
--cc=vincenzo.frascino@arm.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;
as well as URLs for NNTP newsgroup(s).