/* For now use approach (2) for small ranges and (5) for large ones.  */
static void sh64_dcache_purge_user_range(struct mm_struct *mm, unsigned long start, unsigned long end)
/* For now use approach (2) for small ranges and (5) for large ones.  */
static void sh64_dcache_purge_user_range(struct mm_struct *mm, unsigned long start, unsigned long end)
{
	int n_pages = ((end - start) >> PAGE_SHIFT);
	if (n_pages >= 64 || ((start ^ (end - 1)) & PMD_MASK)) {
		sh64_dcache_purge_all();
	} else {
		start &= PAGE_MASK;
		end = PAGE_ALIGN(end);
		sh64_dcache_purge_user_pages(mm, start, end);
	}
}