/* Ensure that the data held in the page kaddr is written back to the page in question. */
void v7m_flush_kern_dcache_area(void *addr, size_t size)
/* Ensure that the data held in the page kaddr is written back to the page in question. */
void v7m_flush_kern_dcache_area(void *addr, size_t size)
{
	u32	s = (u32)addr, e = (u32)addr + size;
	asm("dsb");
	if (s & (L1_CACHE_BYTES - 1)) {
		DCCIMVAC(s);
		s = (s + L1_CACHE_BYTES) & ~(L1_CACHE_BYTES - 1);
	}
	if (e & (L1_CACHE_BYTES - 1)) {
		DCCIMVAC(e);
		e &= ~(L1_CACHE_BYTES - 1);
	}
	for ( ; s < e; s += L1_CACHE_BYTES)
		DCCIMVAC(s);
	asm("dsb");
}