s390 fixes (5/12).
PATCH 1/1 s390 fixes (5/12).
update extable support in s390 and s390x
this makes use of the unified extable code. for 31 bit s390, this is slightly more complicated than the other architectures, but as long as no one outside /arch uses search_exception_tables, everything should work nicely
arch/s390/kernel/traps.c +3 -2
@@ -268,9 +268,10 @@ }#endif }else { -unsigned long fixup =search_exception_table (regs->psw.addr); +const struct exception_table_entry *fixup; + fixup =search_exception_tables (regs->psw.addr &0x7fffffff );if (fixup) - regs->psw.addr = fixup; + regs->psw.addr = fixup->fixup |PSW_ADDR_AMODE31 ;else die (str, regs, interruption_code); }
arch/s390/mm/extable.c +14 -55
87 lines not on this page · raw message
arch/s390/mm/fault.c +5 -3
@@ -25,6 +25,7 @@#include <linux/compatmac.h> #include <linux/init.h> #include <linux/console.h> +#include <linux/module.h> #include <asm/system.h> #include <asm/uaccess.h>
@@ -151,7 +152,7 @@struct vm_area_struct * vma;unsigned long address;int user_address; -unsigned long fixup; +const struct exception_table_entry *fixup;int si_code =SEGV_MAPERR ; tsk = current;
@@ -267,8 +268,9 @@ no_context:/* Are we prepared to handle this kernel fault? */ -if ((fixup =search_exception_table (regs->psw.addr)) !=0 ) { - regs->psw.addr = fixup; + fixup =search_exception_tables (regs->psw.addr &0x7fffffff ); +if (fixup) { + regs->psw.addr = fixup->fixup |PSW_ADDR_AMODE31 ;return ; }
arch/s390x/kernel/traps.c +3 -2
@@ -269,9 +269,10 @@ }#endif }else { -unsigned long fixup =search_exception_table (regs->psw.addr); +const struct exception_table_entry *fixup; + fixup =search_exception_tables (regs->psw.addr);if (fixup) - regs->psw.addr = fixup; + regs->psw.addr = fixup->fixup;else die (str, regs, interruption_code); }
arch/s390x/mm/extable.c +13 -47
71 lines not on this page · raw message
arch/s390x/mm/fault.c +5 -3
@@ -24,6 +24,7 @@#include <linux/smp_lock.h> #include <linux/init.h> #include <linux/console.h> +#include <linux/module.h> #include <asm/system.h> #include <asm/uaccess.h>
@@ -151,7 +152,7 @@struct vm_area_struct * vma;unsigned long address;int user_address; -unsigned long fixup; +const struct exception_table_entry *fixup;int si_code =SEGV_MAPERR ; tsk = current;
@@ -267,8 +268,9 @@ no_context:/* Are we prepared to handle this kernel fault? */ -if ((fixup =search_exception_table (regs->psw.addr)) !=0 ) { - regs->psw.addr = fixup; + fixup =search_exception_tables (regs->psw.addr); +if (fixup) { + regs->psw.addr = fixup->fixup;return ; }
include/asm-s390/uaccess.h +0 -4
@@ -71,10 +71,6 @@unsigned long insn, fixup; }; -/* Returns 0 if exception not found and fixup otherwise. */ -extern unsigned long search_exception_table (unsigned long ); - -/* * These are the main single-value transfer routines. They automatically * use the right size if we just have the right pointer type.
include/asm-s390x/uaccess.h +0 -4
@@ -71,10 +71,6 @@unsigned long insn, fixup; }; -/* Returns 0 if exception not found and fixup otherwise. */ -extern unsigned long search_exception_table (unsigned long ); - -/* * These are the main single-value transfer routines. They automatically * use the right size if we just have the right pointer type.