sh64: Fixup the nommu build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
+7
-5
@@ -268,11 +268,6 @@ unsigned long long peek_real_address_q(unsigned long long addr);
|
||||
unsigned long long poke_real_address_q(unsigned long long addr,
|
||||
unsigned long long val);
|
||||
|
||||
/* arch/sh/mm/ioremap_64.c */
|
||||
unsigned long onchip_remap(unsigned long addr, unsigned long size,
|
||||
const char *name);
|
||||
extern void onchip_unmap(unsigned long vaddr);
|
||||
|
||||
#if !defined(CONFIG_MMU)
|
||||
#define virt_to_phys(address) ((unsigned long)(address))
|
||||
#define phys_to_virt(address) ((void *)(address))
|
||||
@@ -302,9 +297,16 @@ extern void onchip_unmap(unsigned long vaddr);
|
||||
void __iomem *__ioremap(unsigned long offset, unsigned long size,
|
||||
unsigned long flags);
|
||||
void __iounmap(void __iomem *addr);
|
||||
|
||||
/* arch/sh/mm/ioremap_64.c */
|
||||
unsigned long onchip_remap(unsigned long addr, unsigned long size,
|
||||
const char *name);
|
||||
extern void onchip_unmap(unsigned long vaddr);
|
||||
#else
|
||||
#define __ioremap(offset, size, flags) ((void __iomem *)(offset))
|
||||
#define __iounmap(addr) do { } while (0)
|
||||
#define onchip_remap(addr, size, name) (addr)
|
||||
#define onchip_unmap(addr) do { } while (0)
|
||||
#endif /* CONFIG_MMU */
|
||||
|
||||
static inline void __iomem *
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
/* ASID is 8-bit value, so it can't be 0x100 */
|
||||
#define MMU_NO_ASID 0x100
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define asid_cache(cpu) (cpu_data[cpu].asid_cache)
|
||||
#define cpu_context(cpu, mm) ((mm)->context.id[cpu])
|
||||
|
||||
@@ -38,7 +39,6 @@
|
||||
*/
|
||||
#define MMU_VPN_MASK 0xfffff000
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#if defined(CONFIG_SUPERH32)
|
||||
#include "mmu_context_32.h"
|
||||
#else
|
||||
@@ -129,6 +129,8 @@ static inline void switch_mm(struct mm_struct *prev,
|
||||
#define destroy_context(mm) do { } while (0)
|
||||
#define set_asid(asid) do { } while (0)
|
||||
#define get_asid() (0)
|
||||
#define cpu_asid(cpu, mm) ({ (void)cpu; 0; })
|
||||
#define switch_and_save_asid(asid) (0)
|
||||
#define set_TTB(pgd) do { } while (0)
|
||||
#define get_TTB() (0)
|
||||
#define activate_context(mm,cpu) do { } while (0)
|
||||
|
||||
@@ -56,6 +56,7 @@ static inline void __flush_tlb_slot(unsigned long long slot)
|
||||
__asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
/* arch/sh64/mm/tlb.c */
|
||||
int sh64_tlb_init(void);
|
||||
unsigned long long sh64_next_free_dtlb_entry(void);
|
||||
@@ -64,6 +65,13 @@ int sh64_put_wired_dtlb_entry(unsigned long long entry);
|
||||
void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr,
|
||||
unsigned long asid, unsigned long paddr);
|
||||
void sh64_teardown_tlb_slot(unsigned long long config_addr);
|
||||
|
||||
#else
|
||||
#define sh64_tlb_init() do { } while (0)
|
||||
#define sh64_next_free_dtlb_entry() (0)
|
||||
#define sh64_get_wired_dtlb_entry() (0)
|
||||
#define sh64_put_wired_dtlb_entry(entry) do { } while (0)
|
||||
#define sh64_setup_tlb_slot(conf, virt, asid, phys) do { } while (0)
|
||||
#define sh64_teardown_tlb_slot(addr) do { } while (0)
|
||||
#endif /* CONFIG_MMU */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASM_SH_TLB_64_H */
|
||||
|
||||
@@ -274,7 +274,9 @@ struct exception_table_entry
|
||||
unsigned long insn, fixup;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define ARCH_HAS_SEARCH_EXTABLE
|
||||
#endif
|
||||
|
||||
/* Returns 0 if exception not found and fixup.unit otherwise. */
|
||||
extern unsigned long search_exception_table(unsigned long addr);
|
||||
|
||||
Reference in New Issue
Block a user