3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
4 * Copyright (C) 1996 Paul Mackerras.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include "asm/ppc_asm.tmpl"
13 #include "asm/processor.h"
16 * Write any modified data cache blocks out to memory
17 * and invalidate the corresponding instruction cache blocks.
18 * This is a no-op on the 601.
20 * flush_icache_range(unsigned long start, unsigned long stop)
24 LG_CACHE_LINE_SIZE = 5
27 .globl flush_icache_range
28 .type flush_icache_range,@function
33 beqlr /* for 601, do nothing */
34 li r5,CACHE_LINE_SIZE-1
38 srwi. r4,r4,LG_CACHE_LINE_SIZE
43 addi r3,r3,CACHE_LINE_SIZE
45 sync /* wait for dcbst's to get to ram */
48 addi r6,r6,CACHE_LINE_SIZE
56 .type turn_off_mmu,@function
62 lis r2,(~(MSR_DR|MSR_IR))@h
63 ori r2,r2,(~(MSR_DR|MSR_IR))@l