Skip to content

Commit

Permalink
Merge tag 'extable-for-linus' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  ...
  • Loading branch information
torvalds committed Feb 21, 2017
2 parents 0f002fd + 9085879 commit 6d1c42d
Show file tree
Hide file tree
Showing 40 changed files with 80 additions and 51 deletions.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/sched.h>
#include <linux/tty.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/kallsyms.h>
#include <linux/ratelimit.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/mman.h>
#include <linux/smp.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *);
Expand Down
3 changes: 2 additions & 1 deletion arch/arc/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
* Borrowed heavily from MIPS
*/

#include <linux/module.h>
#include <linux/export.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

int fixup_exception(struct pt_regs *regs)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/extable.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* linux/arch/arm/mm/extable.c
*/
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

int fixup_exception(struct pt_regs *regs)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/signal.h>
#include <linux/mm.h>
#include <linux/hardirq.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v32/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

#include <linux/ptrace.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>
#include <hwregs/supp_reg.h>
#include <hwregs/intr_vect_defs.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/frv/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* linux/arch/frv/mm/extable.c
*/

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/hexagon/mm/vm_fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <linux/uaccess.h>
#include <linux/mm.h>
#include <linux/signal.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/hardirq.h>

/*
Expand Down
35 changes: 35 additions & 0 deletions arch/ia64/include/asm/exception.h
Original file line number Diff line number Diff line change
@@ -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 */
15 changes: 0 additions & 15 deletions arch/ia64/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions arch/ia64/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 4 additions & 2 deletions arch/ia64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion arch/ia64/kernel/unaligned.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions arch/ia64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -15,6 +16,7 @@

#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/exception.h>

extern int die(char *, struct pt_regs *, long);

Expand Down
2 changes: 1 addition & 1 deletion arch/m32r/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* linux/arch/m32r/mm/extable.c
*/

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

int fixup_exception(struct pt_regs *regs)
Expand Down
2 changes: 1 addition & 1 deletion arch/m32r/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/tty.h>
#include <linux/vt_kern.h> /* For unblank_screen() */
#include <linux/highmem.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

#include <asm/m32r.h>
Expand Down
3 changes: 1 addition & 2 deletions arch/metag/mm/extable.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

int fixup_exception(struct pt_regs *regs)
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mn10300/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version.
*/
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/mn10300/mm/misalignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version.
*/
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/string.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/nios2/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* for more details.
*/

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

int fixup_exception(struct pt_regs *regs)
Expand Down
2 changes: 1 addition & 1 deletion arch/nios2/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>
#include <linux/ptrace.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/openrisc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/kmod.h>
#include <linux/string.h>
#include <linux/errno.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/openrisc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/sched.h>

#include <linux/uaccess.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/score/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/sched.h>

#include <asm/cacheflush.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/score/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <linux/module.h>
#include <linux/extable.h>

int fixup_exception(struct pt_regs *regs)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/score/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/string.h>
Expand Down
1 change: 0 additions & 1 deletion arch/sh/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ struct exception_table_entry {
#endif

int fixup_exception(struct pt_regs *regs);
const struct exception_table_entry *search_exception_tables(unsigned long addr);

extern void *set_exception_table_vec(unsigned int vec, void *handler);

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* for more details.
*/
#include <linux/kprobes.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/ptrace.h>
#include <linux/preempt.h>
#include <linux/kdebug.h>
Expand Down
3 changes: 2 additions & 1 deletion arch/sh/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <linux/hardirq.h>
#include <linux/kernel.h>
#include <linux/kexec.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/module.h> /* print_modules */
#include <asm/unwinder.h>
#include <asm/traps.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/extable_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* linux/arch/i386/mm/extable.c
*/

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

int fixup_exception(struct pt_regs *regs)
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/extable_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* for more details.
*/
#include <linux/rwsem.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

extern unsigned long copy_user_memcpy, copy_user_memcpy_end;
Expand Down
1 change: 1 addition & 0 deletions arch/sparc/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

void sort_extable(struct exception_table_entry *start,
Expand Down
2 changes: 1 addition & 1 deletion arch/unicore32/mm/extable.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/uaccess.h>

int fixup_exception(struct pt_regs *regs)
Expand Down
2 changes: 1 addition & 1 deletion arch/unicore32/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/signal.h>
#include <linux/mm.h>
#include <linux/hardirq.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

#include <linux/mm.h>
#include <linux/module.h>
#include <linux/extable.h>
#include <linux/hardirq.h>
#include <linux/perf_event.h>
#include <linux/uaccess.h>
Expand Down
Loading

0 comments on commit 6d1c42d

Please sign in to comment.