1 /* Basic functions for adding/removing custom exception handlers
3 * Copyright 2004-2009 Analog Devices Inc.
5 * Licensed under the GPL-2 or later
8 #include <linux/module.h>
9 #include <asm/irq_handler.h>
11 int bfin_request_exception(unsigned int exception
, void (*handler
)(void))
13 void (*curr_handler
)(void);
18 curr_handler
= ex_table
[exception
];
20 if (curr_handler
!= ex_replaceable
)
23 ex_table
[exception
] = handler
;
27 EXPORT_SYMBOL(bfin_request_exception
);
29 int bfin_free_exception(unsigned int exception
, void (*handler
)(void))
31 void (*curr_handler
)(void);
36 curr_handler
= ex_table
[exception
];
38 if (curr_handler
!= handler
)
41 ex_table
[exception
] = ex_replaceable
;
45 EXPORT_SYMBOL(bfin_free_exception
);