mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
Merge tag 'riscv-for-linus-6.16-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V updates from Palmer Dabbelt: - Support for the FWFT SBI extension, which is part of SBI 3.0 and a dependency for many new SBI and ISA extensions - Support for getrandom() in the VDSO - Support for mseal - Optimized routines for raid6 syndrome and recovery calculations - kexec_file() supports loading Image-formatted kernel binaries - Improvements to the instruction patching framework to allow for atomic instruction patching, along with rules as to how systems need to behave in order to function correctly - Support for a handful of new ISA extensions: Svinval, Zicbop, Zabha, some SiFive vendor extensions - Various fixes and cleanups, including: misaligned access handling, perf symbol mangling, module loading, PUD THPs, and improved uaccess routines * tag 'riscv-for-linus-6.16-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (69 commits) riscv: uaccess: Only restore the CSR_STATUS SUM bit RISC-V: vDSO: Wire up getrandom() vDSO implementation riscv: enable mseal sysmap for RV64 raid6: Add RISC-V SIMD syndrome and recovery calculations riscv: mm: Add support for Svinval extension RISC-V: Documentation: Add enough title underlines to CMODX riscv: Improve Kconfig help for RISCV_ISA_V_PREEMPTIVE MAINTAINERS: Update Atish's email address riscv: uaccess: do not do misaligned accesses in get/put_user() riscv: process: use unsigned int instead of unsigned long for put_user() riscv: make unsafe user copy routines use existing assembly routines riscv: hwprobe: export Zabha extension riscv: Make regs_irqs_disabled() more clear perf symbols: Ignore mapping symbols on riscv RISC-V: Kconfig: Fix help text of CMDLINE_EXTEND riscv: module: Optimize PLT/GOT entry counting riscv: Add support for PUD THP riscv: xchg: Prefetch the destination word for sc.w riscv: Add ARCH_HAS_PREFETCH[W] support with Zicbop riscv: Add support for Zicbop ...
This commit is contained in:
@@ -900,6 +900,103 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
|
||||
#define pmdp_collapse_flush pmdp_collapse_flush
|
||||
extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
|
||||
unsigned long address, pmd_t *pmdp);
|
||||
|
||||
static inline pud_t pud_wrprotect(pud_t pud)
|
||||
{
|
||||
return pte_pud(pte_wrprotect(pud_pte(pud)));
|
||||
}
|
||||
|
||||
static inline int pud_trans_huge(pud_t pud)
|
||||
{
|
||||
return pud_leaf(pud);
|
||||
}
|
||||
|
||||
static inline int pud_dirty(pud_t pud)
|
||||
{
|
||||
return pte_dirty(pud_pte(pud));
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkyoung(pud_t pud)
|
||||
{
|
||||
return pte_pud(pte_mkyoung(pud_pte(pud)));
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkold(pud_t pud)
|
||||
{
|
||||
return pte_pud(pte_mkold(pud_pte(pud)));
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkdirty(pud_t pud)
|
||||
{
|
||||
return pte_pud(pte_mkdirty(pud_pte(pud)));
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkclean(pud_t pud)
|
||||
{
|
||||
return pte_pud(pte_mkclean(pud_pte(pud)));
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkwrite(pud_t pud)
|
||||
{
|
||||
return pte_pud(pte_mkwrite_novma(pud_pte(pud)));
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkhuge(pud_t pud)
|
||||
{
|
||||
return pud;
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkdevmap(pud_t pud)
|
||||
{
|
||||
return pte_pud(pte_mkdevmap(pud_pte(pud)));
|
||||
}
|
||||
|
||||
static inline int pudp_set_access_flags(struct vm_area_struct *vma,
|
||||
unsigned long address, pud_t *pudp,
|
||||
pud_t entry, int dirty)
|
||||
{
|
||||
return ptep_set_access_flags(vma, address, (pte_t *)pudp, pud_pte(entry), dirty);
|
||||
}
|
||||
|
||||
static inline int pudp_test_and_clear_young(struct vm_area_struct *vma,
|
||||
unsigned long address, pud_t *pudp)
|
||||
{
|
||||
return ptep_test_and_clear_young(vma, address, (pte_t *)pudp);
|
||||
}
|
||||
|
||||
static inline int pud_young(pud_t pud)
|
||||
{
|
||||
return pte_young(pud_pte(pud));
|
||||
}
|
||||
|
||||
static inline void update_mmu_cache_pud(struct vm_area_struct *vma,
|
||||
unsigned long address, pud_t *pudp)
|
||||
{
|
||||
pte_t *ptep = (pte_t *)pudp;
|
||||
|
||||
update_mmu_cache(vma, address, ptep);
|
||||
}
|
||||
|
||||
static inline pud_t pudp_establish(struct vm_area_struct *vma,
|
||||
unsigned long address, pud_t *pudp, pud_t pud)
|
||||
{
|
||||
page_table_check_pud_set(vma->vm_mm, pudp, pud);
|
||||
return __pud(atomic_long_xchg((atomic_long_t *)pudp, pud_val(pud)));
|
||||
}
|
||||
|
||||
static inline pud_t pud_mkinvalid(pud_t pud)
|
||||
{
|
||||
return __pud(pud_val(pud) & ~(_PAGE_PRESENT | _PAGE_PROT_NONE));
|
||||
}
|
||||
|
||||
extern pud_t pudp_invalidate(struct vm_area_struct *vma, unsigned long address,
|
||||
pud_t *pudp);
|
||||
|
||||
static inline pud_t pud_modify(pud_t pud, pgprot_t newprot)
|
||||
{
|
||||
return pte_pud(pte_modify(pud_pte(pud), newprot));
|
||||
}
|
||||
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user