diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-21 14:28:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-21 14:28:55 -0800 |
commit | 6d1c42d9b93e38595ad46eeb4634853ca2755c92 (patch) | |
tree | 2624194ba389462c6b0479d8946c6c1069e885d3 /arch/ia64 | |
parent | 0f002fddbe150ec3f2afce3fc09de5bda3096c72 (diff) | |
parent | 90858794c96028ec1294fda12488a19f3a2b1d4a (diff) | |
download | linux-6d1c42d9b93e38595ad46eeb4634853ca2755c92.tar.gz linux-6d1c42d9b93e38595ad46eeb4634853ca2755c92.tar.bz2 linux-6d1c42d9b93e38595ad46eeb4634853ca2755c92.zip |
Merge tag 'extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
Pull exception table module split from Paul Gortmaker:
"Final extable.h related changes.
This completes the separation of exception table content from the
module.h header file. This is achieved with the final commit that
removes the one line back compatible change that sourced extable.h
into the module.h file.
The commits are unchanged since January, with the exception of a
couple Acks that came in for the last two commits a bit later. The
changes have been in linux-next for quite some time[1] and have got
widespread arch coverage via toolchains I have and also from
additional ones the kbuild bot has.
Maintaners of the various arch were Cc'd during the postings to
lkml[2] and informed that the intention was to take the remaining arch
specific changes and lump them together with the final two non-arch
specific changes and submit for this merge window.
The ia64 diffstat stands out and probably warrants a mention. In an
earlier review, Al Viro made a valid comment that the original header
separation of content left something to be desired, and that it get
fixed as a part of this change, hence the larger diffstat"
* tag 'extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (21 commits)
module.h: remove extable.h include now users have migrated
core: migrate exception table users off module.h and onto extable.h
cris: migrate exception table users off module.h and onto extable.h
hexagon: migrate exception table users off module.h and onto extable.h
microblaze: migrate exception table users off module.h and onto extable.h
unicore32: migrate exception table users off module.h and onto extable.h
score: migrate exception table users off module.h and onto extable.h
metag: migrate exception table users off module.h and onto extable.h
arc: migrate exception table users off module.h and onto extable.h
nios2: migrate exception table users off module.h and onto extable.h
sparc: migrate exception table users onto extable.h
openrisc: migrate exception table users off module.h and onto extable.h
frv: migrate exception table users off module.h and onto extable.h
sh: migrate exception table users off module.h and onto extable.h
xtensa: migrate exception table users off module.h and onto extable.h
mn10300: migrate exception table users off module.h and onto extable.h
alpha: migrate exception table users off module.h and onto extable.h
arm: migrate exception table users off module.h and onto extable.h
m32r: migrate exception table users off module.h and onto extable.h
ia64: ensure exception table search users include extable.h
...
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/include/asm/exception.h | 35 | ||||
-rw-r--r-- | arch/ia64/include/asm/uaccess.h | 15 | ||||
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/traps.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/unaligned.c | 4 | ||||
-rw-r--r-- | arch/ia64/mm/fault.c | 2 |
6 files changed, 46 insertions, 20 deletions
diff --git a/arch/ia64/include/asm/exception.h b/arch/ia64/include/asm/exception.h new file mode 100644 index 000000000000..6bb246dcdaeb --- /dev/null +++ b/arch/ia64/include/asm/exception.h @@ -0,0 +1,35 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef __ASM_EXCEPTION_H +#define __ASM_EXCEPTION_H + +struct pt_regs; +struct exception_table_entry; + +extern void ia64_handle_exception(struct pt_regs *regs, + const struct exception_table_entry *e); + +#define ia64_done_with_exception(regs) \ +({ \ + int __ex_ret = 0; \ + const struct exception_table_entry *e; \ + e = search_exception_tables((regs)->cr_iip + ia64_psr(regs)->ri); \ + if (e) { \ + ia64_handle_exception(regs, e); \ + __ex_ret = 1; \ + } \ + __ex_ret; \ +}) + +#endif /* __ASM_EXCEPTION_H */ diff --git a/arch/ia64/include/asm/uaccess.h b/arch/ia64/include/asm/uaccess.h index bfe13196f770..471044be2a3b 100644 --- a/arch/ia64/include/asm/uaccess.h +++ b/arch/ia64/include/asm/uaccess.h @@ -353,21 +353,6 @@ struct exception_table_entry { int fixup; /* location-relative continuation addr.; if bit 2 is set, r9 is set to 0 */ }; -extern void ia64_handle_exception (struct pt_regs *regs, const struct exception_table_entry *e); -extern const struct exception_table_entry *search_exception_tables (unsigned long addr); - -static inline int -ia64_done_with_exception (struct pt_regs *regs) -{ - const struct exception_table_entry *e; - e = search_exception_tables(regs->cr_iip + ia64_psr(regs)->ri); - if (e) { - ia64_handle_exception(regs, e); - return 1; - } - return 0; -} - #define ARCH_HAS_TRANSLATE_MEM_PTR 1 static __inline__ void * xlate_dev_mem_ptr(phys_addr_t p) diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 45ff27e9edbb..f5f3a5e6fcd1 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -28,12 +28,12 @@ #include <linux/string.h> #include <linux/slab.h> #include <linux/preempt.h> -#include <linux/moduleloader.h> +#include <linux/extable.h> #include <linux/kdebug.h> #include <asm/pgtable.h> #include <asm/sections.h> -#include <linux/uaccess.h> +#include <asm/exception.h> extern void jprobe_inst_return(void); diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 095bfaff82d0..8981ce98afb3 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c @@ -12,16 +12,18 @@ #include <linux/sched.h> #include <linux/tty.h> #include <linux/vt_kern.h> /* For unblank_screen() */ -#include <linux/module.h> /* for EXPORT_SYMBOL */ +#include <linux/export.h> +#include <linux/extable.h> #include <linux/hardirq.h> #include <linux/kprobes.h> #include <linux/delay.h> /* for ssleep() */ #include <linux/kdebug.h> +#include <linux/uaccess.h> #include <asm/fpswa.h> #include <asm/intrinsics.h> #include <asm/processor.h> -#include <linux/uaccess.h> +#include <asm/exception.h> #include <asm/setup.h> fpswa_interface_t *fpswa_interface; diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 9cd01c2200ee..99348d7f2255 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c @@ -17,12 +17,14 @@ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/tty.h> +#include <linux/extable.h> #include <linux/ratelimit.h> +#include <linux/uaccess.h> #include <asm/intrinsics.h> #include <asm/processor.h> #include <asm/rse.h> -#include <linux/uaccess.h> +#include <asm/exception.h> #include <asm/unaligned.h> extern int die_if_kernel(char *str, struct pt_regs *regs, long err); diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index fa6ad95e992e..7f2feb21753c 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c @@ -7,6 +7,7 @@ #include <linux/sched.h> #include <linux/kernel.h> #include <linux/mm.h> +#include <linux/extable.h> #include <linux/interrupt.h> #include <linux/kprobes.h> #include <linux/kdebug.h> @@ -15,6 +16,7 @@ #include <asm/pgtable.h> #include <asm/processor.h> +#include <asm/exception.h> extern int die(char *, struct pt_regs *, long); |