Re: [PATCH 1/3] mm, nobootmem: fix wrong usage of max_low_pfn

2013-03-20 Thread Sam Ravnborg
On Tue, Mar 19, 2013 at 05:07:21PM +0900, Joonsoo Kim wrote: > On Tue, Mar 19, 2013 at 12:35:45AM -0700, Yinghai Lu wrote: > > Can you check why sparc do not need to change interface during converting > > to use memblock to replace bootmem? > > Sure. > According to my understanding to sparc32 code

Re: [PATCH 1/3] mm, nobootmem: fix wrong usage of max_low_pfn

2013-03-19 Thread Joonsoo Kim
On Tue, Mar 19, 2013 at 12:35:45AM -0700, Yinghai Lu wrote: > Can you check why sparc do not need to change interface during converting > to use memblock to replace bootmem? Sure. According to my understanding to sparc32 code(arch/sparc/mm/init_32.c), they already use max_low_pfn as the maximum PF

Re: [PATCH 1/3] mm, nobootmem: fix wrong usage of max_low_pfn

2013-03-18 Thread Joonsoo Kim
On Tue, Mar 19, 2013 at 03:25:22PM +0900, Joonsoo Kim wrote: > On Mon, Mar 18, 2013 at 10:47:41PM -0700, Yinghai Lu wrote: > > On Mon, Mar 18, 2013 at 10:15 PM, Joonsoo Kim > > wrote: > > > max_low_pfn reflect the number of _pages_ in the system, > > > not the maximum PFN. You can easily find tha

Re: [PATCH 1/3] mm, nobootmem: fix wrong usage of max_low_pfn

2013-03-18 Thread Joonsoo Kim
On Mon, Mar 18, 2013 at 10:47:41PM -0700, Yinghai Lu wrote: > On Mon, Mar 18, 2013 at 10:15 PM, Joonsoo Kim wrote: > > max_low_pfn reflect the number of _pages_ in the system, > > not the maximum PFN. You can easily find that fact in init_bootmem(). > > So fix it. > > I'm confused. for x86, we ha

Re: [PATCH 1/3] mm, nobootmem: fix wrong usage of max_low_pfn

2013-03-18 Thread Yinghai Lu
On Mon, Mar 18, 2013 at 10:15 PM, Joonsoo Kim wrote: > max_low_pfn reflect the number of _pages_ in the system, > not the maximum PFN. You can easily find that fact in init_bootmem(). > So fix it. I'm confused. for x86, we have max_low_pfn defined in ... #ifdef CONFIG_X86_32 /* max_low_p

[PATCH 1/3] mm, nobootmem: fix wrong usage of max_low_pfn

2013-03-18 Thread Joonsoo Kim
max_low_pfn reflect the number of _pages_ in the system, not the maximum PFN. You can easily find that fact in init_bootmem(). So fix it. Additionally, if 'start_pfn == end_pfn', we don't need to go futher, so change range check. Signed-off-by: Joonsoo Kim diff --git a/mm/nobootmem.c b/mm/noboo