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

David S. Miller (davem@redhat.com)
Tue, 07 May 2002 14:08:48 -0700 (PDT)


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

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

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

All of this is ignoring the fact that phys_base has to be subtracted
from any physical address before applying as an index to mem_map on
sparc64.

I have the correct fixes for sparc64 in my tree and I'll merge it
all to Linus.
-
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/