void l2x0_invalid_range(unsigned long start, unsigned long end) { if (start & (CACHE_LINE_SIZE - 1)) { start &= ~(CACHE_LINE_SIZE - 1); l2x0_flush_line(start); start += CACHE_LINE_SIZE; } if (end & (CACHE_LINE_SIZE - 1)) { end &= ~(CACHE_LINE_SIZE - 1); l2x0_flush_line(end); } while (start < end) { unsigned long blk_end = start + min(end - start, 4096UL); while (start < blk_end) { l2x0_inv_line(start); start += CACHE_LINE_SIZE; } if (blk_end < end) { } } cache_wait( L2X0_INV_LINE_PA, 1); cache_sync(); }
void dcache_inv_line(unsigned addr) { #ifndef CONFIG_SYS_NO_DCACHE _invalidate_dcache_addr(addr); #endif #ifdef CONFIG_CACHE_L2X0 l2x0_inv_line(addr); #endif }
static void l2x0_inv_range(unsigned long start, unsigned long end) { void __iomem *base = l2x0_base; unsigned long flags; l2x0_lock(&l2x0_lock, flags); if (start & (CACHE_LINE_SIZE - 1)) { start &= ~(CACHE_LINE_SIZE - 1); debug_writel(0x03); l2x0_flush_line(start); debug_writel(0x00); start += CACHE_LINE_SIZE; } if (end & (CACHE_LINE_SIZE - 1)) { end &= ~(CACHE_LINE_SIZE - 1); debug_writel(0x03); l2x0_flush_line(end); debug_writel(0x00); } while (start < end) { unsigned long blk_end = block_end(start, end); while (start < blk_end) { l2x0_inv_line(start); start += CACHE_LINE_SIZE; } if (blk_end < end) { l2x0_unlock(&l2x0_lock, flags); l2x0_lock(&l2x0_lock, flags); } } cache_wait(base + L2X0_INV_LINE_PA, 1); cache_sync(); l2x0_unlock(&l2x0_lock, flags); }
static void l2x0_inv_range(unsigned long start, unsigned long end) { #ifndef CONFIG_EMXX_L310_NORAM void __iomem *base = l2x0_base; #endif unsigned long flags; _l2x0_lock(&l2x0_lock, flags); #ifndef CONFIG_EMXX_L310_NORAM if (start & (CACHE_LINE_SIZE - 1)) { start &= ~(CACHE_LINE_SIZE - 1); l2x0_flush_line(start); start += CACHE_LINE_SIZE; } if (end & (CACHE_LINE_SIZE - 1)) { end &= ~(CACHE_LINE_SIZE - 1); l2x0_flush_line(end); } while (start < end) { unsigned long blk_end = block_end(start, end); while (start < blk_end) { l2x0_inv_line(start); start += CACHE_LINE_SIZE; } if (blk_end < end) { _l2x0_unlock(&l2x0_lock, flags); _l2x0_lock(&l2x0_lock, flags); } } cache_wait(base + L2X0_INV_LINE_PA, 1); #endif cache_sync(); _l2x0_unlock(&l2x0_lock, flags); }