1. 18 Jul, 2022 40 commits
    • Miaohe Lin's avatar
      mm/huge_memory: try to free subpage in swapcache when possible · 0b175468
      Miaohe Lin authored
      Subpages in swapcache won't be freed even if it is the last user of the
      page until next time reclaim. It shouldn't hurt indeed, but we could try
      to free these pages to save more memory for system.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-12-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Muchun Song <songmuchun@bytedance.com>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      0b175468
    • Miaohe Lin's avatar
      mm/huge_memory: check pmd_present first in is_huge_zero_pmd · 3ce4fee4
      Miaohe Lin authored
      When pmd is non-present, pmd_pfn returns an insane value. So we should
      check pmd_present first to avoid acquiring such insane value and also
      avoid touching possible cold huge_zero_pfn cache line when pmd isn't
      present.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-11-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      3ce4fee4
    • Miaohe Lin's avatar
      mm/huge_memory: fix comment in zap_huge_pud · 74929079
      Miaohe Lin authored
      The comment about deposited pgtable is borrowed from zap_huge_pmd but
      there's no deposited pgtable stuff for huge pud in zap_huge_pud. Remove
      it to avoid confusion.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-10-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Muchun Song <songmuchun@bytedance.com>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      74929079
    • Miaohe Lin's avatar
      mm/huge_memory: use helper macro __ATTR_RW · 37139bb0
      Miaohe Lin authored
      Use helper macro __ATTR_RW to define use_zero_page_attr, defrag_attr and
      enabled_attr to make code more clear. Minor readability improvement.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-9-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      37139bb0
    • Miaohe Lin's avatar
      mm/huge_memory: use helper function vma_lookup in split_huge_pages_pid · 74ba2b38
      Miaohe Lin authored
      Use helper function vma_lookup to lookup the needed vma to simplify the
      code. Minor readability improvement.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-8-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      74ba2b38
    • Miaohe Lin's avatar
      mm/huge_memory: rename mmun_start to haddr in remove_migration_pmd · 4fba8f2a
      Miaohe Lin authored
      mmun_start indicates mmu_notifier start address but there's no mmu_notifier
      stuff in remove_migration_pmd. This will make it hard to get the meaning of
      mmun_start. Rename it to haddr to avoid confusing readers and also imporve
      readability.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-7-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      4fba8f2a
    • Miaohe Lin's avatar
      mm/huge_memory: use helper touch_pmd in huge_pmd_set_accessed · a69e4717
      Miaohe Lin authored
      Use helper touch_pmd to set pmd accessed to simplify the code and improve
      the readability. No functional change intended.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-6-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a69e4717
    • Miaohe Lin's avatar
      mm/huge_memory: use helper touch_pud in huge_pud_set_accessed · 5fe653e9
      Miaohe Lin authored
      Use helper touch_pud to set pud accessed to simplify the code and improve
      the readability. No functional change intended.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-5-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      5fe653e9
    • Miaohe Lin's avatar
      mm/huge_memory: fix comment of __pud_trans_huge_lock · d965e390
      Miaohe Lin authored
      __pud_trans_huge_lock returns page table lock pointer if a given pud maps
      a thp instead of 'true' since introduced. Fix corresponding comments.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-4-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Acked-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      d965e390
    • Miaohe Lin's avatar
      mm/huge_memory: access vm_page_prot with READ_ONCE in remove_migration_pmd · 4286f147
      Miaohe Lin authored
      vma->vm_page_prot is read lockless from the rmap_walk, it may be updated
      concurrently.  Using READ_ONCE to prevent the risk of reading intermediate
      values.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-3-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Muchun Song <songmuchun@bytedance.com>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Zach O'Keefe <zokeefe@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      4286f147
    • Miaohe Lin's avatar
      mm/huge_memory: use flush_pmd_tlb_range in move_huge_pmd · 7c38f181
      Miaohe Lin authored
      Patch series "A few cleanup patches for huge_memory", v3.
      
      This series contains a few cleaup patches to remove duplicated codes,
      add/use helper functions, fix some obsolete comments and so on.  More
      details can be found in the respective changelogs.
      
      
      This patch (of 16):
      
      Arches with special requirements for evicting THP backing TLB entries can
      implement flush_pmd_tlb_range.  Otherwise also, it can help optimize TLB
      flush in THP regime.  Using flush_pmd_tlb_range to take advantage of this
      in move_huge_pmd.
      
      Link: https://lkml.kernel.org/r/20220704132201.14611-1-linmiaohe@huawei.com
      Link: https://lkml.kernel.org/r/20220704132201.14611-2-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
      Reviewed-by: default avatarZach O'Keefe <zokeefe@google.com>
      Cc: Yang Shi <shy828301@gmail.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      7c38f181
    • Mike Rapoport's avatar
      ARM: head.S: rename PMD_ORDER to PMD_ENTRY_ORDER · 39114538
      Mike Rapoport authored
      PMD_ORDER denotes order of magnitude for a PMD entry, i.e PMD entry size
      is 2 ^ PMD_ORDER.
      
      Rename PMD_ORDER to PMD_ENTRY_ORDER to allow a generic definition of
      PMD_ORDER as order of a PMD allocation: (PMD_SHIFT - PAGE_SHIFT).
      
      Link: https://lkml.kernel.org/r/20220705154708.181258-16-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      39114538
    • Mike Rapoport's avatar
      xtensa: drop definition of PGD_ORDER · 64c5ed22
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PGD. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-15-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      64c5ed22
    • Mike Rapoport's avatar
      parisc: rename PGD_ORDER to PGD_TABLE_ORDER · 4501a7a0
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PGD.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-14-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      4501a7a0
    • Mike Rapoport's avatar
      loongarch: drop definition of PGD_ORDER · 418d5dad
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PGD. 
      Since its always hardwired to 0, simply drop it.
      
      [rppt@linux.ibm.com: drop extra BLANK() line in arch/loongarch/kernel/asm-offsets.c]
        Link: https://lkml.kernel.org/r/20220705154708.181258-13-rppt@kernel.org
      Link: https://lkml.kernel.org/r/20220703141203.147893-13-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarHuacai Chen <chenhuacai@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      418d5dad
    • Mike Rapoport's avatar
      loongarch: drop definition of PUD_ORDER · f05ecc68
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PUD. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-12-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      f05ecc68
    • Mike Rapoport's avatar
      loongarch: drop definition of PMD_ORDER · b7c0f2d4
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PMD. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-11-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      b7c0f2d4
    • Mike Rapoport's avatar
      loongarch: drop definition of PTE_ORDER · 1721b412
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PTE. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-10-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      1721b412
    • Mike Rapoport's avatar
      nios2: drop definition of PGD_ORDER · a6714e72
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PGD. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-9-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarDinh Nguyen <dinguyen@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a6714e72
    • Mike Rapoport's avatar
      nios2: drop definition of PTE_ORDER · bf0dc119
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PTE. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-8-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarDinh Nguyen <dinguyen@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      bf0dc119
    • Mike Rapoport's avatar
      mips: rename PGD_ORDER to PGD_TABLE_ORDER · bb5af4f6
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PGD.
      
      While at it remove unused defintion of _PGD_ORDER in asm-offsets.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-7-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      bb5af4f6
    • Mike Rapoport's avatar
      mips: drop definitions of PTE_ORDER · 6963c72d
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PTE. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-6-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      6963c72d
    • Mike Rapoport's avatar
      mips: rename PUD_ORDER to PUD_TABLE_ORDER · 8e20a4de
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PUD.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-5-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      8e20a4de
    • Matthew Wilcox (Oracle)'s avatar
      mips: rename PMD_ORDER to PMD_TABLE_ORDER · c94b14bd
      Matthew Wilcox (Oracle) authored
      This is the order of the page table allocation, not the order of a PMD.
      
      While at it remove unused defintion of _PMD_ORDER in asm-offsets.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-4-rppt@kernel.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      c94b14bd
    • Mike Rapoport's avatar
      csky: drop definition of PGD_ORDER · f7536442
      Mike Rapoport authored
      This is the order of the page table allocation, not the order of a PGD. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220703141203.147893-3-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      f7536442
    • Mike Rapoport's avatar
      csky: drop definition of PTE_ORDER · a008a300
      Mike Rapoport authored
      Patch series "arch: make PxD_ORDER generically available", v2.
      
      The question what does PxD_ORDER define raises from time to time and
      there is still a conflict between MIPS and DAX definitions.
      
      Some time ago Matthew Wilcox suggested to use PMD_TABLE_ORDER to define
      the order of page table allocation: 
      
      [1] https://lore.kernel.org/linux-arch/YPCJftSTUBEnq2lI@casper.infradead.org/
      
      The parisc patch made it in, but mips didn't. 
      Now mips defines from asm/include/pgtable.h were copied to loongarch which
      made it worse.
      
      Let's deal with it once and for all and rename PxD_ORDER defines to
      PxD_TABLE_ORDER or just drop them when the only possible order of page
      table is 0.
      
      
      This patch (of 15):
      
      This is the order of the page table allocation, not the order of a PTE. 
      Since its always hardwired to 0, simply drop it.
      
      Link: https://lkml.kernel.org/r/20220705154708.181258-1-rppt@kernel.org
      Link: https://lkml.kernel.org/r/20220703141203.147893-1-rppt@kernel.org
      Link: https://lkml.kernel.org/r/20220703141203.147893-2-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Xuerui Wang <kernel@xen0n.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a008a300
    • Anshuman Khandual's avatar
      mm/mmap: drop ARCH_HAS_VM_GET_PAGE_PROT · 3d923c5f
      Anshuman Khandual authored
      Now all the platforms enable ARCH_HAS_GET_PAGE_PROT.  They define and
      export own vm_get_page_prot() whether custom or standard
      DECLARE_VM_GET_PAGE_PROT.  Hence there is no need for default generic
      fallback for vm_get_page_prot().  Just drop this fallback and also
      ARCH_HAS_GET_PAGE_PROT mechanism.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-27-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      3d923c5f
    • Anshuman Khandual's avatar
      sh/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 34516fd8
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-26-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      34516fd8
    • Anshuman Khandual's avatar
      um/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 91a8da02
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-25-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      91a8da02
    • Anshuman Khandual's avatar
      arm/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · ca26f936
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-24-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      ca26f936
    • Anshuman Khandual's avatar
      arc/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 5d260625
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-23-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      5d260625
    • Anshuman Khandual's avatar
      m68k/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 6d0b9225
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-22-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      6d0b9225
    • Anshuman Khandual's avatar
      mips/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 499c1dd9
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-21-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      499c1dd9
    • Anshuman Khandual's avatar
      ia64/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · c619b82c
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-20-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      c619b82c
    • Anshuman Khandual's avatar
      s390/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · fd5d210f
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-19-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      fd5d210f
    • Anshuman Khandual's avatar
      csky/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 0d708360
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-18-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Acked-by: default avatarGuo Ren <guoren@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      0d708360
    • Anshuman Khandual's avatar
      riscv/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 4147b5e2
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-17-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      4147b5e2
    • Anshuman Khandual's avatar
      nios2/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 53e2fdee
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-16-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Acked-by: default avatarDinh Nguyen <dinguyen@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      53e2fdee
    • Anshuman Khandual's avatar
      alpha/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 4975f604
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-15-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      4975f604
    • Anshuman Khandual's avatar
      parisc/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 252358f1
      Anshuman Khandual authored
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-14-anshuman.khandual@arm.comSigned-off-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      252358f1