From: Paul Walmsley <pjw@kernel.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>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] riscv: Use an atomic xchg in pudp_huge_get_and_clear()
Date: Fri, 19 Sep 2025 19:39:43 -0600 (MDT) [thread overview]
Message-ID: <c8afb3b4-e5d5-628b-6bce-0b1b3137a667@kernel.org> (raw)
In-Reply-To: <20250814-dev-alex-thp_pud_xchg-v1-1-b4704dfae206@rivosinc.com>
Hi Alex,
On Thu, 14 Aug 2025, Alexandre Ghiti wrote:
> Make sure we return the right pud value and not a value that could
> have been overwritten in between by a different core.
>
> Fixes: c3cc2a4a3a23 ("riscv: Add support for PUD THP")
> Cc: stable@vger.kernel.org
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> ---
> Note that this will conflict with
> https://lore.kernel.org/linux-riscv/20250625063753.77511-1-ajd@linux.ibm.com/
> if applied after 6.17.
Two quick questions on this one:
- I see that you're using atomic_long_xchg() here and in some similar
functions in pgtable.h, rather than xchg(). Was curious about the
rationale for that?
- x86 avoids the xchg() for !CONFIG_SMP. Should we do the same?
thanks,
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-09-20 1:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 12:06 [PATCH] riscv: Use an atomic xchg in pudp_huge_get_and_clear() Alexandre Ghiti
2025-09-20 1:39 ` Paul Walmsley [this message]
2025-09-22 6:19 ` Alexandre Ghiti
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=c8afb3b4-e5d5-628b-6bce-0b1b3137a667@kernel.org \
--to=pjw@kernel.org \
--cc=alex@ghiti.fr \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=stable@vger.kernel.org \
/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