diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-04-24 23:58:40 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-05-08 06:51:37 -0400 |
commit | ccd805874198c248498b5f269656ec14397eeede (patch) | |
tree | 14a99723690c207906c4f7e84428457c4251b45d /include/asm-sh | |
parent | 9141d30a480850d989fc245909b98670a7b66ec1 (diff) |
sh64: Fixup the nommu build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/io.h | 12 | ||||
-rw-r--r-- | include/asm-sh/mmu_context.h | 4 | ||||
-rw-r--r-- | include/asm-sh/tlb_64.h | 10 | ||||
-rw-r--r-- | include/asm-sh/uaccess_64.h | 2 |
4 files changed, 21 insertions, 7 deletions
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index 356e50d06745..a4fbf0c84fb1 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -268,11 +268,6 @@ unsigned long long peek_real_address_q(unsigned long long addr); | |||
268 | unsigned long long poke_real_address_q(unsigned long long addr, | 268 | unsigned long long poke_real_address_q(unsigned long long addr, |
269 | unsigned long long val); | 269 | unsigned long long val); |
270 | 270 | ||
271 | /* arch/sh/mm/ioremap_64.c */ | ||
272 | unsigned long onchip_remap(unsigned long addr, unsigned long size, | ||
273 | const char *name); | ||
274 | extern void onchip_unmap(unsigned long vaddr); | ||
275 | |||
276 | #if !defined(CONFIG_MMU) | 271 | #if !defined(CONFIG_MMU) |
277 | #define virt_to_phys(address) ((unsigned long)(address)) | 272 | #define virt_to_phys(address) ((unsigned long)(address)) |
278 | #define phys_to_virt(address) ((void *)(address)) | 273 | #define phys_to_virt(address) ((void *)(address)) |
@@ -302,9 +297,16 @@ extern void onchip_unmap(unsigned long vaddr); | |||
302 | void __iomem *__ioremap(unsigned long offset, unsigned long size, | 297 | void __iomem *__ioremap(unsigned long offset, unsigned long size, |
303 | unsigned long flags); | 298 | unsigned long flags); |
304 | void __iounmap(void __iomem *addr); | 299 | void __iounmap(void __iomem *addr); |
300 | |||
301 | /* arch/sh/mm/ioremap_64.c */ | ||
302 | unsigned long onchip_remap(unsigned long addr, unsigned long size, | ||
303 | const char *name); | ||
304 | extern void onchip_unmap(unsigned long vaddr); | ||
305 | #else | 305 | #else |
306 | #define __ioremap(offset, size, flags) ((void __iomem *)(offset)) | 306 | #define __ioremap(offset, size, flags) ((void __iomem *)(offset)) |
307 | #define __iounmap(addr) do { } while (0) | 307 | #define __iounmap(addr) do { } while (0) |
308 | #define onchip_remap(addr, size, name) (addr) | ||
309 | #define onchip_unmap(addr) do { } while (0) | ||
308 | #endif /* CONFIG_MMU */ | 310 | #endif /* CONFIG_MMU */ |
309 | 311 | ||
310 | static inline void __iomem * | 312 | static inline void __iomem * |
diff --git a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h index fe58d00b250c..87e812f68bb0 100644 --- a/include/asm-sh/mmu_context.h +++ b/include/asm-sh/mmu_context.h | |||
@@ -27,6 +27,7 @@ | |||
27 | /* ASID is 8-bit value, so it can't be 0x100 */ | 27 | /* ASID is 8-bit value, so it can't be 0x100 */ |
28 | #define MMU_NO_ASID 0x100 | 28 | #define MMU_NO_ASID 0x100 |
29 | 29 | ||
30 | #ifdef CONFIG_MMU | ||
30 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) | 31 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) |
31 | #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) | 32 | #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) |
32 | 33 | ||
@@ -38,7 +39,6 @@ | |||
38 | */ | 39 | */ |
39 | #define MMU_VPN_MASK 0xfffff000 | 40 | #define MMU_VPN_MASK 0xfffff000 |
40 | 41 | ||
41 | #ifdef CONFIG_MMU | ||
42 | #if defined(CONFIG_SUPERH32) | 42 | #if defined(CONFIG_SUPERH32) |
43 | #include "mmu_context_32.h" | 43 | #include "mmu_context_32.h" |
44 | #else | 44 | #else |
@@ -129,6 +129,8 @@ static inline void switch_mm(struct mm_struct *prev, | |||
129 | #define destroy_context(mm) do { } while (0) | 129 | #define destroy_context(mm) do { } while (0) |
130 | #define set_asid(asid) do { } while (0) | 130 | #define set_asid(asid) do { } while (0) |
131 | #define get_asid() (0) | 131 | #define get_asid() (0) |
132 | #define cpu_asid(cpu, mm) ({ (void)cpu; 0; }) | ||
133 | #define switch_and_save_asid(asid) (0) | ||
132 | #define set_TTB(pgd) do { } while (0) | 134 | #define set_TTB(pgd) do { } while (0) |
133 | #define get_TTB() (0) | 135 | #define get_TTB() (0) |
134 | #define activate_context(mm,cpu) do { } while (0) | 136 | #define activate_context(mm,cpu) do { } while (0) |
diff --git a/include/asm-sh/tlb_64.h b/include/asm-sh/tlb_64.h index 0308e05fc57b..0a96f3af69e3 100644 --- a/include/asm-sh/tlb_64.h +++ b/include/asm-sh/tlb_64.h | |||
@@ -56,6 +56,7 @@ static inline void __flush_tlb_slot(unsigned long long slot) | |||
56 | __asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot)); | 56 | __asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot)); |
57 | } | 57 | } |
58 | 58 | ||
59 | #ifdef CONFIG_MMU | ||
59 | /* arch/sh64/mm/tlb.c */ | 60 | /* arch/sh64/mm/tlb.c */ |
60 | int sh64_tlb_init(void); | 61 | int sh64_tlb_init(void); |
61 | unsigned long long sh64_next_free_dtlb_entry(void); | 62 | unsigned long long sh64_next_free_dtlb_entry(void); |
@@ -64,6 +65,13 @@ int sh64_put_wired_dtlb_entry(unsigned long long entry); | |||
64 | void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, | 65 | void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, |
65 | unsigned long asid, unsigned long paddr); | 66 | unsigned long asid, unsigned long paddr); |
66 | void sh64_teardown_tlb_slot(unsigned long long config_addr); | 67 | void sh64_teardown_tlb_slot(unsigned long long config_addr); |
67 | 68 | #else | |
69 | #define sh64_tlb_init() do { } while (0) | ||
70 | #define sh64_next_free_dtlb_entry() (0) | ||
71 | #define sh64_get_wired_dtlb_entry() (0) | ||
72 | #define sh64_put_wired_dtlb_entry(entry) do { } while (0) | ||
73 | #define sh64_setup_tlb_slot(conf, virt, asid, phys) do { } while (0) | ||
74 | #define sh64_teardown_tlb_slot(addr) do { } while (0) | ||
75 | #endif /* CONFIG_MMU */ | ||
68 | #endif /* __ASSEMBLY__ */ | 76 | #endif /* __ASSEMBLY__ */ |
69 | #endif /* __ASM_SH_TLB_64_H */ | 77 | #endif /* __ASM_SH_TLB_64_H */ |
diff --git a/include/asm-sh/uaccess_64.h b/include/asm-sh/uaccess_64.h index f956b7b316c7..a9b68d094844 100644 --- a/include/asm-sh/uaccess_64.h +++ b/include/asm-sh/uaccess_64.h | |||
@@ -274,7 +274,9 @@ struct exception_table_entry | |||
274 | unsigned long insn, fixup; | 274 | unsigned long insn, fixup; |
275 | }; | 275 | }; |
276 | 276 | ||
277 | #ifdef CONFIG_MMU | ||
277 | #define ARCH_HAS_SEARCH_EXTABLE | 278 | #define ARCH_HAS_SEARCH_EXTABLE |
279 | #endif | ||
278 | 280 | ||
279 | /* Returns 0 if exception not found and fixup.unit otherwise. */ | 281 | /* Returns 0 if exception not found and fixup.unit otherwise. */ |
280 | extern unsigned long search_exception_table(unsigned long addr); | 282 | extern unsigned long search_exception_table(unsigned long addr); |