| David Howells | 7f386ac | 2011-03-18 16:54:30 +0000 | [diff] [blame] | 1 | /* MN10300 CPU cache invalidation routines | 
 | 2 |  * | 
 | 3 |  * Copyright (C) 2011 Red Hat, Inc. All Rights Reserved. | 
 | 4 |  * Written by David Howells (dhowells@redhat.com) | 
 | 5 |  * | 
 | 6 |  * This program is free software; you can redistribute it and/or | 
 | 7 |  * modify it under the terms of the GNU General Public Licence | 
 | 8 |  * as published by the Free Software Foundation; either version | 
 | 9 |  * 2 of the Licence, or (at your option) any later version. | 
 | 10 |  */ | 
 | 11 | #include <linux/sys.h> | 
 | 12 | #include <linux/linkage.h> | 
 | 13 | #include <asm/smp.h> | 
 | 14 | #include <asm/page.h> | 
 | 15 | #include <asm/cache.h> | 
 | 16 | #include <asm/irqflags.h> | 
 | 17 | #include <asm/cacheflush.h> | 
 | 18 | #include "cache.inc" | 
 | 19 |  | 
 | 20 | 	.am33_2 | 
 | 21 |  | 
 | 22 | 	.globl	debugger_local_cache_flushinv | 
 | 23 |  | 
 | 24 | ############################################################################### | 
 | 25 | # | 
 | 26 | # void debugger_local_cache_flushinv(void) | 
 | 27 | # | 
 | 28 | # Invalidate the entire icache | 
 | 29 | # | 
 | 30 | ############################################################################### | 
 | 31 | 	ALIGN | 
 | 32 | 	.globl	debugger_local_cache_flushinv | 
 | 33 |         .type	debugger_local_cache_flushinv,@function | 
 | 34 | debugger_local_cache_flushinv: | 
 | 35 | 	# | 
 | 36 | 	# we only need to invalidate the icache in this cache mode | 
 | 37 | 	# | 
 | 38 | 	mov	CHCTR,a0 | 
 | 39 | 	movhu	(a0),d0 | 
 | 40 | 	btst	CHCTR_ICEN,d0 | 
 | 41 | 	beq	debugger_local_cache_flushinv_end | 
 | 42 |  | 
 | 43 | 	invalidate_icache 1 | 
 | 44 |  | 
 | 45 | debugger_local_cache_flushinv_end: | 
 | 46 | 	ret	[],0 | 
 | 47 | 	.size	debugger_local_cache_flushinv,.-debugger_local_cache_flushinv |