Skip to content

Commit e2af9da

Browse files
rddunlaptorvalds
authored andcommitted
ia64: fix discontig.c section mismatches
Fix IA64 discontig.c Section mismatch warnings. When CONFIG_SPARSEMEM=y and CONFIG_MEMORY_HOTPLUG=y, the functions computer_pernodesize() and scatter_node_data() should not be marked as __meminit because they are needed after init, on any memory hotplug event. Also, early_nr_cpus_node() is called by compute_pernodesize(), so early_nr_cpus_node() cannot be __meminit either. WARNING: modpost: vmlinux.o(.text.unlikely+0x1612): Section mismatch in reference from the function arch_alloc_nodedata() to the function .meminit.text:compute_pernodesize() The function arch_alloc_nodedata() references the function __meminit compute_pernodesize(). This is often because arch_alloc_nodedata lacks a __meminit annotation or the annotation of compute_pernodesize is wrong. WARNING: modpost: vmlinux.o(.text.unlikely+0x1692): Section mismatch in reference from the function arch_refresh_nodedata() to the function .meminit.text:scatter_node_data() The function arch_refresh_nodedata() references the function __meminit scatter_node_data(). This is often because arch_refresh_nodedata lacks a __meminit annotation or the annotation of scatter_node_data is wrong. WARNING: modpost: vmlinux.o(.text.unlikely+0x1502): Section mismatch in reference from the function compute_pernodesize() to the function .meminit.text:early_nr_cpus_node() The function compute_pernodesize() references the function __meminit early_nr_cpus_node(). This is often because compute_pernodesize lacks a __meminit annotation or the annotation of early_nr_cpus_node is wrong. Link: https://lkml.kernel.org/r/20210411001201.3069-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Mike Rapoport <rppt@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 19d000d commit e2af9da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/ia64/mm/discontig.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int __init build_node_maps(unsigned long start, unsigned long len,
9595
* acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been
9696
* called yet. Note that node 0 will also count all non-existent cpus.
9797
*/
98-
static int __meminit early_nr_cpus_node(int node)
98+
static int early_nr_cpus_node(int node)
9999
{
100100
int cpu, n = 0;
101101

@@ -110,7 +110,7 @@ static int __meminit early_nr_cpus_node(int node)
110110
* compute_pernodesize - compute size of pernode data
111111
* @node: the node id.
112112
*/
113-
static unsigned long __meminit compute_pernodesize(int node)
113+
static unsigned long compute_pernodesize(int node)
114114
{
115115
unsigned long pernodesize = 0, cpus;
116116

@@ -367,7 +367,7 @@ static void __init reserve_pernode_space(void)
367367
}
368368
}
369369

370-
static void __meminit scatter_node_data(void)
370+
static void scatter_node_data(void)
371371
{
372372
pg_data_t **dst;
373373
int node;

0 commit comments

Comments
 (0)