m68knommu: correctly use trap_init
authorGreg Ungerer <gerg@uclinux.org>
Thu, 23 Jun 2011 05:52:25 +0000 (15:52 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Mon, 25 Jul 2011 01:20:41 +0000 (11:20 +1000)
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>
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

index 0bffb17d5db7188f050a10af133f5e29a742930b..151068f64f44f088b03339d57d13f6bb394a04a3 100644 (file)
@@ -22,7 +22,6 @@ extern e_vector vectors[];
 asmlinkage void auto_inthandler(void);
 asmlinkage void user_inthandler(void);
 asmlinkage void bad_inthandler(void);
-extern void init_vectors(void);
 
 #endif
 
index a768008dfd06fbafa47f29778754f0d464564371..e67b8c806959a9796b7b2840be064ae9c4a3e775 100644 (file)
@@ -60,10 +60,6 @@ static char const * const vec_names[] = {
        "MMU CONFIGURATION ERROR"
 };
 
-void __init trap_init(void)
-{
-}
-
 void die_if_kernel(char *str, struct pt_regs *fp, int nr)
 {
        if (!(fp->sr & PS_S))
index 7e715dfe2819df9464ab3da83e129e06a8675eef..7160e618b0a96ab64cba71e2eec3fc84b20cff3b 100644 (file)
@@ -162,8 +162,6 @@ void __init init_IRQ(void)
 {
        int irq, edge;
 
-       init_vectors();
-
        /* Mask all interrupt sources */
        writel(0x88888888, MCF_MBAR + MCFSIM_ICR1);
        writel(0x88888888, MCF_MBAR + MCFSIM_ICR2);
index a90288cf7446c3ae562e6be4da70215a31745b26..22acb60b541a16f715e59e80c039a13423e5af97 100644 (file)
@@ -155,7 +155,7 @@ static struct irq_chip intc_irq_chip = {
  * This function should be called during kernel startup to initialize
  * the machine vector table.
  */
-void __init init_IRQ(void)
+void __init trap_init(void)
 {
        int i;
 
@@ -172,6 +172,11 @@ void __init init_IRQ(void)
        _ramvec[69] = (e_vector) inthandler5;
        _ramvec[70] = (e_vector) inthandler6;
        _ramvec[71] = (e_vector) inthandler7;
+}
+
+void __init init_IRQ(void)
+{
+       int i;
 
        IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */
 
index 4af0f4e30f74e86a01eba693a957414147524ba4..44443820d208abd0a40d25697e238f19c978b37a 100644 (file)
@@ -63,9 +63,8 @@ static struct irq_chip intc_irq_chip = {
  * This function should be called during kernel startup to initialize
  * the vector table.
  */
-void init_IRQ(void)
+void __init trap_init(void)
 {
-       int i;
        int vba = (CPM_VECTOR_BASE<<4);
 
        /* set up the vectors */
@@ -130,6 +129,11 @@ void init_IRQ(void)
 
        /* turn off all CPM interrupts */
        pquicc->intr_cimr = 0x00000000;
+}
+
+void init_IRQ(void)
+{
+       int i;
 
        for (i = 0; (i < NR_IRQS); i++) {
                irq_set_chip(i, &intc_irq_chip);
index 74b55cfbc3cb2cde7a12f8a51572bf6f7b37b2bf..995093357c59fd1a1d525ff1480987c2fa983b6c 100644 (file)
@@ -194,8 +194,6 @@ void __init init_IRQ(void)
 {
        int irq;
 
-       init_vectors();
-
        /* Mask all interrupt sources */
        __raw_writel(0x1, MCFICM_INTC0 + MCFINTC_IMRL);
 #ifdef MCFICM_INTC1
index d6a4d9d53e42df8ebc13866d6b27049176e2c8b4..650d52e2927e093eec2380f4a06154c7ee10e127 100644 (file)
@@ -171,8 +171,6 @@ void __init init_IRQ(void)
 {
        int irq, eirq;
 
-       init_vectors();
-
        /* Mask all interrupt sources */
        __raw_writeb(0xff, MCFINTC0_SIMR);
        if (MCFINTC1_SIMR)
index 0bbb414856eb14c879cc1e3d847ebf4658caad92..5c0c150b40671c7b5af644fa176493574b6958b5 100644 (file)
@@ -139,7 +139,6 @@ void __init init_IRQ(void)
 {
        int irq;
 
-       init_vectors();
        mcf_maskimr(0xffffffff);
 
        for (irq = 0; (irq < NR_IRQS); irq++) {
index a21d3f870b7aaee20a77405aa3e26b29f268b58d..3a7cc524ecd34601a6ba389bf445149ab690ee3f 100644 (file)
@@ -35,21 +35,13 @@ asmlinkage void dbginterrupt_c(struct frame *fp)
 
 extern e_vector        *_ramvec;
 
-void set_evector(int vecnum, void (*handler)(void))
-{
-       if (vecnum >= 0 && vecnum <= 255)
-               _ramvec[vecnum] = handler;
-}
-
-/***************************************************************************/
-
 /* Assembler routines */
 asmlinkage void buserr(void);
 asmlinkage void trap(void);
 asmlinkage void system_call(void);
 asmlinkage void inthandler(void);
 
-void __init init_vectors(void)
+void __init trap_init(void)
 {
        int i;