m68k: merge mmu and non-mmu traps.c files
Subsystems (2)
cover m68k: merge mmu and non-mmu traps.c files
Merge the mmu arch/m68k/kernel/traps_mm.c and non-mmu traps_no.c. By moving out the vector setting code the rest of the traps code is the same for all m68k CPU types.
a/arch/m68k/kernel/traps_mm.c | 1092 ----------------------------------- arch/m68k/kernel/traps_no.c | 361 ----------- b/arch/m68k/include/asm/processor.h | 6 b/arch/m68k/kernel/Makefile | 2 b/arch/m68k/kernel/traps.c | 1108 +++++++++++++++++++++++++++++++++++- b/arch/m68k/kernel/traps_mm.c | 115 --- b/arch/m68k/kernel/vectors.c | 145 ++++ 7 files changed, 1257 insertions(+), 1572 deletions(-)
PATCH 1/2 m68k: move hardware vector setting from traps.c to its own file
From: Greg Ungerer <[email protected]>
Most of the trap.c code is general to all m68k arch members. But the code it currently contains to set the hardware vector table is quite specific to the 680x0 family. They can have the vector table at any address unlike other family members (which either support only a single fixed address, or a limited range of addresses). So lets move that code out to a new file, vectors.c. This will make sharing the rest of the trap.c code easier and cleaner.
--- arch/m68k/kernel/Makefile | 2 +- arch/m68k/kernel/traps_mm.c | 115 ---------------------------------- arch/m68k/kernel/vectors.c | 145 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 116 deletions(-) create mode 100644 arch/m68k/kernel/vectors.c
arch/m68k/kernel/Makefile +1 -1
@@ -10,7 +10,7 @@ obj-y := entry.o m68k_ksyms.o process.o ptrace.o setup.o signal.o \ sys_m68k.o syscalltable.o time.o traps.o obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo -obj-$(CONFIG_MMU) += ints.o module.o devres.o +obj-$(CONFIG_MMU) += ints.o module.o devres.o vectors.c devres-$(CONFIG_MMU) = ../../../kernel/irq/devres.o ifndef CONFIG_MMU
arch/m68k/kernel/traps_mm.c +0 -115
121 lines not on this page · raw message
arch/m68k/kernel/vectors.c new file +145 -0
145 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 2/2 m68k: merge the mmu and non-mmu traps.c files
In reply to [email protected]From: Greg Ungerer <[email protected]>
The code for handling traps in the non-mmu case is a subset of the mmu enabled case. Merge the non-mmu traps_no.c code back to a single traps.c. There is actually no code mmu specific here at all, and the processor specific code (for the more complex 68020/68030/68040/68060) is already proplerly conditionaly used.
The format of console exception dumps is a little different after this for the non-mmu case.
--- arch/m68k/include/asm/processor.h | 6 + arch/m68k/kernel/traps.c | 1108 ++++++++++++++++++++++++++++++++++++- arch/m68k/kernel/traps_mm.c | 1092 ------------------------------------ arch/m68k/kernel/traps_no.c | 361 ------------ 4 files changed, 1111 insertions(+), 1456 deletions(-) delete mode 100644 arch/m68k/kernel/traps_mm.c delete mode 100644 arch/m68k/kernel/traps_no.c
arch/m68k/include/asm/processor.h +6 -0
@@ -135,6 +135,12 @@ do { \wrusp (_usp); \ } while(0) +static inline int handle_kernel_fault(struct pt_regs *regs) +{ +/* Any fault in kernel is fatal on non-mmu */ +return 0 ; +} +#endif /* Forward declaration, a strange C thing */
arch/m68k/kernel/traps.c +1105 -3
1,110 lines not on this page · raw message
arch/m68k/kernel/traps_mm.c deleted +0 -1092
1,092 lines not on this page · raw message
arch/m68k/kernel/traps_no.c deleted +0 -361
361 lines not on this page · raw message
Signature · 1 line
1.7.0.4