Skip to content

Commit 601f006

Browse files
kvaneeshakpm00
authored andcommitted
powerpc/book3s64/radix: remove mmu_vmemmap_psize
This is not used by radix anymore. [[email protected]: fix kernel build error] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Aneesh Kumar K.V <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Dan Williams <[email protected]> Cc: Joao Martins <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Muchun Song <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent f2b79c0 commit 601f006

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

arch/powerpc/mm/book3s64/radix_pgtable.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -601,17 +601,6 @@ void __init radix__early_init_mmu(void)
601601
#else
602602
mmu_virtual_psize = MMU_PAGE_4K;
603603
#endif
604-
605-
#ifdef CONFIG_SPARSEMEM_VMEMMAP
606-
/* vmemmap mapping */
607-
if (mmu_psize_defs[MMU_PAGE_2M].shift) {
608-
/*
609-
* map vmemmap using 2M if available
610-
*/
611-
mmu_vmemmap_psize = MMU_PAGE_2M;
612-
} else
613-
mmu_vmemmap_psize = mmu_virtual_psize;
614-
#endif
615604
#endif
616605
/*
617606
* initialize page table size

arch/powerpc/mm/init_64.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,17 +198,12 @@ bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start,
198198
return false;
199199
}
200200

201-
int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
202-
struct vmem_altmap *altmap)
201+
static int __meminit __vmemmap_populate(unsigned long start, unsigned long end, int node,
202+
struct vmem_altmap *altmap)
203203
{
204204
bool altmap_alloc;
205205
unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
206206

207-
#ifdef CONFIG_PPC_BOOK3S_64
208-
if (radix_enabled())
209-
return radix__vmemmap_populate(start, end, node, altmap);
210-
#endif
211-
212207
/* Align to the page size of the linear mapping. */
213208
start = ALIGN_DOWN(start, page_size);
214209

@@ -277,6 +272,18 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
277272
return 0;
278273
}
279274

275+
int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
276+
struct vmem_altmap *altmap)
277+
{
278+
279+
#ifdef CONFIG_PPC_BOOK3S_64
280+
if (radix_enabled())
281+
return radix__vmemmap_populate(start, end, node, altmap);
282+
#endif
283+
284+
return __vmemmap_populate(start, end, node, altmap);
285+
}
286+
280287
#ifdef CONFIG_MEMORY_HOTPLUG
281288
static unsigned long vmemmap_list_free(unsigned long start)
282289
{

0 commit comments

Comments
 (0)