aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68k/motorola_pgtable.h
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2007-05-31 03:40:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 10:58:14 -0400
commit12d810c1b8c2b913d48e629e2b5c01d105029839 (patch)
treeb39162d3168f6173af3d0e5790e16eb45a70dfaf /include/asm-m68k/motorola_pgtable.h
parent00c541eae7a477e3d1adb1ebf27cccc0bdb5f824 (diff)
m68k: discontinuous memory support
Fix support for discontinuous memory Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-m68k/motorola_pgtable.h')
-rw-r--r--include/asm-m68k/motorola_pgtable.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-m68k/motorola_pgtable.h b/include/asm-m68k/motorola_pgtable.h
index 61e4406ed96a..b5b78c01eb6c 100644
--- a/include/asm-m68k/motorola_pgtable.h
+++ b/include/asm-m68k/motorola_pgtable.h
@@ -130,7 +130,7 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp)
130#define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE)) 130#define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE))
131#define pte_clear(mm,addr,ptep) ({ pte_val(*(ptep)) = 0; }) 131#define pte_clear(mm,addr,ptep) ({ pte_val(*(ptep)) = 0; })
132 132
133#define pte_page(pte) (mem_map + ((unsigned long)(__va(pte_val(pte)) - PAGE_OFFSET) >> PAGE_SHIFT)) 133#define pte_page(pte) virt_to_page(__va(pte_val(pte)))
134#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) 134#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
135#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 135#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
136 136
@@ -143,7 +143,7 @@ static inline void pgd_set(pgd_t *pgdp, pmd_t *pmdp)
143 while (--__i >= 0) \ 143 while (--__i >= 0) \
144 *__ptr++ = 0; \ 144 *__ptr++ = 0; \
145}) 145})
146#define pmd_page(pmd) (mem_map + ((unsigned long)(__va(pmd_val(pmd)) - PAGE_OFFSET) >> PAGE_SHIFT)) 146#define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd)))
147 147
148 148
149#define pgd_none(pgd) (!pgd_val(pgd)) 149#define pgd_none(pgd) (!pgd_val(pgd))
@@ -223,10 +223,10 @@ static inline pte_t *pte_offset_kernel(pmd_t *pmdp, unsigned long address)
223 return (pte_t *)__pmd_page(*pmdp) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); 223 return (pte_t *)__pmd_page(*pmdp) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1));
224} 224}
225 225
226#define pte_offset_map(pmdp,address) ((pte_t *)kmap(pmd_page(*pmdp)) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))) 226#define pte_offset_map(pmdp,address) ((pte_t *)__pmd_page(*pmdp) + (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
227#define pte_offset_map_nested(pmdp, address) pte_offset_map(pmdp, address) 227#define pte_offset_map_nested(pmdp, address) pte_offset_map(pmdp, address)
228#define pte_unmap(pte) kunmap(pte) 228#define pte_unmap(pte) ((void)0)
229#define pte_unmap_nested(pte) kunmap(pte) 229#define pte_unmap_nested(pte) ((void)0)
230 230
231/* 231/*
232 * Allocate and free page tables. The xxx_kernel() versions are 232 * Allocate and free page tables. The xxx_kernel() versions are