#include <linux/elf.h>
#include <asm/tlb.h>
+#ifdef CONFIG_COLDFIRE
+#include <asm/cacheflush.h>
+#endif
+
asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long error_code);
}
/* Convert virtual (user) address VADDR to physical address PADDR */
+#ifndef CONFIG_COLDFIRE
#define virt_to_phys_040(vaddr) \
({ \
unsigned long _mmusr, _paddr; \
return 0;
}
+#endif /* CONFIG_COLDFIRE */
+
/* sys_cacheflush -- flush (part of) the processor cache. */
asmlinkage int
sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
goto out;
}
+#ifndef CONFIG_COLDFIRE
if (CPU_IS_020_OR_030) {
if (scope == FLUSH_SCOPE_LINE && len < 256) {
unsigned long cacr;
ret = cache_flush_060 (addr, scope, cache, len);
}
}
+#else /* CONFIG_COLDFIRE */
+ if ((cache & FLUSH_CACHE_INSN) && (cache & FLUSH_CACHE_DATA))
+ flush_bcache();
+ else if (cache & FLUSH_CACHE_INSN)
+ flush_icache();
+ else
+ flush_dcache();
+
+ ret = 0;
out:
return ret;
}