mm/treewide: rename CONFIG_HAVE_FAST_GUP to CONFIG_HAVE_GUP_FAST
authorDavid Hildenbrand <david@redhat.com>
Tue, 2 Apr 2024 12:55:15 +0000 (14:55 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:41 +0000 (20:56 -0700)
Nowadays, we call it "GUP-fast", the external interface includes functions
like "get_user_pages_fast()", and we renamed all internal functions to
reflect that as well.

Let's make the config option reflect that.

Link: https://lkml.kernel.org/r/20240402125516.223131-3-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
14 files changed:
arch/arm/Kconfig
arch/arm64/Kconfig
arch/loongarch/Kconfig
arch/mips/Kconfig
arch/powerpc/Kconfig
arch/riscv/Kconfig
arch/s390/Kconfig
arch/sh/Kconfig
arch/x86/Kconfig
include/linux/rmap.h
kernel/events/core.c
mm/Kconfig
mm/gup.c
mm/internal.h

index b14aed3a17abb6732e0b87d3ba1b4edc260e7f0e..817918f6635a50e7de585648ca688b7e2e09a4d4 100644 (file)
@@ -99,7 +99,7 @@ config ARM
        select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
        select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
        select HAVE_EXIT_THREAD
-       select HAVE_FAST_GUP if ARM_LPAE
+       select HAVE_GUP_FAST if ARM_LPAE
        select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
        select HAVE_FUNCTION_ERROR_INJECTION
        select HAVE_FUNCTION_GRAPH_TRACER
index 7b11c98b3e84bf76bcd6a33b34af257a9b7f48d7..de076a191e9fd6a2251dc34fb96bf1c889c0f2d2 100644 (file)
@@ -205,7 +205,7 @@ config ARM64
        select HAVE_SAMPLE_FTRACE_DIRECT
        select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
-       select HAVE_FAST_GUP
+       select HAVE_GUP_FAST
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_ERROR_INJECTION
index a5f300ec6f2808b8890ebc27d0de8a918eaa8636..cd642eefd9e51f0451e00601ab0f01fb63a993f3 100644 (file)
@@ -119,7 +119,7 @@ config LOONGARCH
        select HAVE_EBPF_JIT
        select HAVE_EFFICIENT_UNALIGNED_ACCESS if !ARCH_STRICT_ALIGN
        select HAVE_EXIT_THREAD
-       select HAVE_FAST_GUP
+       select HAVE_GUP_FAST
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_ARG_ACCESS_API
        select HAVE_FUNCTION_ERROR_INJECTION
index 516dc7022bd74a46a9187019ba37618f9aeb2b00..f1aa1bf11166bcb4ba09f8dac16e92e402ccad47 100644 (file)
@@ -68,7 +68,7 @@ config MIPS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_EBPF_JIT if !CPU_MICROMIPS
        select HAVE_EXIT_THREAD
-       select HAVE_FAST_GUP
+       select HAVE_GUP_FAST
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_TRACER
index 1c4be337368604a78d0dd901a68f308493e1a021..e42cc8cd415ff4e150ff6afb03acee0e5ee6e73c 100644 (file)
@@ -236,7 +236,7 @@ config PPC
        select HAVE_DYNAMIC_FTRACE_WITH_REGS    if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
        select HAVE_EBPF_JIT
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
-       select HAVE_FAST_GUP
+       select HAVE_GUP_FAST
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_ARG_ACCESS_API
        select HAVE_FUNCTION_DESCRIPTORS        if PPC64_ELF_ABI_V1
index be09c8836d56be91d24a768cbe3a2411423716f6..3ee60ddef93ebf0a8f182d2f3f4f6b18f99a5364 100644 (file)
@@ -132,7 +132,7 @@ config RISCV
        select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_TRACER if !XIP_KERNEL && !PREEMPTION
        select HAVE_EBPF_JIT if MMU
-       select HAVE_FAST_GUP if MMU
+       select HAVE_GUP_FAST if MMU
        select HAVE_FUNCTION_ARG_ACCESS_API
        select HAVE_FUNCTION_ERROR_INJECTION
        select HAVE_GCC_PLUGINS
index 8f01ada6845e36086d85c32a076c8057208e498c..d9aed4c93ee6711d0caf81d9bd4dde2dce2fefd9 100644 (file)
@@ -174,7 +174,7 @@ config S390
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
        select HAVE_EBPF_JIT if HAVE_MARCH_Z196_FEATURES
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
-       select HAVE_FAST_GUP
+       select HAVE_GUP_FAST
        select HAVE_FENTRY
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_ARG_ACCESS_API
index 2ad3e29f0ebec416f42f28ac09c651ef9da74614..7292542f75e8ba6fc6c3465de5a201fcba9d2e72 100644 (file)
@@ -38,7 +38,7 @@ config SUPERH
        select HAVE_DEBUG_BUGVERBOSE
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DYNAMIC_FTRACE
-       select HAVE_FAST_GUP if MMU
+       select HAVE_GUP_FAST if MMU
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_FUNCTION_TRACER
        select HAVE_FTRACE_MCOUNT_RECORD
index 4474bf32d0a4970daec7fad3f12f8aa4a9e43871..d95de5eab213cb7bf1a3f232f233e1a0edba9303 100644 (file)
@@ -221,7 +221,7 @@ config X86
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
        select HAVE_EISA
        select HAVE_EXIT_THREAD
-       select HAVE_FAST_GUP
+       select HAVE_GUP_FAST
        select HAVE_FENTRY                      if X86_64 || DYNAMIC_FTRACE
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_FUNCTION_GRAPH_RETVAL       if HAVE_FUNCTION_GRAPH_TRACER
index b7944a833668a790e6d93c6d211b864c8458175d..9bf9324214fc3f4ef5ff3f735419db637bf7c745 100644 (file)
@@ -284,7 +284,7 @@ static inline int hugetlb_try_share_anon_rmap(struct folio *folio)
        VM_WARN_ON_FOLIO(!PageAnonExclusive(&folio->page), folio);
 
        /* Paired with the memory barrier in try_grab_folio(). */
-       if (IS_ENABLED(CONFIG_HAVE_FAST_GUP))
+       if (IS_ENABLED(CONFIG_HAVE_GUP_FAST))
                smp_mb();
 
        if (unlikely(folio_maybe_dma_pinned(folio)))
@@ -295,7 +295,7 @@ static inline int hugetlb_try_share_anon_rmap(struct folio *folio)
         * This is conceptually a smp_wmb() paired with the smp_rmb() in
         * gup_must_unshare().
         */
-       if (IS_ENABLED(CONFIG_HAVE_FAST_GUP))
+       if (IS_ENABLED(CONFIG_HAVE_GUP_FAST))
                smp_mb__after_atomic();
        return 0;
 }
@@ -541,7 +541,7 @@ static __always_inline int __folio_try_share_anon_rmap(struct folio *folio,
         */
 
        /* Paired with the memory barrier in try_grab_folio(). */
-       if (IS_ENABLED(CONFIG_HAVE_FAST_GUP))
+       if (IS_ENABLED(CONFIG_HAVE_GUP_FAST))
                smp_mb();
 
        if (unlikely(folio_maybe_dma_pinned(folio)))
@@ -552,7 +552,7 @@ static __always_inline int __folio_try_share_anon_rmap(struct folio *folio,
         * This is conceptually a smp_wmb() paired with the smp_rmb() in
         * gup_must_unshare().
         */
-       if (IS_ENABLED(CONFIG_HAVE_FAST_GUP))
+       if (IS_ENABLED(CONFIG_HAVE_GUP_FAST))
                smp_mb__after_atomic();
        return 0;
 }
index 724e6d7e128f3766f89791861c258fb317297216..c5a0dc1f135f028918b17e7dfc779256d7554f80 100644 (file)
@@ -7539,7 +7539,7 @@ static u64 perf_get_pgtable_size(struct mm_struct *mm, unsigned long addr)
 {
        u64 size = 0;
 
-#ifdef CONFIG_HAVE_FAST_GUP
+#ifdef CONFIG_HAVE_GUP_FAST
        pgd_t *pgdp, pgd;
        p4d_t *p4dp, p4d;
        pud_t *pudp, pud;
@@ -7587,7 +7587,7 @@ again:
        if (pte_present(pte))
                size = pte_leaf_size(pte);
        pte_unmap(ptep);
-#endif /* CONFIG_HAVE_FAST_GUP */
+#endif /* CONFIG_HAVE_GUP_FAST */
 
        return size;
 }
index f0ed3168db004624f747b0c318a350f3c85be726..50df323eaecef026f9a6baddee54cfb0bb7c4499 100644 (file)
@@ -473,7 +473,7 @@ config ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
 config HAVE_MEMBLOCK_PHYS_MAP
        bool
 
-config HAVE_FAST_GUP
+config HAVE_GUP_FAST
        depends on MMU
        bool
 
index 7609efc55f1c32dbc114faae1abb39056a3ffb80..8dcbeae714e268356dc06fa8f11014f2535f8a75 100644 (file)
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -501,7 +501,7 @@ static inline void mm_set_has_pinned_flag(unsigned long *mm_flags)
 
 #ifdef CONFIG_MMU
 
-#if defined(CONFIG_ARCH_HAS_HUGEPD) || defined(CONFIG_HAVE_FAST_GUP)
+#if defined(CONFIG_ARCH_HAS_HUGEPD) || defined(CONFIG_HAVE_GUP_FAST)
 static int record_subpages(struct page *page, unsigned long sz,
                           unsigned long addr, unsigned long end,
                           struct page **pages)
@@ -515,7 +515,7 @@ static int record_subpages(struct page *page, unsigned long sz,
 
        return nr;
 }
-#endif /* CONFIG_ARCH_HAS_HUGEPD || CONFIG_HAVE_FAST_GUP */
+#endif /* CONFIG_ARCH_HAS_HUGEPD || CONFIG_HAVE_GUP_FAST */
 
 #ifdef CONFIG_ARCH_HAS_HUGEPD
 static unsigned long hugepte_addr_end(unsigned long addr, unsigned long end,
@@ -2782,7 +2782,7 @@ EXPORT_SYMBOL(get_user_pages_unlocked);
  *
  * This code is based heavily on the PowerPC implementation by Nick Piggin.
  */
-#ifdef CONFIG_HAVE_FAST_GUP
+#ifdef CONFIG_HAVE_GUP_FAST
 
 /*
  * Used in the GUP-fast path to determine whether GUP is permitted to work on
@@ -3361,7 +3361,7 @@ static inline void gup_fast_pgd_range(unsigned long addr, unsigned long end,
                unsigned int flags, struct page **pages, int *nr)
 {
 }
-#endif /* CONFIG_HAVE_FAST_GUP */
+#endif /* CONFIG_HAVE_GUP_FAST */
 
 #ifndef gup_fast_permitted
 /*
@@ -3381,7 +3381,7 @@ static unsigned long gup_fast(unsigned long start, unsigned long end,
        int nr_pinned = 0;
        unsigned seq;
 
-       if (!IS_ENABLED(CONFIG_HAVE_FAST_GUP) ||
+       if (!IS_ENABLED(CONFIG_HAVE_GUP_FAST) ||
            !gup_fast_permitted(start, end))
                return 0;
 
index 640298a98a3cdae946c843d8324de3d9a6e434a1..8fd41f889a9587c91096e5a8de8ab02b38fa9a96 100644 (file)
@@ -1265,7 +1265,7 @@ static inline bool gup_must_unshare(struct vm_area_struct *vma,
        }
 
        /* Paired with a memory barrier in folio_try_share_anon_rmap_*(). */
-       if (IS_ENABLED(CONFIG_HAVE_FAST_GUP))
+       if (IS_ENABLED(CONFIG_HAVE_GUP_FAST))
                smp_rmb();
 
        /*