1 /* MN10300 CPU cache invalidation routines, using automatic purge registers
3 * Copyright (C) 2011 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
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.
11 #include <linux/sys.h>
12 #include <linux/linkage.h>
13 #include <asm/cache.h>
14 #include <asm/irqflags.h>
15 #include <asm/cacheflush.h>
20 .globl debugger_local_cache_flushinv_one
22 ###############################################################################
24 # void debugger_local_cache_flushinv_one(u8 *addr)
26 # Invalidate one particular cacheline if it's in the icache
28 ###############################################################################
30 .globl debugger_local_cache_flushinv_one
31 .type debugger_local_cache_flushinv_one,@function
32 debugger_local_cache_flushinv_one:
38 beq mn10300_local_icache_inv_range_reg_end
44 # wait for the invalidator to quiesce
47 btst ICIVCR_ICIVBSY,d0
51 mov ~L1_CACHE_TAG_MASK,d0
54 # invalidate the cache line at the given address
55 and ~L1_CACHE_TAG_MASK,a1
59 # wait for the invalidator to quiesce again
62 btst ICIVCR_ICIVBSY,d0
67 mn10300_local_icache_inv_range_reg_end:
69 .size debugger_local_cache_flushinv_one,.-debugger_local_cache_flushinv_one