summaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-10-19 16:20:25 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-10-19 16:30:32 +0900
commit1f666587dbf6bc660b23d8dd8abb6c572ce3eae5 (patch)
tree5fe9fc801e01a2feed7d1b7e65cafe6d4f23df84 /include/asm-sh
parent082c44d20eb4c6c4aa60ae7429ea184854cb0610 (diff)
downloadop-kernel-dev-1f666587dbf6bc660b23d8dd8abb6c572ce3eae5.zip
op-kernel-dev-1f666587dbf6bc660b23d8dd8abb6c572ce3eae5.tar.gz
sh: Fix exception_handling_table alignment.
With the recent change ripping out interrupt_table, explicit padding of the table was missing, causing bad things to happen when manually inserting handlers in to the table. This problem particularly showed up in relation to do_fpu_state_restore() which was inserted quite deeply in to the table and ended up scribbling over a slab object. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/system.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index 6c1f8fd..3340126 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -353,6 +353,13 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
(unsigned long)_n_, sizeof(*(ptr))); \
})
+extern void *set_exception_table_vec(unsigned int vec, void *handler);
+
+static inline void *set_exception_table_evt(unsigned int evt, void *handler)
+{
+ return set_exception_table_vec(evt >> 5, handler);
+}
+
/* XXX
* disable hlt during certain critical i/o operations
*/
OpenPOWER on IntegriCloud