[lkml]   [2002]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: pfn-Functionset out of order for sparc64 in current Bk tree?

On Tue, 7 May 2002, Thunder from the hill wrote:

As long as CONFIG_DISCONTIGMEM isn't used the replacement functions are
quite simple.

> - pfn_to_page(pfn) is declared as (mem_map + (pfn)) for i386. Can this
> apply to Sparc64 as well?


> - pte_pfn(x) is declared as
> ((unsigned long)(((x).pte_low >> PAGE_SHIFT)))
> in 2-level pgtable,
> (((x).pte_low >> PAGE_SHIFT) | ((x).pte_high << (32 - PAGE_SHIFT)))
> in 3-level. I suppose 2-level shouldn't exactly match here, how far
> must the 3-level version be changed in order to fit sparc64? A lot?

#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)

> - pfn_valid(pfn) is described as ((pfn) < max_mapnr). Suppose this is OK
> on Sparc64 either?


> - pfn_pte(page,prot) is defined as
> __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
> How far does this go for Sparc64?

#define pfn_pte(pfn,prot) mk_pte_phys(pfn << PAGE_SHIFT, prot)
but you should better replace mk_pte_phys completely.

bye, Roman

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.048 / U:15.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site