PageRenderTime 25ms CodeModel.GetById 21ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/ia64/sn/kernel/sn2/cache.c

https://bitbucket.org/evzijst/gittest
C | 34 lines | 10 code | 1 blank | 23 comment | 0 complexity | af00d7e9cb70731f487d0d1d5e2f4cac MD5 | raw file
 1/*
 2 * This file is subject to the terms and conditions of the GNU General Public
 3 * License.  See the file "COPYING" in the main directory of this archive
 4 * for more details.
 5 * 
 6 * Copyright (C) 2001-2003 Silicon Graphics, Inc. All rights reserved.
 7 *
 8 */
 9#include <linux/module.h>
10#include <asm/pgalloc.h>
11
12/**
13 * sn_flush_all_caches - flush a range of address from all caches (incl. L4)
14 * @flush_addr: identity mapped region 7 address to start flushing
15 * @bytes: number of bytes to flush
16 *
17 * Flush a range of addresses from all caches including L4. 
18 * All addresses fully or partially contained within 
19 * @flush_addr to @flush_addr + @bytes are flushed
20 * from the all caches.
21 */
22void
23sn_flush_all_caches(long flush_addr, long bytes)
24{
25	flush_icache_range(flush_addr, flush_addr+bytes);
26	/*
27	 * The last call may have returned before the caches
28	 * were actually flushed, so we call it again to make
29	 * sure.
30	 */
31	flush_icache_range(flush_addr, flush_addr+bytes);
32	mb();
33}
34EXPORT_SYMBOL(sn_flush_all_caches);