summaryrefslogtreecommitdiffstats
path: root/arch/parisc/mm/fault.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2013-10-13 21:11:30 +0200
committerHelge Deller <deller@gmx.de>2013-11-07 22:25:33 +0100
commit61dbbaeb86c2181c79efae2d186193e0f8008af1 (patch)
treed12b369af162dcdb8835731b36da025158c8b616 /arch/parisc/mm/fault.c
parent5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff)
downloadblackbird-op-linux-61dbbaeb86c2181c79efae2d186193e0f8008af1.tar.gz
blackbird-op-linux-61dbbaeb86c2181c79efae2d186193e0f8008af1.zip
parisc: provide macro to create exception table entries
Provide a macro ASM_EXCEPTIONTABLE_ENTRY() to create exception table entries and convert all open-coded places to use that macro. This patch is a first step toward creating a exception table which only holds 32bit pointers even on a 64bit kernel. That way in my own kernel I was able to reduce the in-kernel exception table from 44kB to 22kB. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/mm/fault.c')
-rw-r--r--arch/parisc/mm/fault.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index 0293588d5b8c..df0d32971cdf 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -142,6 +142,12 @@ int fixup_exception(struct pt_regs *regs)
{
const struct exception_table_entry *fix;
+ /* If we only stored 32bit addresses in the exception table we can drop
+ * out if we faulted on a 64bit address. */
+ if ((sizeof(regs->iaoq[0]) > sizeof(fix->insn))
+ && (regs->iaoq[0] >> 32))
+ return 0;
+
fix = search_exception_tables(regs->iaoq[0]);
if (fix) {
struct exception_data *d;
OpenPOWER on IntegriCloud