lkml.org 
[lkml]   [2002]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: pfn-Functionset out of order for sparc64 in current Bk tree?
Hi,

On Tue, 7 May 2002, Roman Zippel wrote advises on pfn.

So this compiles for me.

Regards,
Thunder

diff -Nur linus-2.5/include/asm-sparc64/page.h thunder-2.5/include/asm-sparc64/page.h
--- linus-2.5/include/asm-sparc64/page.h Tue May 7 14:30:00 2002
+++ thunder-2.5/include/asm-sparc64/page.h Tue May 7 14:08:48 2002
@@ -114,6 +114,8 @@
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
#define virt_to_page(kaddr) (mem_map + ((__pa(kaddr)-phys_base) >> PAGE_SHIFT))
+#define pfn_valid(pfn) ((pfn) < max_mapnr)
+
#define VALID_PAGE(page) ((page - mem_map) < max_mapnr)

#define virt_to_phys __pa
diff -Nur linus-2.5/include/asm-sparc64/pgtable.h thunder-2.5/include/asm-sparc64/pgtable.h
--- linus-2.5/include/asm-sparc64/pgtable.h Tue May 7 14:30:00 2002
+++ thunder-2.5/include/asm-sparc64/pgtable.h Tue May 7 14:10:46 2002
@@ -201,6 +201,7 @@
#define page_pte(page) page_pte_prot(page, __pgprot(0))

#define mk_pte_phys(physpage, pgprot) (__pte((physpage) | pgprot_val(pgprot) | _PAGE_SZBITS))
+#define pfn_pte(pfn,prot) mk_pte_phys(pfn << PAGE_SHIFT, prot)

extern inline pte_t pte_modify(pte_t orig_pte, pgprot_t new_prot)
{
@@ -272,6 +273,8 @@
#define pte_offset_map_nested __pte_offset
#define pte_unmap(pte) do { } while (0)
#define pte_unmap_nested(pte) do { } while (0)
+#define pfn_to_page(pfn) (mem_map + (pfn))
+#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)

extern pgd_t swapper_pg_dir[1];

--
if (errno == ENOTAVAIL)
fprintf(stderr, "Error: Talking to Microsoft server!\n");
-
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/

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