1
0
Fork 0
alistair23-linux/arch/metag/mm
James Hogan 97b1d23f7b metag: Drop show_mem() from mem_init()
The recent commit 599d0c954f ("mm, vmscan: move LRU lists to node"),
changed memory management code so that show_mem() is no longer safe to
call prior to setup_per_cpu_pageset(), as pgdat->per_cpu_nodestats will
still be NULL. This causes an oops on metag due to the call to
show_mem() from mem_init():

  node_page_state_snapshot(...) + 0x48
  pgdat_reclaimable(struct pglist_data * pgdat = 0x402517a0)
  show_free_areas(unsigned int filter = 0) + 0x2cc
  show_mem(unsigned int filter = 0) + 0x18
  mem_init()
  mm_init()
  start_kernel() + 0x204

This wasn't a problem before with zone_reclaimable() as zone_pcp_init()
was already setting zone->pageset to &boot_pageset, via setup_arch() and
paging_init(), which happens before mm_init():

  zone_pcp_init(...)
  free_area_init_core(...) + 0x138
  free_area_init_node(int nid = 0, ...) + 0x1a0
  free_area_init_nodes(...) + 0x440
  paging_init(unsigned long mem_end = 0x4fe00000) + 0x378
  setup_arch(char ** cmdline_p = 0x4024e038) + 0x2b8
  start_kernel() + 0x54

No other arches appear to call show_mem() during boot, and it doesn't
really add much value to the log, so lets just drop it from mem_init().

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Cc: linux-metag@vger.kernel.org
2016-08-09 13:41:30 +01:00
..
Kconfig Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
Makefile metag: Build infrastructure 2013-03-02 20:09:54 +00:00
cache.c metag/mm/cache: Restrict scope for metag_lnkget_probe 2013-06-13 12:55:28 +01:00
extable.c metag: Memory management 2013-03-02 20:09:19 +00:00
fault.c Metag architecture changes for v4.8 2016-08-05 08:58:00 -04:00
highmem.c kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
hugetlbpage.c metag: mm: use hugetlb_bad_size() 2016-05-19 19:12:14 -07:00
init.c metag: Drop show_mem() from mem_init() 2016-08-09 13:41:30 +01:00
ioremap.c metag: Memory handling 2013-03-02 20:09:19 +00:00
l2cache.c
maccess.c metag: Memory handling 2013-03-02 20:09:19 +00:00
mmu-meta1.c metag: Memory management 2013-03-02 20:09:19 +00:00
mmu-meta2.c metag: Memory management 2013-03-02 20:09:19 +00:00
numa.c memblock: make memblock_set_node() support different memblock_type 2014-01-21 16:19:44 -08:00