summaryrefslogtreecommitdiff
path: root/arch/tile/include/uapi/asm/cachectl.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 10:46:18 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 10:46:18 +0900
commit54f7fc25e5736c39050454fe6b5a2bed027fbfab (patch)
tree89b1d6395360c17d03a5c3900cb274932d12791e /arch/tile/include/uapi/asm/cachectl.h
parent0c4a479bdf7c0cf3fa1610b25e0c4ddd5b58713e (diff)
parentc19c6c954b9b264abdc21e0c855118e3daf019b0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull tile arch update from Chris Metcalf: "The bulk of this change is the tile uapi disintegration. There is also a one-line change in here to enable interrupts in do_work_pending() to avoid a WARN_ON in _local_bh_enable_ip()." * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: enable interrupts in do_work_pending() UAPI: (Scripted) Disintegrate arch/tile/include/asm UAPI: (Scripted) Disintegrate arch/tile/include/arch
Diffstat (limited to 'arch/tile/include/uapi/asm/cachectl.h')
-rw-r--r--arch/tile/include/uapi/asm/cachectl.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/tile/include/uapi/asm/cachectl.h b/arch/tile/include/uapi/asm/cachectl.h
new file mode 100644
index 000000000000..af4c9f9154d1
--- /dev/null
+++ b/arch/tile/include/uapi/asm/cachectl.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2011 Tilera Corporation. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT. See the GNU General Public License for
+ * more details.
+ */
+
+#ifndef _ASM_TILE_CACHECTL_H
+#define _ASM_TILE_CACHECTL_H
+
+/*
+ * Options for cacheflush system call.
+ *
+ * The ICACHE flush is performed on all cores currently running the
+ * current process's address space. The intent is for user
+ * applications to be able to modify code, invoke the system call,
+ * then allow arbitrary other threads in the same address space to see
+ * the newly-modified code. Passing a length of CHIP_L1I_CACHE_SIZE()
+ * or more invalidates the entire icache on all cores in the address
+ * spaces. (Note: currently this option invalidates the entire icache
+ * regardless of the requested address and length, but we may choose
+ * to honor the arguments at some point.)
+ *
+ * Flush and invalidation of memory can normally be performed with the
+ * __insn_flush(), __insn_inv(), and __insn_finv() instructions from
+ * userspace. The DCACHE option to the system call allows userspace
+ * to flush the entire L1+L2 data cache from the core. In this case,
+ * the address and length arguments are not used. The DCACHE flush is
+ * restricted to the current core, not all cores in the address space.
+ */
+#define ICACHE (1<<0) /* invalidate L1 instruction cache */
+#define DCACHE (1<<1) /* flush and invalidate data cache */
+#define BCACHE (ICACHE|DCACHE) /* flush both caches */
+
+#endif /* _ASM_TILE_CACHECTL_H */