diff options
author | Stuart Menefy <stuart.menefy@st.com> | 2009-08-24 05:16:56 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-24 05:16:56 -0400 |
commit | 6d243dd37002bcee54841852ab1b8606fd457851 (patch) | |
tree | 9c8e55d065116647615a86e3eb0c783fe98cc83e /arch/sh/include | |
parent | a5cf9e2444ec15de5407696ff21c32dd21ca0a8d (diff) |
sh: Add sys_cacheflush() call for SH CPUs.
Adds a system call to allow user code to flush code from the cache.
You can use instructions for the data side, but the iside can
only be done by a flush ROM which really only works with a direct
mapped cache. The later SH4's have 2 way Iside, so this call allows
a portable way to flush the cache.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/Kbuild | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/cachectl.h | 12 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_32.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_64.h | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index 43910cdf78a5..e121c30f797d 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild | |||
@@ -1,6 +1,6 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += cpu-features.h | 3 | header-y += cachectl.h cpu-features.h |
4 | 4 | ||
5 | unifdef-y += unistd_32.h | 5 | unifdef-y += unistd_32.h |
6 | unifdef-y += unistd_64.h | 6 | unifdef-y += unistd_64.h |
diff --git a/arch/sh/include/asm/cachectl.h b/arch/sh/include/asm/cachectl.h new file mode 100644 index 000000000000..305dd7082a66 --- /dev/null +++ b/arch/sh/include/asm/cachectl.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _SH_CACHECTL_H | ||
2 | #define _SH_CACHECTL_H | ||
3 | |||
4 | /* Definitions for the cacheflush system call. */ | ||
5 | |||
6 | #define CACHEFLUSH_D_INVAL 0x1 /* invalidate (without write back) */ | ||
7 | #define CACHEFLUSH_D_WB 0x2 /* write back (without invalidate) */ | ||
8 | #define CACHEFLUSH_D_PURGE 0x3 /* writeback and invalidate */ | ||
9 | |||
10 | #define CACHEFLUSH_I 0x4 | ||
11 | |||
12 | #endif /* _SH_CACHECTL_H */ | ||
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h index 61d6ad93d786..925dd40d9d55 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/asm/unistd_32.h | |||
@@ -132,7 +132,7 @@ | |||
132 | #define __NR_clone 120 | 132 | #define __NR_clone 120 |
133 | #define __NR_setdomainname 121 | 133 | #define __NR_setdomainname 121 |
134 | #define __NR_uname 122 | 134 | #define __NR_uname 122 |
135 | #define __NR_modify_ldt 123 | 135 | #define __NR_cacheflush 123 |
136 | #define __NR_adjtimex 124 | 136 | #define __NR_adjtimex 124 |
137 | #define __NR_mprotect 125 | 137 | #define __NR_mprotect 125 |
138 | #define __NR_sigprocmask 126 | 138 | #define __NR_sigprocmask 126 |
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h index a751699afda3..2b84bc916bc5 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/asm/unistd_64.h | |||
@@ -137,7 +137,7 @@ | |||
137 | #define __NR_clone 120 | 137 | #define __NR_clone 120 |
138 | #define __NR_setdomainname 121 | 138 | #define __NR_setdomainname 121 |
139 | #define __NR_uname 122 | 139 | #define __NR_uname 122 |
140 | #define __NR_modify_ldt 123 | 140 | #define __NR_cacheflush 123 |
141 | #define __NR_adjtimex 124 | 141 | #define __NR_adjtimex 124 |
142 | #define __NR_mprotect 125 | 142 | #define __NR_mprotect 125 |
143 | #define __NR_sigprocmask 126 | 143 | #define __NR_sigprocmask 126 |