aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-m68knommu')
-rw-r--r--include/asm-m68knommu/page.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h
index 05e03df0ec29..ff6a9265ed1c 100644
--- a/include/asm-m68knommu/page.h
+++ b/include/asm-m68knommu/page.h
@@ -73,8 +73,8 @@ extern unsigned long memory_end;
73 73
74#ifndef __ASSEMBLY__ 74#ifndef __ASSEMBLY__
75 75
76#define __pa(vaddr) virt_to_phys((void *)vaddr) 76#define __pa(vaddr) virt_to_phys((void *)(vaddr))
77#define __va(paddr) phys_to_virt((unsigned long)paddr) 77#define __va(paddr) phys_to_virt((unsigned long)(paddr))
78 78
79#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) 79#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
80#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) 80#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
@@ -84,6 +84,7 @@ extern unsigned long memory_end;
84 84
85#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn)) 85#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn))
86#define page_to_pfn(page) virt_to_pfn(page_to_virt(page)) 86#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
87#define pfn_valid(pfn) ((pfn) < max_mapnr)
87 88
88#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ 89#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
89 ((void *)(kaddr) < (void *)memory_end)) 90 ((void *)(kaddr) < (void *)memory_end))