Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628203

[PATCH 12/13] mm, memory_hotplug: fix the section mismatch warning

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 12/13] mm, memory_hotplug: fix the section mismatch warning
Date 2017-04-21 14:30 +0200
Message-ID <tyFRg-5KO-19@gated-at.bofh.it> (permalink)
References <tyFxU-5Ej-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Michal Hocko <mhocko@suse.com>

Tobias has reported following section mismatches introduced by "mm,
memory_hotplug: do not associate hotadded memory to zones until online".

WARNING: mm/built-in.o(.text+0x5a1c2): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:memmap_init_zone()
The function move_pfn_range_to_zone() references
the function __meminit memmap_init_zone().
This is often because move_pfn_range_to_zone lacks a __meminit
annotation or the annotation of memmap_init_zone is wrong.

WARNING: mm/built-in.o(.text+0x5a25b): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:init_currently_empty_zone()
The function move_pfn_range_to_zone() references
the function __meminit init_currently_empty_zone().
This is often because move_pfn_range_to_zone lacks a __meminit
annotation or the annotation of init_currently_empty_zone is wrong.

WARNING: vmlinux.o(.text+0x188aa2): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:memmap_init_zone()
The function move_pfn_range_to_zone() references
the function __meminit memmap_init_zone().
This is often because move_pfn_range_to_zone lacks a __meminit
annotation or the annotation of memmap_init_zone is wrong.

WARNING: vmlinux.o(.text+0x188b3b): Section mismatch in reference from the function move_pfn_range_to_zone() to the function .meminit.text:init_currently_empty_zone()
The function move_pfn_range_to_zone() references
the function __meminit init_currently_empty_zone().
This is often because move_pfn_range_to_zone lacks a __meminit
annotation or the annotation of init_currently_empty_zone is wrong.

Both memmap_init_zone and init_currently_empty_zone are marked __meminit
but move_pfn_range_to_zone is used outside of __meminit sections (e.g.
devm_memremap_pages) so we have to hide it from the checker by __ref
annotation.

Reported-by: Tobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
---
 mm/memory_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index c5ca2a8571d0..f9e916a85792 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1070,7 +1070,7 @@ static void __meminit resize_pgdat_range(struct pglist_data *pgdat, unsigned lon
 	pgdat->node_spanned_pages = max(start_pfn + nr_pages, old_end_pfn) - pgdat->node_start_pfn;
 }
 
-void move_pfn_range_to_zone(struct zone *zone,
+void __ref move_pfn_range_to_zone(struct zone *zone,
 		unsigned long start_pfn, unsigned long nr_pages)
 {
 	struct pglist_data *pgdat = zone->zone_pgdat;
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -v3 0/13] mm: make movable onlining suck less Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:10 +0200
  [PATCH 05/13] mm, memory_hotplug: split up register_one_node Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:10 +0200
  [PATCH 09/13] mm: __first_valid_page skip over offline pages Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:10 +0200
  [PATCH 03/13] mm: drop page_initialized check from get_nid_for_pfn Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:10 +0200
  [PATCH 04/13] mm, memory_hotplug: get rid of is_zone_device_section Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:10 +0200
  [PATCH 13/13] mm, memory_hotplug: remove unused cruft after memory hotplug rework Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:30 +0200
  [PATCH 12/13] mm, memory_hotplug: fix the section mismatch warning Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:30 +0200
  [PATCH 11/13] mm, memory_hotplug: replace for_device by want_memblock in arch_add_memory Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:30 +0200
  [PATCH 10/13] mm, memory_hotplug: do not associate hotadded memory to zones until online Michal Hocko <mhocko@kernel.org> - 2017-04-21 14:40 +0200
    Re: [PATCH 10/13] mm, memory_hotplug: do not associate hotadded  memory to zones until online Michal Hocko <mhocko@kernel.org> - 2017-04-21 15:00 +0200

csiph-web