[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c8afb3b4-e5d5-628b-6bce-0b1b3137a667@kernel.org>
Date: Fri, 19 Sep 2025 19:39:43 -0600 (MDT)
From: Paul Walmsley <pjw@...nel.org>
To: Alexandre Ghiti <alexghiti@...osinc.com>
cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] riscv: Use an atomic xchg in pudp_huge_get_and_clear()
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@...r.kernel.org
> Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.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
Powered by blists - more mailing lists