X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-sparc64%2Fpage.h;h=7259d9984c58a09b49f420f3301f9c056e3e514f;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=c543310b9b187bd7d8e31a5f99a0d27056c0610d;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index c543310b9..7259d9984 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h @@ -14,14 +14,11 @@ #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; extern void clear_user_page(void *addr, unsigned long vaddr, struct page *page); -#define copy_page(X,Y) __memcpy((void *)(X), (void *)(Y), PAGE_SIZE) +#define copy_page(X,Y) memcpy((void *)(X), (void *)(Y), PAGE_SIZE) extern void copy_user_page(void *to, void *from, unsigned long vaddr, struct page *topage); /* GROSS, defining this makes gcc pass these types as aggregates, @@ -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