X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-sparc64%2Fpage.h;h=b8d01179c4d39b37783d496b7e1ab95fc5c7b3e0;hb=70790a4b5cd6c0291e5b1a2836e2832d46036ac6;hp=c543310b9b187bd7d8e31a5f99a0d27056c0610d;hpb=413ba3004a4036bb5d6e52d2faa2b19cb13561dc;p=linux-2.6.git diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index c543310b9..b8d01179c 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h @@ -14,9 +14,6 @@ #ifndef __ASSEMBLY__ -/* Sparc64 is slow at multiplication, we prefer to use some extra space. */ -#define WANT_PAGE_VIRTUAL 1 - extern void _clear_page(void *page); #define clear_page(X) _clear_page((void *)(X)) struct page; @@ -111,17 +108,19 @@ typedef unsigned long iopgprot_t; */ #define PAGE_OFFSET _AC(0xFFFFF80000000000,UL) +#ifndef __ASSEMBLY__ + #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) /* PFNs are real physical page numbers. However, mem_map only begins to record * per-page information starting at pfn_base. This is to handle systems where - * the first physical page in the machine is at some huge physical address, such - * as 4GB. This is common on a partitioned E10000, for example. + * the first physical page in the machine is at some huge physical address, + * such as 4GB. This is common on a partitioned E10000, for example. */ +extern struct page *pfn_to_page(unsigned long pfn); +extern unsigned long page_to_pfn(struct page *); -#define pfn_to_page(pfn) (mem_map + ((pfn)-(pfn_base))) -#define page_to_pfn(page) ((unsigned long)(((page) - mem_map) + pfn_base)) #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr)>>PAGE_SHIFT) #define pfn_valid(pfn) (((pfn)-(pfn_base)) < max_mapnr) @@ -130,8 +129,6 @@ typedef unsigned long iopgprot_t; #define virt_to_phys __pa #define phys_to_virt __va -#ifndef __ASSEMBLY__ - /* The following structure is used to hold the physical * memory configuration of the machine. This is filled in * probe_memory() and is later used by mem_init() to set up