X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-frv%2Fpage.h;h=134cc0cdf6c2727201a3f5d243d1f2761d18f342;hb=9318c51acd9689505850152cc98277a6d6f2d752;hp=4feba567e7fd7bd47601f3199285ba15e7ed9815;hpb=e3e3679cfc1c6689e035f6d69606253b1eda63ca;p=linux-2.6 diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h index 4feba567e7..134cc0cdf6 100644 --- a/include/asm-frv/page.h +++ b/include/asm-frv/page.h @@ -3,7 +3,6 @@ #ifdef __KERNEL__ -#include #include #include #include @@ -47,8 +46,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define devmem_is_allowed(pfn) 1 -#define __pa(vaddr) virt_to_phys((void *) vaddr) -#define __va(paddr) phys_to_virt((unsigned long) paddr) +#define __pa(vaddr) virt_to_phys((void *) (unsigned long) (vaddr)) +#define __va(paddr) phys_to_virt((unsigned long) (paddr)) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) @@ -57,13 +56,9 @@ extern unsigned long min_low_pfn; extern unsigned long max_pfn; #ifdef CONFIG_MMU -#define pfn_to_page(pfn) (mem_map + (pfn)) -#define page_to_pfn(page) ((unsigned long) ((page) - mem_map)) #define pfn_valid(pfn) ((pfn) < max_mapnr) - #else -#define pfn_to_page(pfn) (&mem_map[(pfn) - (PAGE_OFFSET >> PAGE_SHIFT)]) -#define page_to_pfn(page) ((PAGE_OFFSET >> PAGE_SHIFT) + (unsigned long) ((page) - mem_map)) +#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) #define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_low_pfn) #endif @@ -87,6 +82,7 @@ extern unsigned long max_pfn; #define WANT_PAGE_VIRTUAL 1 #endif +#include #include #endif /* _ASM_PAGE_H */