aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-04-24 23:58:40 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-05-08 06:51:37 -0400
commitccd805874198c248498b5f269656ec14397eeede (patch)
tree14a99723690c207906c4f7e84428457c4251b45d /include/asm-sh
parent9141d30a480850d989fc245909b98670a7b66ec1 (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.h12
-rw-r--r--include/asm-sh/mmu_context.h4
-rw-r--r--include/asm-sh/tlb_64.h10
-rw-r--r--include/asm-sh/uaccess_64.h2
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);
268unsigned long long poke_real_address_q(unsigned long long addr, 268unsigned 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 */
272unsigned long onchip_remap(unsigned long addr, unsigned long size,
273 const char *name);
274extern 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);
302void __iomem *__ioremap(unsigned long offset, unsigned long size, 297void __iomem *__ioremap(unsigned long offset, unsigned long size,
303 unsigned long flags); 298 unsigned long flags);
304void __iounmap(void __iomem *addr); 299void __iounmap(void __iomem *addr);
300
301/* arch/sh/mm/ioremap_64.c */
302unsigned long onchip_remap(unsigned long addr, unsigned long size,
303 const char *name);
304extern 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
310static inline void __iomem * 312static 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 */
60int sh64_tlb_init(void); 61int sh64_tlb_init(void);
61unsigned long long sh64_next_free_dtlb_entry(void); 62unsigned long long sh64_next_free_dtlb_entry(void);
@@ -64,6 +65,13 @@ int sh64_put_wired_dtlb_entry(unsigned long long entry);
64void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, 65void 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);
66void sh64_teardown_tlb_slot(unsigned long long config_addr); 67void 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. */
280extern unsigned long search_exception_table(unsigned long addr); 282extern unsigned long search_exception_table(unsigned long addr);