[parisc-linux] Re: CCIO dma io_command and related io_tlb format questions.
Grant Grundler
grundler at parisc-linux.org
Mon Oct 16 23:59:23 MDT 2006
On Mon, Oct 16, 2006 at 01:51:27PM +0200, Joel Soete wrote:
...
> but it seems that at in the history num_physpages (now ram size in bytes)
> was well the physical number of page:
...
> nowaday num_physpages is bytes so the comparision is eronous?
> (compare bytes against page number)
Where did you get the idea num_physpages is in bytes?
These two examples suggest it's counting PAGE_SIZE pages :
mm/slab.c: if (num_physpages > (32 << 20) >> PAGE_SHIFT)
mm/swap.c: unsigned long megs = num_physpages >> (20 - PAGE_SHIFT);
> the same way in:
> iov_order = get_order(iova_space_size << PAGE_SHIFT);
>
> iova_space_size << PAGE_SHIFT == iova_space_size * 2^PAGE_SHIFT
> == iova_space_size * PAGE_SIZE
>
> made sense when iova_space_size was a number of pages,
Look at get_order() then you'll understand why the "<< PAGE_SHIFT".
iov_order is being set to log2(iova_space_size)+1.
grant
More information about the parisc-linux
mailing list