• Peter Xu's avatar
    mm/arm: redefine pmd_huge() with pmd_leaf() · 6818135d
    Peter Xu authored
    Most of the archs already define these two APIs the same way.  ARM is more
    complicated in two aspects:
    
      - For pXd_huge() it's always checking against !PXD_TABLE_BIT, while for
        pXd_leaf() it's always checking against PXD_TYPE_SECT.
    
      - SECT/TABLE bits are defined differently on 2-level v.s. 3-level ARM
        pgtables, which makes the whole thing even harder to follow.
    
    Luckily, the second complexity should be hidden by the pmd_leaf()
    implementation against 2-level v.s. 3-level headers.  Invoke pmd_leaf()
    directly for pmd_huge(), to remove the first part of complexity.  This
    prepares to drop pXd_huge() API globally.
    
    When at it, drop the obsolete comments - it's outdated.
    
    Link: https://lkml.kernel.org/r/20240318200404.448346-8-peterx@redhat.com
    
    Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: Shawn Guo <shawnguo@kernel.org>
    Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Cc: Bjorn Andersson <andersson@kernel.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
    Cc: Fabio Estevam <festevam@denx.de>
    Cc: Alistair Popple <apopple@nvidia.com>
    Cc: Andreas Larsson <andreas@gaisler.com>
    Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jason Gunthorpe <jgg@nvidia.com>
    Cc: Lucas Stach <l.stach@pengutronix.de>
    Cc: Mark Salter <msalter@redhat.com>
    Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Mike Rapoport (IBM) <rppt@kernel.org>
    Cc: Muchun Song <muchun.song@linux.dev>
    Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
    Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
    Cc: Nicholas Piggin <npiggin@gmail.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Will Deacon <will@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    6818135d
hugetlbpage.c 516 Bytes