Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mm/thp: Abstraction for THP functions

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Aneesh Kumar K.V and committed by
Michael Ellerman
3df33f12 6a1ea362

+227 -180
+18 -5
arch/powerpc/include/asm/book3s/64/hash-64k.h
··· 119 119 #define H_PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE) 120 120 121 121 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 122 - extern unsigned long pmd_hugepage_update(struct mm_struct *mm, 123 - unsigned long addr, 124 - pmd_t *pmdp, 125 - unsigned long clr, 126 - unsigned long set); 127 122 static inline char *get_hpte_slot_array(pmd_t *pmdp) 128 123 { 129 124 /* ··· 188 193 return (((pmd_raw(pmd_a) ^ pmd_raw(pmd_b)) & ~cpu_to_be64(_PAGE_HPTEFLAGS)) == 0); 189 194 } 190 195 196 + static inline pmd_t hash__pmd_mkhuge(pmd_t pmd) 197 + { 198 + return __pmd(pmd_val(pmd) | (_PAGE_PTE | H_PAGE_THP_HUGE)); 199 + } 200 + 201 + extern unsigned long hash__pmd_hugepage_update(struct mm_struct *mm, 202 + unsigned long addr, pmd_t *pmdp, 203 + unsigned long clr, unsigned long set); 204 + extern pmd_t hash__pmdp_collapse_flush(struct vm_area_struct *vma, 205 + unsigned long address, pmd_t *pmdp); 206 + extern void hash__pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, 207 + pgtable_t pgtable); 208 + extern pgtable_t hash__pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp); 209 + extern void hash__pmdp_huge_split_prepare(struct vm_area_struct *vma, 210 + unsigned long address, pmd_t *pmdp); 211 + extern pmd_t hash__pmdp_huge_get_and_clear(struct mm_struct *mm, 212 + unsigned long addr, pmd_t *pmdp); 213 + extern int hash__has_transparent_hugepage(void); 191 214 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 192 215 #endif /* __ASSEMBLY__ */ 193 216
+6 -36
arch/powerpc/include/asm/book3s/64/pgtable-64k.h
··· 54 54 #endif /* CONFIG_HUGETLB_PAGE */ 55 55 56 56 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 57 - static inline int pmd_large(pmd_t pmd) 58 - { 59 - return !!(pmd_val(pmd) & _PAGE_PTE); 60 - } 61 - 62 - static inline pmd_t pmd_mknotpresent(pmd_t pmd) 63 - { 64 - return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT); 65 - } 66 - /* 67 - * For radix we should always find H_PAGE_HASHPTE zero. Hence 68 - * the below will work for radix too 69 - */ 70 - static inline int __pmdp_test_and_clear_young(struct mm_struct *mm, 71 - unsigned long addr, pmd_t *pmdp) 72 - { 73 - unsigned long old; 74 - 75 - if ((pmd_val(*pmdp) & (_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0) 76 - return 0; 77 - old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0); 78 - return ((old & _PAGE_ACCESSED) != 0); 79 - } 80 - 81 - #define __HAVE_ARCH_PMDP_SET_WRPROTECT 82 - static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr, 83 - pmd_t *pmdp) 84 - { 85 - 86 - if ((pmd_val(*pmdp) & _PAGE_WRITE) == 0) 87 - return; 88 - 89 - pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0); 90 - } 91 - 92 57 static inline int pmd_trans_huge(pmd_t pmd) 93 58 { 94 59 if (radix_enabled()) ··· 68 103 return radix__pmd_same(pmd_a, pmd_b); 69 104 return hash__pmd_same(pmd_a, pmd_b); 70 105 } 106 + 107 + static inline pmd_t pmd_mkhuge(pmd_t pmd) 108 + { 109 + return hash__pmd_mkhuge(pmd); 110 + } 111 + 71 112 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 72 113 73 114 static inline int remap_4k_pfn(struct vm_area_struct *vma, unsigned long addr, ··· 82 111 if (radix_enabled()) 83 112 BUG(); 84 113 return hash__remap_4k_pfn(vma, addr, pfn, prot); 85 - 86 114 } 87 115 #endif /* __ASSEMBLY__ */ 88 116 #endif /*_ASM_POWERPC_BOOK3S_64_PGTABLE_64K_H */
+71 -14
arch/powerpc/include/asm/book3s/64/pgtable.h
··· 769 769 static inline void vmemmap_remove_mapping(unsigned long start, 770 770 unsigned long page_size) 771 771 { 772 - 773 772 if (radix_enabled()) 774 773 return radix__vmemmap_remove_mapping(start, page_size); 775 774 return hash__vmemmap_remove_mapping(start, page_size); ··· 824 825 pmd_t *pmdp, pmd_t pmd); 825 826 extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, 826 827 pmd_t *pmd); 827 - extern int has_transparent_hugepage(void); 828 - 829 - static inline pmd_t pmd_mkhuge(pmd_t pmd) 828 + extern int hash__has_transparent_hugepage(void); 829 + static inline int has_transparent_hugepage(void) 830 830 { 831 - return __pmd(pmd_val(pmd) | (_PAGE_PTE | H_PAGE_THP_HUGE)); 831 + return hash__has_transparent_hugepage(); 832 + } 833 + 834 + static inline unsigned long 835 + pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, 836 + unsigned long clr, unsigned long set) 837 + { 838 + return hash__pmd_hugepage_update(mm, addr, pmdp, clr, set); 839 + } 840 + 841 + static inline int pmd_large(pmd_t pmd) 842 + { 843 + return !!(pmd_val(pmd) & _PAGE_PTE); 844 + } 845 + 846 + static inline pmd_t pmd_mknotpresent(pmd_t pmd) 847 + { 848 + return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT); 849 + } 850 + /* 851 + * For radix we should always find H_PAGE_HASHPTE zero. Hence 852 + * the below will work for radix too 853 + */ 854 + static inline int __pmdp_test_and_clear_young(struct mm_struct *mm, 855 + unsigned long addr, pmd_t *pmdp) 856 + { 857 + unsigned long old; 858 + 859 + if ((pmd_val(*pmdp) & (_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0) 860 + return 0; 861 + old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0); 862 + return ((old & _PAGE_ACCESSED) != 0); 863 + } 864 + 865 + #define __HAVE_ARCH_PMDP_SET_WRPROTECT 866 + static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr, 867 + pmd_t *pmdp) 868 + { 869 + 870 + if ((pmd_val(*pmdp) & _PAGE_WRITE) == 0) 871 + return; 872 + 873 + pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0); 832 874 } 833 875 834 876 #define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS ··· 882 842 unsigned long address, pmd_t *pmdp); 883 843 884 844 #define __HAVE_ARCH_PMDP_HUGE_GET_AND_CLEAR 885 - extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, 886 - unsigned long addr, pmd_t *pmdp); 845 + static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, 846 + unsigned long addr, pmd_t *pmdp) 847 + { 848 + return hash__pmdp_huge_get_and_clear(mm, addr, pmdp); 849 + } 887 850 888 - extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma, 889 - unsigned long address, pmd_t *pmdp); 851 + static inline pmd_t pmdp_collapse_flush(struct vm_area_struct *vma, 852 + unsigned long address, pmd_t *pmdp) 853 + { 854 + return hash__pmdp_collapse_flush(vma, address, pmdp); 855 + } 890 856 #define pmdp_collapse_flush pmdp_collapse_flush 891 857 892 858 #define __HAVE_ARCH_PGTABLE_DEPOSIT 893 - extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, 894 - pgtable_t pgtable); 859 + static inline void pgtable_trans_huge_deposit(struct mm_struct *mm, 860 + pmd_t *pmdp, pgtable_t pgtable) 861 + { 862 + return hash__pgtable_trans_huge_deposit(mm, pmdp, pgtable); 863 + } 864 + 895 865 #define __HAVE_ARCH_PGTABLE_WITHDRAW 896 - extern pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp); 866 + static inline pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, 867 + pmd_t *pmdp) 868 + { 869 + return hash__pgtable_trans_huge_withdraw(mm, pmdp); 870 + } 897 871 898 872 #define __HAVE_ARCH_PMDP_INVALIDATE 899 873 extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address, 900 874 pmd_t *pmdp); 901 875 902 876 #define __HAVE_ARCH_PMDP_HUGE_SPLIT_PREPARE 903 - extern void pmdp_huge_split_prepare(struct vm_area_struct *vma, 904 - unsigned long address, pmd_t *pmdp); 877 + static inline void pmdp_huge_split_prepare(struct vm_area_struct *vma, 878 + unsigned long address, pmd_t *pmdp) 879 + { 880 + return hash__pmdp_huge_split_prepare(vma, address, pmdp); 881 + } 905 882 906 883 #define pmd_move_must_withdraw pmd_move_must_withdraw 907 884 struct spinlock;
+1 -1
arch/powerpc/mm/Makefile
··· 14 14 obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(CONFIG_WORD_SIZE)e.o 15 15 hash64-$(CONFIG_PPC_NATIVE) := hash_native_64.o 16 16 obj-$(CONFIG_PPC_BOOK3E_64) += pgtable-book3e.o 17 - obj-$(CONFIG_PPC_STD_MMU_64) += pgtable-hash64.o hash_utils_64.o slb_low.o slb.o $(hash64-y) mmu_context_book3s64.o 17 + obj-$(CONFIG_PPC_STD_MMU_64) += pgtable-hash64.o hash_utils_64.o slb_low.o slb.o $(hash64-y) mmu_context_book3s64.o pgtable-book3s64.o 18 18 obj-$(CONFIG_PPC_RADIX_MMU) += pgtable-radix.o tlb-radix.o 19 19 obj-$(CONFIG_PPC_STD_MMU_32) += ppc_mmu_32.o hash_low_32.o mmu_context_hash32.o 20 20 obj-$(CONFIG_PPC_STD_MMU) += tlb_hash$(CONFIG_WORD_SIZE).o
+118
arch/powerpc/mm/pgtable-book3s64.c
··· 1 + /* 2 + * Copyright 2015-2016, Aneesh Kumar K.V, IBM Corporation. 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License 6 + * as published by the Free Software Foundation; either version 7 + * 2 of the License, or (at your option) any later version. 8 + */ 9 + 10 + #include <linux/sched.h> 11 + #include <asm/pgalloc.h> 12 + #include <asm/tlb.h> 13 + 14 + #include "mmu_decl.h" 15 + #include <trace/events/thp.h> 16 + 17 + #ifdef CONFIG_TRANSPARENT_HUGEPAGE 18 + /* 19 + * This is called when relaxing access to a hugepage. It's also called in the page 20 + * fault path when we don't hit any of the major fault cases, ie, a minor 21 + * update of _PAGE_ACCESSED, _PAGE_DIRTY, etc... The generic code will have 22 + * handled those two for us, we additionally deal with missing execute 23 + * permission here on some processors 24 + */ 25 + int pmdp_set_access_flags(struct vm_area_struct *vma, unsigned long address, 26 + pmd_t *pmdp, pmd_t entry, int dirty) 27 + { 28 + int changed; 29 + #ifdef CONFIG_DEBUG_VM 30 + WARN_ON(!pmd_trans_huge(*pmdp)); 31 + assert_spin_locked(&vma->vm_mm->page_table_lock); 32 + #endif 33 + changed = !pmd_same(*(pmdp), entry); 34 + if (changed) { 35 + __ptep_set_access_flags(pmdp_ptep(pmdp), pmd_pte(entry)); 36 + /* 37 + * Since we are not supporting SW TLB systems, we don't 38 + * have any thing similar to flush_tlb_page_nohash() 39 + */ 40 + } 41 + return changed; 42 + } 43 + 44 + int pmdp_test_and_clear_young(struct vm_area_struct *vma, 45 + unsigned long address, pmd_t *pmdp) 46 + { 47 + return __pmdp_test_and_clear_young(vma->vm_mm, address, pmdp); 48 + } 49 + /* 50 + * set a new huge pmd. We should not be called for updating 51 + * an existing pmd entry. That should go via pmd_hugepage_update. 52 + */ 53 + void set_pmd_at(struct mm_struct *mm, unsigned long addr, 54 + pmd_t *pmdp, pmd_t pmd) 55 + { 56 + #ifdef CONFIG_DEBUG_VM 57 + WARN_ON(pte_present(pmd_pte(*pmdp)) && !pte_protnone(pmd_pte(*pmdp))); 58 + assert_spin_locked(&mm->page_table_lock); 59 + WARN_ON(!pmd_trans_huge(pmd)); 60 + #endif 61 + trace_hugepage_set_pmd(addr, pmd_val(pmd)); 62 + return set_pte_at(mm, addr, pmdp_ptep(pmdp), pmd_pte(pmd)); 63 + } 64 + /* 65 + * We use this to invalidate a pmdp entry before switching from a 66 + * hugepte to regular pmd entry. 67 + */ 68 + void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address, 69 + pmd_t *pmdp) 70 + { 71 + pmd_hugepage_update(vma->vm_mm, address, pmdp, _PAGE_PRESENT, 0); 72 + 73 + /* 74 + * This ensures that generic code that rely on IRQ disabling 75 + * to prevent a parallel THP split work as expected. 76 + */ 77 + kick_all_cpus_sync(); 78 + } 79 + 80 + static pmd_t pmd_set_protbits(pmd_t pmd, pgprot_t pgprot) 81 + { 82 + return __pmd(pmd_val(pmd) | pgprot_val(pgprot)); 83 + } 84 + 85 + pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot) 86 + { 87 + unsigned long pmdv; 88 + 89 + pmdv = (pfn << PAGE_SHIFT) & PTE_RPN_MASK; 90 + return pmd_set_protbits(__pmd(pmdv), pgprot); 91 + } 92 + 93 + pmd_t mk_pmd(struct page *page, pgprot_t pgprot) 94 + { 95 + return pfn_pmd(page_to_pfn(page), pgprot); 96 + } 97 + 98 + pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) 99 + { 100 + unsigned long pmdv; 101 + 102 + pmdv = pmd_val(pmd); 103 + pmdv &= _HPAGE_CHG_MASK; 104 + return pmd_set_protbits(__pmd(pmdv), newprot); 105 + } 106 + 107 + /* 108 + * This is called at the end of handling a user page fault, when the 109 + * fault has been handled by updating a HUGE PMD entry in the linux page tables. 110 + * We use it to preload an HPTE into the hash table corresponding to 111 + * the updated linux HUGE PMD entry. 112 + */ 113 + void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, 114 + pmd_t *pmd) 115 + { 116 + return; 117 + } 118 + #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
+13 -124
arch/powerpc/mm/pgtable-hash64.c
··· 99 99 100 100 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 101 101 102 - /* 103 - * This is called when relaxing access to a hugepage. It's also called in the page 104 - * fault path when we don't hit any of the major fault cases, ie, a minor 105 - * update of _PAGE_ACCESSED, _PAGE_DIRTY, etc... The generic code will have 106 - * handled those two for us, we additionally deal with missing execute 107 - * permission here on some processors 108 - */ 109 - int pmdp_set_access_flags(struct vm_area_struct *vma, unsigned long address, 110 - pmd_t *pmdp, pmd_t entry, int dirty) 111 - { 112 - int changed; 113 - #ifdef CONFIG_DEBUG_VM 114 - WARN_ON(!pmd_trans_huge(*pmdp)); 115 - assert_spin_locked(&vma->vm_mm->page_table_lock); 116 - #endif 117 - changed = !pmd_same(*(pmdp), entry); 118 - if (changed) { 119 - __ptep_set_access_flags(pmdp_ptep(pmdp), pmd_pte(entry)); 120 - /* 121 - * Since we are not supporting SW TLB systems, we don't 122 - * have any thing similar to flush_tlb_page_nohash() 123 - */ 124 - } 125 - return changed; 126 - } 127 - 128 - unsigned long pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, 129 - pmd_t *pmdp, unsigned long clr, 130 - unsigned long set) 102 + unsigned long hash__pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, 103 + pmd_t *pmdp, unsigned long clr, 104 + unsigned long set) 131 105 { 132 106 __be64 old_be, tmp; 133 107 unsigned long old; ··· 132 158 return old; 133 159 } 134 160 135 - pmd_t pmdp_collapse_flush(struct vm_area_struct *vma, unsigned long address, 136 - pmd_t *pmdp) 161 + pmd_t hash__pmdp_collapse_flush(struct vm_area_struct *vma, unsigned long address, 162 + pmd_t *pmdp) 137 163 { 138 164 pmd_t pmd; 139 165 ··· 172 198 } 173 199 174 200 /* 175 - * We currently remove entries from the hashtable regardless of whether 176 - * the entry was young or dirty. 177 - * 178 - * We should be more intelligent about this but for the moment we override 179 - * these functions and force a tlb flush unconditionally 180 - */ 181 - int pmdp_test_and_clear_young(struct vm_area_struct *vma, 182 - unsigned long address, pmd_t *pmdp) 183 - { 184 - return __pmdp_test_and_clear_young(vma->vm_mm, address, pmdp); 185 - } 186 - 187 - /* 188 201 * We want to put the pgtable in pmd and use pgtable for tracking 189 202 * the base page size hptes 190 203 */ 191 - void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, 192 - pgtable_t pgtable) 204 + void hash__pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, 205 + pgtable_t pgtable) 193 206 { 194 207 pgtable_t *pgtable_slot; 195 208 assert_spin_locked(&mm->page_table_lock); ··· 194 233 smp_wmb(); 195 234 } 196 235 197 - pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp) 236 + pgtable_t hash__pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp) 198 237 { 199 238 pgtable_t pgtable; 200 239 pgtable_t *pgtable_slot; ··· 214 253 return pgtable; 215 254 } 216 255 217 - void pmdp_huge_split_prepare(struct vm_area_struct *vma, 218 - unsigned long address, pmd_t *pmdp) 256 + void hash__pmdp_huge_split_prepare(struct vm_area_struct *vma, 257 + unsigned long address, pmd_t *pmdp) 219 258 { 220 259 VM_BUG_ON(address & ~HPAGE_PMD_MASK); 221 260 VM_BUG_ON(REGION_ID(address) != USER_REGION_ID); ··· 233 272 * pgtable_t after this. 234 273 */ 235 274 pmd_hugepage_update(vma->vm_mm, address, pmdp, 0, _PAGE_PRIVILEGED); 236 - } 237 - 238 - 239 - /* 240 - * set a new huge pmd. We should not be called for updating 241 - * an existing pmd entry. That should go via pmd_hugepage_update. 242 - */ 243 - void set_pmd_at(struct mm_struct *mm, unsigned long addr, 244 - pmd_t *pmdp, pmd_t pmd) 245 - { 246 - #ifdef CONFIG_DEBUG_VM 247 - WARN_ON(pte_present(pmd_pte(*pmdp)) && !pte_protnone(pmd_pte(*pmdp))); 248 - assert_spin_locked(&mm->page_table_lock); 249 - WARN_ON(!pmd_trans_huge(pmd)); 250 - #endif 251 - trace_hugepage_set_pmd(addr, pmd_val(pmd)); 252 - return set_pte_at(mm, addr, pmdp_ptep(pmdp), pmd_pte(pmd)); 253 - } 254 - 255 - /* 256 - * We use this to invalidate a pmdp entry before switching from a 257 - * hugepte to regular pmd entry. 258 - */ 259 - void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address, 260 - pmd_t *pmdp) 261 - { 262 - pmd_hugepage_update(vma->vm_mm, address, pmdp, _PAGE_PRESENT, 0); 263 - 264 - /* 265 - * This ensures that generic code that rely on IRQ disabling 266 - * to prevent a parallel THP split work as expected. 267 - */ 268 - kick_all_cpus_sync(); 269 275 } 270 276 271 277 /* ··· 274 346 return flush_hash_hugepage(vsid, addr, pmdp, psize, ssize, flags); 275 347 } 276 348 277 - static pmd_t pmd_set_protbits(pmd_t pmd, pgprot_t pgprot) 278 - { 279 - return __pmd(pmd_val(pmd) | pgprot_val(pgprot)); 280 - } 281 - 282 - pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot) 283 - { 284 - unsigned long pmdv; 285 - 286 - pmdv = (pfn << PAGE_SHIFT) & PTE_RPN_MASK; 287 - return pmd_set_protbits(__pmd(pmdv), pgprot); 288 - } 289 - 290 - pmd_t mk_pmd(struct page *page, pgprot_t pgprot) 291 - { 292 - return pfn_pmd(page_to_pfn(page), pgprot); 293 - } 294 - 295 - pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) 296 - { 297 - unsigned long pmdv; 298 - 299 - pmdv = pmd_val(pmd); 300 - pmdv &= _HPAGE_CHG_MASK; 301 - return pmd_set_protbits(__pmd(pmdv), newprot); 302 - } 303 - 304 - /* 305 - * This is called at the end of handling a user page fault, when the 306 - * fault has been handled by updating a HUGE PMD entry in the linux page tables. 307 - * We use it to preload an HPTE into the hash table corresponding to 308 - * the updated linux HUGE PMD entry. 309 - */ 310 - void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, 311 - pmd_t *pmd) 312 - { 313 - return; 314 - } 315 - 316 - pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm, 317 - unsigned long addr, pmd_t *pmdp) 349 + pmd_t hash__pmdp_huge_get_and_clear(struct mm_struct *mm, 350 + unsigned long addr, pmd_t *pmdp) 318 351 { 319 352 pmd_t old_pmd; 320 353 pgtable_t pgtable; ··· 310 421 return old_pmd; 311 422 } 312 423 313 - int has_transparent_hugepage(void) 424 + int hash__has_transparent_hugepage(void) 314 425 { 315 426 316 427 if (!mmu_has_feature(MMU_FTR_16M_PAGE))