2 * cache.S - PowerPC version
4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Copyright (C) 1996 Paul Mackerras
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #include "asm/ppc_asm.tmpl"
24 #include "asm/processor.h"
27 * Write any modified data cache blocks out to memory
28 * and invalidate the corresponding instruction cache blocks.
29 * This is a no-op on the 601.
31 * flush_icache_range(unsigned long start, unsigned long stop)
35 LG_CACHE_LINE_SIZE = 5
38 .globl flush_icache_range
39 .type flush_icache_range,@function
44 beqlr /* for 601, do nothing */
45 li r5,CACHE_LINE_SIZE-1
49 srwi. r4,r4,LG_CACHE_LINE_SIZE
54 addi r3,r3,CACHE_LINE_SIZE
56 sync /* wait for dcbst's to get to ram */
59 addi r6,r6,CACHE_LINE_SIZE
67 .type turn_off_mmu,@function
73 lis r2,(~(MSR_DR|MSR_IR))@h
74 ori r2,r2,(~(MSR_DR|MSR_IR))@l