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

x86/mm: Convert update_mmu_cache() and update_mmu_cache_pmd() to functions

Converting macros to functions unhide type problems before
changes will be integrated and trigger problems on other
architectures.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Kirill A. Shutemov and committed by
Ingo Molnar
602e0186 d59fe3f1

+12 -10
+12
arch/x86/include/asm/pgtable.h
··· 781 781 memcpy(dst, src, count * sizeof(pgd_t)); 782 782 } 783 783 784 + /* 785 + * The x86 doesn't have any external MMU info: the kernel page 786 + * tables contain all the necessary information. 787 + */ 788 + static inline void update_mmu_cache(struct vm_area_struct *vma, 789 + unsigned long addr, pte_t *ptep) 790 + { 791 + } 792 + static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, 793 + unsigned long addr, pmd_t *pmd) 794 + { 795 + } 784 796 785 797 #include <asm-generic/pgtable.h> 786 798 #endif /* __ASSEMBLY__ */
-7
arch/x86/include/asm/pgtable_32.h
··· 66 66 __flush_tlb_one((vaddr)); \ 67 67 } while (0) 68 68 69 - /* 70 - * The i386 doesn't have any external MMU info: the kernel page 71 - * tables contain all the necessary information. 72 - */ 73 - #define update_mmu_cache(vma, address, ptep) do { } while (0) 74 - #define update_mmu_cache_pmd(vma, address, pmd) do { } while (0) 75 - 76 69 #endif /* !__ASSEMBLY__ */ 77 70 78 71 /*
-3
arch/x86/include/asm/pgtable_64.h
··· 142 142 #define pte_offset_map(dir, address) pte_offset_kernel((dir), (address)) 143 143 #define pte_unmap(pte) ((void)(pte))/* NOP */ 144 144 145 - #define update_mmu_cache(vma, address, ptep) do { } while (0) 146 - #define update_mmu_cache_pmd(vma, address, pmd) do { } while (0) 147 - 148 145 /* Encode and de-code a swap entry */ 149 146 #if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE 150 147 #define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)