lkml.org 
[lkml]   [2010]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: allow, but warn, when issuing ioremap() on RAM
On Tue, Oct 19, 2010 at 01:13:36AM -0700, Colin Cross wrote:
> If memblock_remove is used on the end of memory with this patch,
> mem_init accesses off the end of the array of page structures because
> of the discrepancy between memblock.memory and membank on the number
> of the last pfn. memblock.memory is used to determine the memory
> zones in arm_bootmem_free, which eventually is used to create the
> array of page structures, but mem_init iterates over membank and calls
> pfn_to_page on pfns up to bank_pfn_end.
>
> Converting show_mem and mem_init to use memblock.memory fixes it:

I intentionally did not do this because it won't work. membank
information is purposely not coalesced together when you have full
sparsemem regions - which may result in

pfn_to_page(pfn) != pfn_to_page(pfn + 1) - 1

However, memblock information is coalesced, and so will cross these
boundaries. This means using memblock instead of membank will make
things go pop.


\
 
 \ /
  Last update: 2010-10-19 20:15    [W:0.752 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site