Skip to content

Commit 6d1c42d

Browse files
committed
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 ...
2 parents 0f002fd + 9085879 commit 6d1c42d

File tree

40 files changed

+80
-51
lines changed

40 files changed

+80
-51
lines changed

arch/alpha/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <linux/sched.h>
1414
#include <linux/tty.h>
1515
#include <linux/delay.h>
16-
#include <linux/module.h>
16+
#include <linux/extable.h>
1717
#include <linux/kallsyms.h>
1818
#include <linux/ratelimit.h>
1919

arch/alpha/mm/fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <linux/mman.h>
2323
#include <linux/smp.h>
2424
#include <linux/interrupt.h>
25-
#include <linux/module.h>
25+
#include <linux/extable.h>
2626
#include <linux/uaccess.h>
2727

2828
extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *);

arch/arc/mm/extable.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* Borrowed heavily from MIPS
99
*/
1010

11-
#include <linux/module.h>
11+
#include <linux/export.h>
12+
#include <linux/extable.h>
1213
#include <linux/uaccess.h>
1314

1415
int fixup_exception(struct pt_regs *regs)

arch/arm/mm/extable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* linux/arch/arm/mm/extable.c
33
*/
4-
#include <linux/module.h>
4+
#include <linux/extable.h>
55
#include <linux/uaccess.h>
66

77
int fixup_exception(struct pt_regs *regs)

arch/arm/mm/fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* it under the terms of the GNU General Public License version 2 as
99
* published by the Free Software Foundation.
1010
*/
11-
#include <linux/module.h>
11+
#include <linux/extable.h>
1212
#include <linux/signal.h>
1313
#include <linux/mm.h>
1414
#include <linux/hardirq.h>

arch/cris/arch-v32/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
#include <linux/ptrace.h>
6-
#include <linux/module.h>
6+
#include <linux/extable.h>
77
#include <linux/uaccess.h>
88
#include <hwregs/supp_reg.h>
99
#include <hwregs/intr_vect_defs.h>

arch/frv/mm/extable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* linux/arch/frv/mm/extable.c
33
*/
44

5-
#include <linux/module.h>
5+
#include <linux/extable.h>
66
#include <linux/spinlock.h>
77
#include <linux/uaccess.h>
88

arch/hexagon/mm/vm_fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <linux/uaccess.h>
3030
#include <linux/mm.h>
3131
#include <linux/signal.h>
32-
#include <linux/module.h>
32+
#include <linux/extable.h>
3333
#include <linux/hardirq.h>
3434

3535
/*

arch/ia64/include/asm/exception.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* This program is free software; you can redistribute it and/or modify
3+
* it under the terms of the GNU General Public License version 2 as
4+
* published by the Free Software Foundation.
5+
*
6+
* This program is distributed in the hope that it will be useful,
7+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
8+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9+
* GNU General Public License for more details.
10+
*
11+
* You should have received a copy of the GNU General Public License
12+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
13+
*/
14+
#ifndef __ASM_EXCEPTION_H
15+
#define __ASM_EXCEPTION_H
16+
17+
struct pt_regs;
18+
struct exception_table_entry;
19+
20+
extern void ia64_handle_exception(struct pt_regs *regs,
21+
const struct exception_table_entry *e);
22+
23+
#define ia64_done_with_exception(regs) \
24+
({ \
25+
int __ex_ret = 0; \
26+
const struct exception_table_entry *e; \
27+
e = search_exception_tables((regs)->cr_iip + ia64_psr(regs)->ri); \
28+
if (e) { \
29+
ia64_handle_exception(regs, e); \
30+
__ex_ret = 1; \
31+
} \
32+
__ex_ret; \
33+
})
34+
35+
#endif /* __ASM_EXCEPTION_H */

arch/ia64/include/asm/uaccess.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -353,21 +353,6 @@ struct exception_table_entry {
353353
int fixup; /* location-relative continuation addr.; if bit 2 is set, r9 is set to 0 */
354354
};
355355

356-
extern void ia64_handle_exception (struct pt_regs *regs, const struct exception_table_entry *e);
357-
extern const struct exception_table_entry *search_exception_tables (unsigned long addr);
358-
359-
static inline int
360-
ia64_done_with_exception (struct pt_regs *regs)
361-
{
362-
const struct exception_table_entry *e;
363-
e = search_exception_tables(regs->cr_iip + ia64_psr(regs)->ri);
364-
if (e) {
365-
ia64_handle_exception(regs, e);
366-
return 1;
367-
}
368-
return 0;
369-
}
370-
371356
#define ARCH_HAS_TRANSLATE_MEM_PTR 1
372357
static __inline__ void *
373358
xlate_dev_mem_ptr(phys_addr_t p)

0 commit comments

Comments
 (0)