void
sn_flush_all_caches(long flush_addr, long bytes)
{
	unsigned long addr = flush_addr;

	/*                                 */
	if (is_shub1() && (addr & RGN_BITS) == RGN_BASE(RGN_UNCACHED))
		addr = (addr - RGN_BASE(RGN_UNCACHED)) + RGN_BASE(RGN_KERNEL);

	flush_icache_range(addr, addr + bytes);
	/*
                                                     
                                                      
         
  */
	flush_icache_range(addr, addr + bytes);
	mb();
}
Exemple #2
0
/**
 * sn_flush_all_caches - flush a range of address from all caches (incl. L4)
 * @flush_addr: identity mapped region 7 address to start flushing
 * @bytes: number of bytes to flush
 *
 * Flush a range of addresses from all caches including L4. 
 * All addresses fully or partially contained within 
 * @flush_addr to @flush_addr + @bytes are flushed
 * from all caches.
 */
void
sn_flush_all_caches(long flush_addr, long bytes)
{
    unsigned long addr = flush_addr;

    /* SHub1 requires a cached address */
    if (is_shub1() && (addr & RGN_BITS) == RGN_BASE(RGN_UNCACHED))
        addr = (addr - RGN_BASE(RGN_UNCACHED)) + RGN_BASE(RGN_KERNEL);

    flush_icache_range(addr, addr + bytes);
    /*
     * The last call may have returned before the caches
     * were actually flushed, so we call it again to make
     * sure.
     */
    flush_icache_range(addr, addr + bytes);
    mb();
}