mm/mglru: add dummy pmd_dirty()
JIRA: https://issues.redhat.com/browse/RHEL-25415 Conflicts: Not worried about unsupported arches. Minor drift in x86 (int vs bool on function). commit 533c67e6358406727145efae32882c4dc355d6c5 Author: Kinsey Ho <kinseyho@google.com> Date: Wed Dec 27 14:12:04 2023 +0000 mm/mglru: add dummy pmd_dirty() Add dummy pmd_dirty() for architectures that don't provide it. This is similar to commit 6617da8fb565 ("mm: add dummy pmd_young() for architectures not having it"). Link: https://lkml.kernel.org/r/20231227141205.2200125-5-kinseyho@google.com Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312210606.1Etqz3M4-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202312210042.xQEiqlEh-lkp@intel.com/ Signed-off-by: Kinsey Ho <kinseyho@google.com> Suggested-by: Yu Zhao <yuzhao@google.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Donet Tom <donettom@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
This commit is contained in:
parent
fa1a6eda86
commit
7ce066bb2b
|
@ -611,6 +611,7 @@ static inline pmd_t pmd_mkwrite(pmd_t pmd)
|
|||
return pmd;
|
||||
}
|
||||
|
||||
#define pmd_dirty pmd_dirty
|
||||
static inline int pmd_dirty(pmd_t pmd)
|
||||
{
|
||||
return !!(pmd_val(pmd) & _PAGE_MODIFIED);
|
||||
|
|
|
@ -526,6 +526,7 @@ static inline int pmd_write(pmd_t pmd)
|
|||
return pte_write(pmd_pte(pmd));
|
||||
}
|
||||
|
||||
#define pmd_dirty pmd_dirty
|
||||
static inline int pmd_dirty(pmd_t pmd)
|
||||
{
|
||||
return pte_dirty(pmd_pte(pmd));
|
||||
|
|
|
@ -784,6 +784,7 @@ static inline int pud_write(pud_t pud)
|
|||
return (pud_val(pud) & _REGION3_ENTRY_WRITE) != 0;
|
||||
}
|
||||
|
||||
#define pmd_dirty pmd_dirty
|
||||
static inline int pmd_dirty(pmd_t pmd)
|
||||
{
|
||||
return (pmd_val(pmd) & _SEGMENT_ENTRY_DIRTY) != 0;
|
||||
|
|
|
@ -705,6 +705,7 @@ static inline unsigned long pmd_write(pmd_t pmd)
|
|||
#define pud_write(pud) pte_write(__pte(pud_val(pud)))
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#define pmd_dirty pmd_dirty
|
||||
static inline unsigned long pmd_dirty(pmd_t pmd)
|
||||
{
|
||||
pte_t pte = __pte(pmd_val(pmd));
|
||||
|
|
|
@ -134,6 +134,7 @@ static inline int pte_young(pte_t pte)
|
|||
return pte_flags(pte) & _PAGE_ACCESSED;
|
||||
}
|
||||
|
||||
#define pmd_dirty pmd_dirty
|
||||
static inline int pmd_dirty(pmd_t pmd)
|
||||
{
|
||||
return pmd_flags(pmd) & _PAGE_DIRTY;
|
||||
|
|
|
@ -1042,6 +1042,13 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
|
|||
#define pgprot_decrypted(prot) (prot)
|
||||
#endif
|
||||
|
||||
#ifndef pmd_dirty
|
||||
static inline int pmd_dirty(pmd_t pmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A facility to provide lazy MMU batching. This allows PTE updates and
|
||||
* page invalidations to be delayed until a call to leave lazy MMU mode
|
||||
|
|
Loading…
Reference in New Issue