The patch titled Subject: mm: remove __paginginit has been added to the -mm tree. Its filename is mm-remove-__paginginit.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-remove-__paginginit.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-remove-__paginginit.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx> Subject: mm: remove __paginginit __paginginit is the same thing as __meminit except for platforms without sparsemem, there it is defined as __init. Remove __paginginit and use __meminit. Use __ref in one single function that merges __meminit and __init sections: setup_usemap(). Link: http://lkml.kernel.org/r/20180801122348.21588-4-osalvador@xxxxxxxxxxxxxxxxxx Signed-off-by: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx> Signed-off-by: Oscar Salvador <osalvador@xxxxxxx> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/internal.h | 12 ------------ mm/page_alloc.c | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 21 deletions(-) --- a/mm/internal.h~mm-remove-__paginginit +++ a/mm/internal.h @@ -389,18 +389,6 @@ static inline struct page *mem_map_next( return iter + 1; } -/* - * FLATMEM and DISCONTIGMEM configurations use alloc_bootmem_node, - * so all functions starting at paging_init should be marked __init - * in those cases. SPARSEMEM, however, allows for memory hotplug, - * and alloc_bootmem_node is not used. - */ -#ifdef CONFIG_SPARSEMEM -#define __paginginit __meminit -#else -#define __paginginit __init -#endif - /* Memory initialisation debug and verification */ enum mminit_level { MMINIT_WARNING, --- a/mm/page_alloc.c~mm-remove-__paginginit +++ a/mm/page_alloc.c @@ -6122,7 +6122,7 @@ static unsigned long __init usemap_size( return usemapsize / 8; } -static void __init setup_usemap(struct pglist_data *pgdat, +static void __ref setup_usemap(struct pglist_data *pgdat, struct zone *zone, unsigned long zone_start_pfn, unsigned long zonesize) @@ -6142,7 +6142,7 @@ static inline void setup_usemap(struct p #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE /* Initialise the number of pages represented by NR_PAGEBLOCK_BITS */ -void __paginginit set_pageblock_order(void) +void __meminit set_pageblock_order(void) { unsigned int order; @@ -6170,14 +6170,14 @@ void __paginginit set_pageblock_order(vo * include/linux/pageblock-flags.h for the values of pageblock_order based on * the kernel config */ -void __paginginit set_pageblock_order(void) +void __meminit set_pageblock_order(void) { } #endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */ -static unsigned long __paginginit calc_memmap_size(unsigned long spanned_pages, - unsigned long present_pages) +static unsigned long __meminit calc_memmap_size(unsigned long spanned_pages, + unsigned long present_pages) { unsigned long pages = spanned_pages; @@ -6235,7 +6235,7 @@ static void pgdat_init_kcompactd(struct * * NOTE: pgdat should get zeroed by caller. */ -static void __paginginit free_area_init_core(struct pglist_data *pgdat) +static void __meminit free_area_init_core(struct pglist_data *pgdat) { enum zone_type j; int nid = pgdat->node_id; @@ -6366,8 +6366,9 @@ static void __ref alloc_node_mem_map(str static void __ref alloc_node_mem_map(struct pglist_data *pgdat) { } #endif /* CONFIG_FLAT_NODE_MEM_MAP */ -void __paginginit free_area_init_node(int nid, unsigned long *zones_size, - unsigned long node_start_pfn, unsigned long *zholes_size) +void __meminit free_area_init_node(int nid, unsigned long *zones_size, + unsigned long node_start_pfn, + unsigned long *zholes_size) { pg_data_t *pgdat = NODE_DATA(nid); unsigned long start_pfn = 0; @@ -6412,7 +6413,7 @@ void __paginginit free_area_init_node(in * may be accessed (for example page_to_pfn() on some configuration accesses * flags). We must explicitly zero those struct pages. */ -void __paginginit zero_resv_unavail(void) +void __meminit zero_resv_unavail(void) { phys_addr_t start, end; unsigned long pfn; _ Patches currently in -mm which might be from pasha.tatashin@xxxxxxxxxx are mm-skip-invalid-pages-block-at-a-time-in-zero_resv_unresv.patch mm-sparse-abstract-sparse-buffer-allocations.patch mm-sparse-use-the-new-sparse-buffer-functions-in-non-vmemmap.patch mm-sparse-move-buffer-init-fini-to-the-common-place.patch mm-sparse-add-new-sparse_init_nid-and-sparse_init.patch mm-sparse-delete-old-sprase_init-and-enable-new-one.patch mm-sparse-delete-old-sparse_init-and-enable-new-one-v6.patch mm-make-memmap_init-a-proper-function.patch mm-calculate-deferred-pages-after-skipping-mirrored-memory.patch mm-calculate-deferred-pages-after-skipping-mirrored-memory-v2.patch mm-move-mirrored-memory-specific-code-outside-of-memmap_init_zone.patch mm-move-mirrored-memory-specific-code-outside-of-memmap_init_zone-v2.patch mm-access-zone-node-via-zone_to_nid-and-zone_set_nid.patch mm-remove-__paginginit.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html