Skip to content

Commit

Permalink
mm: move the backup x_devmap() functions to asm-generic/pgtable.h
Browse files Browse the repository at this point in the history
The asm-generic/pgtable.h include file appears to be the correct place for
the backup x_devmap() inline functions.  Moving them here is also
necessary if we want to include x_devmap() in the [pmd|pud]_unstable
functions.  So move the x_devmap() functions to asm-generic/pgtable.h

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Hellstrom <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
thomashvmw authored and torvalds committed Dec 1, 2019
1 parent 30c4638 commit bf1a12a
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 15 additions & 0 deletions include/asm-generic/pgtable.h
Original file line number Diff line number Diff line change
@@ -914,6 +914,21 @@ static inline int pud_write(pud_t pud)
}
#endif /* pud_write */

#if !defined(CONFIG_ARCH_HAS_PTE_DEVMAP) || !defined(CONFIG_TRANSPARENT_HUGEPAGE)
static inline int pmd_devmap(pmd_t pmd)
{
return 0;
}
static inline int pud_devmap(pud_t pud)
{
return 0;
}
static inline int pgd_devmap(pgd_t pgd)
{
return 0;
}
#endif

#if !defined(CONFIG_TRANSPARENT_HUGEPAGE) || \
(defined(CONFIG_TRANSPARENT_HUGEPAGE) && \
!defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD))
15 changes: 0 additions & 15 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
@@ -564,21 +564,6 @@ int vma_is_stack_for_current(struct vm_area_struct *vma);
struct mmu_gather;
struct inode;

#if !defined(CONFIG_ARCH_HAS_PTE_DEVMAP) || !defined(CONFIG_TRANSPARENT_HUGEPAGE)
static inline int pmd_devmap(pmd_t pmd)
{
return 0;
}
static inline int pud_devmap(pud_t pud)
{
return 0;
}
static inline int pgd_devmap(pgd_t pgd)
{
return 0;
}
#endif

/*
* FIXME: take this include out, include page-flags.h in
* files which need it (119 of them)

0 comments on commit bf1a12a

Please sign in to comment.