Re: pfn-Functionset out of order for sparc64 in current Bk tree?

Roman Zippel (zippel@linux-m68k.org)
Tue, 7 May 2002 21:22:13 +0200 (CEST)


Hi,

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?

Yes.

> - 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?

Yes.

> - 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/