Re: 2.6.17-mm1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Franck Bui-Huu wrote:
> 
> what do you think about this use of ARCH_PFN_OFFSET ?
> 
> diff --git a/mm/bootmem.c b/mm/bootmem.c
> index d213fed..fd28eed 100644
> --- a/mm/bootmem.c
> +++ b/mm/bootmem.c
> @@ -377,11 +377,11 @@ unsigned long __init free_all_bootmem_no
>  	return(free_all_bootmem_core(pgdat));
>  }
>  
> -unsigned long __init init_bootmem (unsigned long start, unsigned long pages)
> +unsigned long __init init_bootmem(unsigned long start, unsigned long pages)
>  {
>  	max_low_pfn = pages;
>  	min_low_pfn = start;
> -	return(init_bootmem_core(NODE_DATA(0), start, 0, pages));
> +	return init_bootmem_core(NODE_DATA(0), start, ARCH_PFN_OFFSET, pages);
>  }
>  
>  #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ed6a40f..43abaeb 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2154,7 +2154,7 @@ #ifdef CONFIG_FLATMEM
>  		 * relative to node_mem_map to maintain this
>  		 * relationship.
>  		 */
> -		mem_map = map - ARCH_PFN_OFFSET;
> +		mem_map = map - pgdat->node_start_pfn;
>  #endif
>  #endif /* CONFIG_FLAT_NODE_MEM_MAP */
>  }
> @@ -2181,8 +2181,7 @@ #endif
>  
>  void __init free_area_init(unsigned long *zones_size)
>  {
> -	free_area_init_node(0, NODE_DATA(0), zones_size,
> -			__pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL);

I'm wondering why using "__pa(PAGE_OFFSET) >> PAGE_SHIFT" to compute the start
of memory. That should always result in 0, shouldn't it ?

		Franck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux