Skip to content

Commit 9129886

Browse files
danglin44hdeller
authored andcommitted
parisc: Drop __init from map_pages declaration
With huge kernel pages, we randomly eat a SPARC in map_pages(). This is fixed by dropping __init from the declaration. However, map_pages references the __init routine memblock_alloc_try_nid via memblock_alloc. Thus, it needs to be marked with __ref. memblock_alloc is only called before the kernel text is set to readonly. The __ref on free_initmem is no longer needed. Comment regarding map_pages being in the init section is removed. Signed-off-by: John David Anglin <[email protected]> Cc: [email protected] # v5.4+ Signed-off-by: Helge Deller <[email protected]>
1 parent e783362 commit 9129886

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

arch/parisc/mm/init.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ static void __init setup_bootmem(void)
337337

338338
static bool kernel_set_to_readonly;
339339

340-
static void __init map_pages(unsigned long start_vaddr,
341-
unsigned long start_paddr, unsigned long size,
342-
pgprot_t pgprot, int force)
340+
static void __ref map_pages(unsigned long start_vaddr,
341+
unsigned long start_paddr, unsigned long size,
342+
pgprot_t pgprot, int force)
343343
{
344344
pmd_t *pmd;
345345
pte_t *pg_table;
@@ -449,7 +449,7 @@ void __init set_kernel_text_rw(int enable_read_write)
449449
flush_tlb_all();
450450
}
451451

452-
void __ref free_initmem(void)
452+
void free_initmem(void)
453453
{
454454
unsigned long init_begin = (unsigned long)__init_begin;
455455
unsigned long init_end = (unsigned long)__init_end;
@@ -463,7 +463,6 @@ void __ref free_initmem(void)
463463
/* The init text pages are marked R-X. We have to
464464
* flush the icache and mark them RW-
465465
*
466-
* This is tricky, because map_pages is in the init section.
467466
* Do a dummy remap of the data section first (the data
468467
* section is already PAGE_KERNEL) to pull in the TLB entries
469468
* for map_kernel */

0 commit comments

Comments
 (0)