--- zzzz-none-000/linux-3.10.107/include/asm-generic/pgtable.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/include/asm-generic/pgtable.h 2021-11-10 11:53:56.000000000 +0000 @@ -30,8 +30,10 @@ #endif #ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG -static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, - unsigned long address, +static inline int ptep_test_and_clear_young(struct vm_area_struct *vma + __maybe_unused, + unsigned long address + __maybe_unused, pte_t *ptep) { pte_t pte = *ptep; @@ -59,9 +61,11 @@ return r; } #else /* CONFIG_TRANSPARENT_HUGEPAGE */ -static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma, - unsigned long address, - pmd_t *pmdp) +static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma + __maybe_unused, + unsigned long address + __maybe_unused, + pmd_t *pmdp __maybe_unused) { BUG(); return 0; @@ -80,8 +84,8 @@ #endif #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR -static inline pte_t ptep_get_and_clear(struct mm_struct *mm, - unsigned long address, +static inline pte_t ptep_get_and_clear(struct mm_struct *mm __maybe_unused, + unsigned long address __maybe_unused, pte_t *ptep) { pte_t pte = *ptep; @@ -106,7 +110,7 @@ #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long address, pte_t *ptep, - int full) + int full __maybe_unused) { pte_t pte; pte = ptep_get_and_clear(mm, address, ptep); @@ -120,10 +124,10 @@ * not present, or in the process of an address space destruction. */ #ifndef __HAVE_ARCH_PTE_CLEAR_NOT_PRESENT_FULL -static inline void pte_clear_not_present_full(struct mm_struct *mm, - unsigned long address, - pte_t *ptep, - int full) +static inline void pte_clear_not_present_full( + struct mm_struct *mm __maybe_unused, + unsigned long address __maybe_unused, + pte_t *ptep, int full __maybe_unused) { pte_clear(mm, address, ptep); } @@ -143,7 +147,9 @@ #ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT struct mm_struct; -static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep) +static inline void ptep_set_wrprotect(struct mm_struct *mm __maybe_unused, + unsigned long address __maybe_unused, + pte_t *ptep) { pte_t old_pte = *ptep; set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); @@ -159,8 +165,9 @@ set_pmd_at(mm, address, pmdp, pmd_wrprotect(old_pmd)); } #else /* CONFIG_TRANSPARENT_HUGEPAGE */ -static inline void pmdp_set_wrprotect(struct mm_struct *mm, - unsigned long address, pmd_t *pmdp) +static inline void pmdp_set_wrprotect(struct mm_struct *mm __maybe_unused, + unsigned long address __maybe_unused, + pmd_t *pmdp __maybe_unused) { BUG(); } @@ -199,7 +206,8 @@ return pmd_val(pmd_a) == pmd_val(pmd_b); } #else /* CONFIG_TRANSPARENT_HUGEPAGE */ -static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b) +static inline int pmd_same(pmd_t pmd_a __maybe_unused, + pmd_t pmd_b __maybe_unused) { BUG(); return 0; @@ -314,8 +322,9 @@ return ptep_get_and_clear(mm, addr, ptep); } -static inline void __ptep_modify_prot_commit(struct mm_struct *mm, - unsigned long addr, +static inline void __ptep_modify_prot_commit(struct mm_struct *mm + __maybe_unused, + unsigned long addr __maybe_unused, pte_t *ptep, pte_t pte) { /* @@ -407,9 +416,11 @@ * track_pfn_remap is called when a _new_ pfn mapping is being established * by remap_pfn_range() for physical range indicated by pfn and size. */ -static inline int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot, - unsigned long pfn, unsigned long addr, - unsigned long size) +static inline int track_pfn_remap(struct vm_area_struct *vma __maybe_unused, + pgprot_t *prot __maybe_unused, + unsigned long pfn __maybe_unused, + unsigned long addr __maybe_unused, + unsigned long size __maybe_unused) { return 0; } @@ -418,8 +429,9 @@ * track_pfn_insert is called when a _new_ single pfn is established * by vm_insert_pfn(). */ -static inline int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, - unsigned long pfn) +static inline int track_pfn_insert(struct vm_area_struct *vma __maybe_unused, + pgprot_t *prot __maybe_unused, + unsigned long pfn __maybe_unused) { return 0; } @@ -428,7 +440,7 @@ * track_pfn_copy is called when vma that is covering the pfnmap gets * copied through copy_page_range(). */ -static inline int track_pfn_copy(struct vm_area_struct *vma) +static inline int track_pfn_copy(struct vm_area_struct *vma __maybe_unused) { return 0; } @@ -438,8 +450,9 @@ * untrack can be called for a specific region indicated by pfn and size or * can be for the entire vma (in which case pfn, size are zero). */ -static inline void untrack_pfn(struct vm_area_struct *vma, - unsigned long pfn, unsigned long size) +static inline void untrack_pfn(struct vm_area_struct *vma __maybe_unused, + unsigned long pfn __maybe_unused, + unsigned long size __maybe_unused) { } #else @@ -470,7 +483,7 @@ return pfn == zero_pfn; } -static inline unsigned long my_zero_pfn(unsigned long addr) +static inline unsigned long my_zero_pfn(unsigned long addr __maybe_unused) { extern unsigned long zero_pfn; return zero_pfn; @@ -480,16 +493,16 @@ #ifdef CONFIG_MMU #ifndef CONFIG_TRANSPARENT_HUGEPAGE -static inline int pmd_trans_huge(pmd_t pmd) +static inline int pmd_trans_huge(pmd_t pmd __maybe_unused) { return 0; } -static inline int pmd_trans_splitting(pmd_t pmd) +static inline int pmd_trans_splitting(pmd_t pmd __maybe_unused) { return 0; } #ifndef __HAVE_ARCH_PMD_WRITE -static inline int pmd_write(pmd_t pmd) +static inline int pmd_write(pmd_t pmd __maybe_unused) { BUG(); return 0; @@ -572,7 +585,7 @@ * become null, but then a page fault can map in a THP and not a * regular page). */ -static inline int pmd_trans_unstable(pmd_t *pmd) +static inline int pmd_trans_unstable(pmd_t *pmd __maybe_unused) { #ifdef CONFIG_TRANSPARENT_HUGEPAGE return pmd_none_or_trans_huge_or_clear_bad(pmd); @@ -671,12 +684,12 @@ extern pmd_t pmd_mknuma(pmd_t pmd); #endif /* CONFIG_ARCH_USES_NUMA_PROT_NONE */ #else -static inline int pmd_numa(pmd_t pmd) +static inline int pmd_numa(pmd_t pmd __maybe_unused) { return 0; } -static inline int pte_numa(pte_t pte) +static inline int pte_numa(pte_t pte __maybe_unused) { return 0; }