Commit 622e9472dd723d5c7dc034510faae4b113e5bbc2
1 parent
f4a5437333
Exists in
master
and in
6 other branches
m68knommu: correctly use trap_init
Currently trap_init() is an empty function for m68knommu. Instead the vectors are being setup as part of the IRQ initialization. This is inconsistent with m68k and other architectures. Change the local init_vectors() to be trap_init(), and init the vectors at the correct time during startup. This will help merge of m68k and m68knommu trap code in the furture. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Showing 9 changed files with 13 additions and 24 deletions Side-by-side Diff
- arch/m68k/include/asm/traps.h
- arch/m68k/kernel/traps_no.c
- arch/m68k/platform/5272/intc.c
- arch/m68k/platform/68328/ints.c
- arch/m68k/platform/68360/ints.c
- arch/m68k/platform/coldfire/intc-2.c
- arch/m68k/platform/coldfire/intc-simr.c
- arch/m68k/platform/coldfire/intc.c
- arch/m68k/platform/coldfire/vectors.c
arch/m68k/include/asm/traps.h
arch/m68k/kernel/traps_no.c
arch/m68k/platform/5272/intc.c
arch/m68k/platform/68328/ints.c
... | ... | @@ -155,7 +155,7 @@ |
155 | 155 | * This function should be called during kernel startup to initialize |
156 | 156 | * the machine vector table. |
157 | 157 | */ |
158 | -void __init init_IRQ(void) | |
158 | +void __init trap_init(void) | |
159 | 159 | { |
160 | 160 | int i; |
161 | 161 | |
... | ... | @@ -172,6 +172,11 @@ |
172 | 172 | _ramvec[69] = (e_vector) inthandler5; |
173 | 173 | _ramvec[70] = (e_vector) inthandler6; |
174 | 174 | _ramvec[71] = (e_vector) inthandler7; |
175 | +} | |
176 | + | |
177 | +void __init init_IRQ(void) | |
178 | +{ | |
179 | + int i; | |
175 | 180 | |
176 | 181 | IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */ |
177 | 182 |
arch/m68k/platform/68360/ints.c
... | ... | @@ -63,9 +63,8 @@ |
63 | 63 | * This function should be called during kernel startup to initialize |
64 | 64 | * the vector table. |
65 | 65 | */ |
66 | -void init_IRQ(void) | |
66 | +void __init trap_init(void) | |
67 | 67 | { |
68 | - int i; | |
69 | 68 | int vba = (CPM_VECTOR_BASE<<4); |
70 | 69 | |
71 | 70 | /* set up the vectors */ |
... | ... | @@ -130,6 +129,11 @@ |
130 | 129 | |
131 | 130 | /* turn off all CPM interrupts */ |
132 | 131 | pquicc->intr_cimr = 0x00000000; |
132 | +} | |
133 | + | |
134 | +void init_IRQ(void) | |
135 | +{ | |
136 | + int i; | |
133 | 137 | |
134 | 138 | for (i = 0; (i < NR_IRQS); i++) { |
135 | 139 | irq_set_chip(i, &intc_irq_chip); |
arch/m68k/platform/coldfire/intc-2.c
arch/m68k/platform/coldfire/intc-simr.c
arch/m68k/platform/coldfire/intc.c
arch/m68k/platform/coldfire/vectors.c
... | ... | @@ -35,21 +35,13 @@ |
35 | 35 | |
36 | 36 | extern e_vector *_ramvec; |
37 | 37 | |
38 | -void set_evector(int vecnum, void (*handler)(void)) | |
39 | -{ | |
40 | - if (vecnum >= 0 && vecnum <= 255) | |
41 | - _ramvec[vecnum] = handler; | |
42 | -} | |
43 | - | |
44 | -/***************************************************************************/ | |
45 | - | |
46 | 38 | /* Assembler routines */ |
47 | 39 | asmlinkage void buserr(void); |
48 | 40 | asmlinkage void trap(void); |
49 | 41 | asmlinkage void system_call(void); |
50 | 42 | asmlinkage void inthandler(void); |
51 | 43 | |
52 | -void __init init_vectors(void) | |
44 | +void __init trap_init(void) | |
53 | 45 | { |
54 | 46 | int i; |
55 | 47 |