Re: [PATCH] do not count pages in holes with sparsemem

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

 



On Thu, 06 Jul 2006 15:12:11 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
> Ok thinking more about it, some platforms may have physical memory
> that doesn't start at 0. MIPS doesn't support such platform though it
> should be fairly easy. In that case __pa should be defined as:
> 
> 	#define __pa(x)	((unsigned long) (x) - PAGE_OFFSET + PFN_PHYS(ARCH_PFN_OFFSET))
> 
> and use in your patch:
> 
> 	free_area_init_node(0, NODE_DATA(0), zones_size, ARCH_PFN_OFFSET, zholes_size);
> 
> So I would recommend to use ARCH_PFN_OFFSET.

Well, currently ARCH_PFN_OFFSET is defined in
asm-generic/memory_model.h only for FLATMEM case.  I think other
memory models do not need it because it is just a case that a first
hole begins at pfn 0.

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux