summaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2005-09-02 10:42:52 +1000
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-02 00:57:30 -0700
commite70bd1160109f2b7e62222550a7af37910dba88a (patch)
treeea46b9013d37c56f8784ae3d93667c5caca9e6b7 /include/asm-m68knommu
parent8410a546765c10d929b82d1e8237398904a79283 (diff)
downloadop-kernel-dev-e70bd1160109f2b7e62222550a7af37910dba88a.zip
op-kernel-dev-e70bd1160109f2b7e62222550a7af37910dba88a.tar.gz
[PATCH] m68knommu: need pfn_valid macro
Need pfn_valid macro, even on MMUless platforms. Enclose the macro args of __pa and __va in parentheses. Signed-off-by: Greg Ungerer <gerg@uclinux.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 05e03df..ff6a926 100644
--- a/include/asm-m68knommu/page.h
+++ b/include/asm-m68knommu/page.h
@@ -73,8 +73,8 @@ extern unsigned long memory_end;
#ifndef __ASSEMBLY__
-#define __pa(vaddr) virt_to_phys((void *)vaddr)
-#define __va(paddr) phys_to_virt((unsigned long)paddr)
+#define __pa(vaddr) virt_to_phys((void *)(vaddr))
+#define __va(paddr) phys_to_virt((unsigned long)(paddr))
#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT)
@@ -84,6 +84,7 @@ extern unsigned long memory_end;
#define pfn_to_page(pfn) virt_to_page(pfn_to_virt(pfn))
#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
+#define pfn_valid(pfn) ((pfn) < max_mapnr)
#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
((void *)(kaddr) < (void *)memory_end))
OpenPOWER on IntegriCloud