diff options
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/mmu_context.h | 6 | ||||
-rw-r--r-- | include/asm-sh/page.h | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h index 01acaaae9751..199662bb35c6 100644 --- a/include/asm-sh/mmu_context.h +++ b/include/asm-sh/mmu_context.h | |||
@@ -169,6 +169,8 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
169 | #define destroy_context(mm) do { } while (0) | 169 | #define destroy_context(mm) do { } while (0) |
170 | #define set_asid(asid) do { } while (0) | 170 | #define set_asid(asid) do { } while (0) |
171 | #define get_asid() (0) | 171 | #define get_asid() (0) |
172 | #define set_TTB(pgd) do { } while (0) | ||
173 | #define get_TTB() (0) | ||
172 | #define activate_context(mm,cpu) do { } while (0) | 174 | #define activate_context(mm,cpu) do { } while (0) |
173 | #define switch_mm(prev,next,tsk) do { } while (0) | 175 | #define switch_mm(prev,next,tsk) do { } while (0) |
174 | #define deactivate_mm(tsk,mm) do { } while (0) | 176 | #define deactivate_mm(tsk,mm) do { } while (0) |
@@ -211,8 +213,8 @@ static inline void disable_mmu(void) | |||
211 | * MMU control handlers for processors lacking memory | 213 | * MMU control handlers for processors lacking memory |
212 | * management hardware. | 214 | * management hardware. |
213 | */ | 215 | */ |
214 | #define enable_mmu() do { BUG(); } while (0) | 216 | #define enable_mmu() do { } while (0) |
215 | #define disable_mmu() do { BUG(); } while (0) | 217 | #define disable_mmu() do { } while (0) |
216 | #endif | 218 | #endif |
217 | 219 | ||
218 | #endif /* __KERNEL__ */ | 220 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index ac4b4677f28c..7464de4ba07d 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -59,6 +59,7 @@ extern void (*clear_page)(void *to); | |||
59 | extern void (*copy_page)(void *to, void *from); | 59 | extern void (*copy_page)(void *to, void *from); |
60 | 60 | ||
61 | extern unsigned long shm_align_mask; | 61 | extern unsigned long shm_align_mask; |
62 | extern unsigned long max_low_pfn, min_low_pfn; | ||
62 | 63 | ||
63 | #ifdef CONFIG_MMU | 64 | #ifdef CONFIG_MMU |
64 | extern void clear_page_slow(void *to); | 65 | extern void clear_page_slow(void *to); |
@@ -124,17 +125,16 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
124 | #define PAGE_OFFSET CONFIG_PAGE_OFFSET | 125 | #define PAGE_OFFSET CONFIG_PAGE_OFFSET |
125 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) | 126 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) |
126 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | 127 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) |
128 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | ||
127 | 129 | ||
128 | #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) | 130 | #define phys_to_page(phys) (pfn_to_page(phys >> PAGE_SHIFT)) |
129 | 131 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | |
130 | #define phys_to_page(phys) (mem_map + (((phys)-__MEMORY_START) >> PAGE_SHIFT)) | ||
131 | #define page_to_phys(page) (((page - mem_map) << PAGE_SHIFT) + __MEMORY_START) | ||
132 | 132 | ||
133 | /* PFN start number, because of __MEMORY_START */ | 133 | /* PFN start number, because of __MEMORY_START */ |
134 | #define PFN_START (__MEMORY_START >> PAGE_SHIFT) | 134 | #define PFN_START (__MEMORY_START >> PAGE_SHIFT) |
135 | #define ARCH_PFN_OFFSET (PFN_START) | 135 | #define ARCH_PFN_OFFSET (PFN_START) |
136 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 136 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
137 | #define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) | 137 | #define pfn_valid(pfn) ((pfn) >= min_low_pfn && (pfn) < max_low_pfn) |
138 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 138 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
139 | 139 | ||
140 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 140 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |