Commit fec734e8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'riscv-for-linus-v6.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:

 - A race-free implementation of pudp_huge_get_and_clear() (based on the
   x86 code)

 - A MAINTAINERS update to my E-mail address

* tag 'riscv-for-linus-v6.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  MAINTAINERS: Update Paul Walmsley's E-mail address
  riscv: Use an atomic xchg in pudp_huge_get_and_clear()
parents d4df1748 e2410801
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1772,7 +1772,7 @@ F: drivers/staging/iio/*/ad*
X:	drivers/iio/*/adjd*
ANALOGBITS PLL LIBRARIES
M:	Paul Walmsley <paul.walmsley@sifive.com>
M:	Paul Walmsley <pjw@kernel.org>
M:	Samuel Holland <samuel.holland@sifive.com>
S:	Supported
F:	drivers/clk/analogbits/*
@@ -19296,7 +19296,7 @@ S: Maintained
F:	drivers/pci/controller/dwc/*layerscape*
PCI DRIVER FOR FU740
M:	Paul Walmsley <paul.walmsley@sifive.com>
M:	Paul Walmsley <pjw@kernel.org>
M:	Greentime Hu <greentime.hu@sifive.com>
M:	Samuel Holland <samuel.holland@sifive.com>
L:	linux-pci@vger.kernel.org
@@ -21656,7 +21656,7 @@ F: Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
F:	arch/riscv/boot/dts/andes/
RISC-V ARCHITECTURE
M:	Paul Walmsley <paul.walmsley@sifive.com>
M:	Paul Walmsley <pjw@kernel.org>
M:	Palmer Dabbelt <palmer@dabbelt.com>
M:	Albert Ou <aou@eecs.berkeley.edu>
R:	Alexandre Ghiti <alex@ghiti.fr>
@@ -23108,7 +23108,7 @@ S: Maintained
F:	drivers/watchdog/simatic-ipc-wdt.c
SIFIVE DRIVERS
M:	Paul Walmsley <paul.walmsley@sifive.com>
M:	Paul Walmsley <pjw@kernel.org>
M:	Samuel Holland <samuel.holland@sifive.com>
L:	linux-riscv@lists.infradead.org
S:	Supported
+17 −0
Original line number Diff line number Diff line
@@ -942,6 +942,23 @@ static inline int pudp_test_and_clear_young(struct vm_area_struct *vma,
	return ptep_test_and_clear_young(vma, address, (pte_t *)pudp);
}

#define __HAVE_ARCH_PUDP_HUGE_GET_AND_CLEAR
static inline pud_t pudp_huge_get_and_clear(struct mm_struct *mm,
					    unsigned long address,  pud_t *pudp)
{
#ifdef CONFIG_SMP
	pud_t pud = __pud(xchg(&pudp->pud, 0));
#else
	pud_t pud = *pudp;

	pud_clear(pudp);
#endif

	page_table_check_pud_clear(mm, pud);

	return pud;
}

static inline int pud_young(pud_t pud)
{
	return pte_young(pud_pte(pud));