Skip to content

Commit 9636f05

Browse files
xzpeterakpm00
authored andcommitted
mm/treewide: remove pXd_huge()
This API is not used anymore, drop it for the whole tree. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peter Xu <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Andreas Larsson <[email protected]> Cc: "Aneesh Kumar K.V" <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David S. Miller <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Konrad Dybcio <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Mark Salter <[email protected]> Cc: "Matthew Wilcox (Oracle)" <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Mike Rapoport (IBM) <[email protected]> Cc: Muchun Song <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: "Naveen N. Rao" <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Russell King <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 1965e93 commit 9636f05

File tree

17 files changed

+2
-198
lines changed

17 files changed

+2
-198
lines changed

arch/arm/mm/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ KASAN_SANITIZE_physaddr.o := n
2121
obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
2222

2323
obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o
24-
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
2524
obj-$(CONFIG_ARM_PV_FIXUP) += pv-fixup-asm.o
2625

2726
obj-$(CONFIG_CPU_ABRT_NOMMU) += abort-nommu.o

arch/arm/mm/hugetlbpage.c

Lines changed: 0 additions & 29 deletions
This file was deleted.

arch/arm64/mm/hugetlbpage.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,6 @@ bool arch_hugetlb_migration_supported(struct hstate *h)
7979
}
8080
#endif
8181

82-
int pmd_huge(pmd_t pmd)
83-
{
84-
return pmd_leaf(pmd);
85-
}
86-
87-
int pud_huge(pud_t pud)
88-
{
89-
return pud_leaf(pud);
90-
}
91-
9282
static int find_num_contig(struct mm_struct *mm, unsigned long addr,
9383
pte_t *ptep, size_t *pgsize)
9484
{

arch/loongarch/mm/hugetlbpage.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
5050
return (pte_t *) pmd;
5151
}
5252

53-
int pmd_huge(pmd_t pmd)
54-
{
55-
return (pmd_val(pmd) & _PAGE_HUGE) != 0;
56-
}
57-
58-
int pud_huge(pud_t pud)
59-
{
60-
return (pud_val(pud) & _PAGE_HUGE) != 0;
61-
}
62-
6353
uint64_t pmd_to_entrylo(unsigned long pmd_val)
6454
{
6555
uint64_t val;

arch/mips/include/asm/pgtable-32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static inline int pmd_none(pmd_t pmd)
129129
static inline int pmd_bad(pmd_t pmd)
130130
{
131131
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
132-
/* pmd_huge(pmd) but inline */
132+
/* pmd_leaf(pmd) but inline */
133133
if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
134134
return 0;
135135
#endif

arch/mips/include/asm/pgtable-64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ static inline int pmd_none(pmd_t pmd)
245245
static inline int pmd_bad(pmd_t pmd)
246246
{
247247
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
248-
/* pmd_huge(pmd) but inline */
248+
/* pmd_leaf(pmd) but inline */
249249
if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
250250
return 0;
251251
#endif

arch/mips/mm/hugetlbpage.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,3 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
5757
}
5858
return (pte_t *) pmd;
5959
}
60-
61-
int pmd_huge(pmd_t pmd)
62-
{
63-
return (pmd_val(pmd) & _PAGE_HUGE) != 0;
64-
}
65-
66-
int pud_huge(pud_t pud)
67-
{
68-
return (pud_val(pud) & _PAGE_HUGE) != 0;
69-
}

arch/parisc/mm/hugetlbpage.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,3 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
180180
}
181181
return changed;
182182
}
183-
184-
185-
int pmd_huge(pmd_t pmd)
186-
{
187-
return 0;
188-
}
189-
190-
int pud_huge(pud_t pud)
191-
{
192-
return 0;
193-
}

arch/powerpc/include/asm/book3s/64/pgtable-4k.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,6 @@
66
*/
77
#ifndef __ASSEMBLY__
88
#ifdef CONFIG_HUGETLB_PAGE
9-
static inline int pmd_huge(pmd_t pmd)
10-
{
11-
return pmd_leaf(pmd);
12-
}
13-
14-
static inline int pud_huge(pud_t pud)
15-
{
16-
return pud_leaf(pud);
17-
}
18-
199
/*
2010
* With radix , we have hugepage ptes in the pud and pmd entries. We don't
2111
* need to setup hugepage directory for them. Our pte and page directory format

arch/powerpc/include/asm/book3s/64/pgtable-64k.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,6 @@
44

55
#ifndef __ASSEMBLY__
66
#ifdef CONFIG_HUGETLB_PAGE
7-
/*
8-
* We have PGD_INDEX_SIZ = 12 and PTE_INDEX_SIZE = 8, so that we can have
9-
* 16GB hugepage pte in PGD and 16MB hugepage pte at PMD;
10-
*
11-
* Defined in such a way that we can optimize away code block at build time
12-
* if CONFIG_HUGETLB_PAGE=n.
13-
*
14-
* returns true for pmd migration entries, THP, devmap, hugetlb
15-
* But compile time dependent on CONFIG_HUGETLB_PAGE
16-
*/
17-
static inline int pmd_huge(pmd_t pmd)
18-
{
19-
/*
20-
* leaf pte for huge page
21-
*/
22-
return !!(pmd_raw(pmd) & cpu_to_be64(_PAGE_PTE));
23-
}
24-
25-
static inline int pud_huge(pud_t pud)
26-
{
27-
/*
28-
* leaf pte for huge page
29-
*/
30-
return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PTE));
31-
}
327

338
/*
349
* With 64k page size, we have hugepage ptes in the pgd and pmd entries. We don't

0 commit comments

Comments
 (0)