Path: blob/master/arch/m68k/platform/coldfire/vectors.c
10818 views
/***************************************************************************/12/*3* linux/arch/m68knommu/platform/coldfire/vectors.c4*5* Copyright (C) 1999-2007, Greg Ungerer <[email protected]>6*/78/***************************************************************************/910#include <linux/kernel.h>11#include <linux/init.h>12#include <linux/irq.h>13#include <asm/traps.h>14#include <asm/machdep.h>15#include <asm/coldfire.h>16#include <asm/mcfsim.h>17#include <asm/mcfwdebug.h>1819/***************************************************************************/2021#ifdef TRAP_DBG_INTERRUPT2223asmlinkage void dbginterrupt_c(struct frame *fp)24{25extern void dump(struct pt_regs *fp);26printk(KERN_DEBUG "%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__);27dump((struct pt_regs *) fp);28asm("halt");29}3031#endif3233/***************************************************************************/3435extern e_vector *_ramvec;3637void set_evector(int vecnum, void (*handler)(void))38{39if (vecnum >= 0 && vecnum <= 255)40_ramvec[vecnum] = handler;41}4243/***************************************************************************/4445/* Assembler routines */46asmlinkage void buserr(void);47asmlinkage void trap(void);48asmlinkage void system_call(void);49asmlinkage void inthandler(void);5051void __init init_vectors(void)52{53int i;5455/*56* There is a common trap handler and common interrupt57* handler that handle almost every vector. We treat58* the system call and bus error special, they get their59* own first level handlers.60*/61for (i = 3; (i <= 23); i++)62_ramvec[i] = trap;63for (i = 33; (i <= 63); i++)64_ramvec[i] = trap;65for (i = 24; (i <= 31); i++)66_ramvec[i] = inthandler;67for (i = 64; (i < 255); i++)68_ramvec[i] = inthandler;69_ramvec[255] = 0;7071_ramvec[2] = buserr;72_ramvec[32] = system_call;7374#ifdef TRAP_DBG_INTERRUPT75_ramvec[12] = dbginterrupt;76#endif77}7879/***************************************************************************/808182