diff options
| author | Linus Torvalds <[email protected]> | 2025-09-26 21:39:12 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2025-09-26 21:39:12 +0000 |
| commit | fec734e8d564d55fb6bd4909ae2e68814d21d0a1 (patch) | |
| tree | fdaea3cad77c06ee800a09444c42af50dfa4a5ab | |
| parent | Merge tag 'x86-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
| parent | MAINTAINERS: Update Paul Walmsley's E-mail address (diff) | |
| download | kernel-fec734e8d564d55fb6bd4909ae2e68814d21d0a1.tar.gz kernel-fec734e8d564d55fb6bd4909ae2e68814d21d0a1.zip | |
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()
| -rw-r--r-- | MAINTAINERS | 8 | ||||
| -rw-r--r-- | arch/riscv/include/asm/pgtable.h | 17 |
2 files changed, 21 insertions, 4 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index cfffa6c3bdf1..35dac69ec0d5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1772,7 +1772,7 @@ F: drivers/staging/iio/*/ad* X: drivers/iio/*/adjd* ANALOGBITS PLL LIBRARIES -M: Paul Walmsley <[email protected]> +M: Paul Walmsley <[email protected]> M: Samuel Holland <[email protected]> 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 <[email protected]> +M: Paul Walmsley <[email protected]> M: Greentime Hu <[email protected]> M: Samuel Holland <[email protected]> @@ -21656,7 +21656,7 @@ F: Documentation/devicetree/bindings/timer/andestech,plmt0.yaml F: arch/riscv/boot/dts/andes/ RISC-V ARCHITECTURE -M: Paul Walmsley <[email protected]> +M: Paul Walmsley <[email protected]> M: Palmer Dabbelt <[email protected]> M: Albert Ou <[email protected]> R: Alexandre Ghiti <[email protected]> @@ -23108,7 +23108,7 @@ S: Maintained F: drivers/watchdog/simatic-ipc-wdt.c SIFIVE DRIVERS -M: Paul Walmsley <[email protected]> +M: Paul Walmsley <[email protected]> M: Samuel Holland <[email protected]> S: Supported diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 91697fbf1f90..815067742939 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -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)); |
