diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2007-12-08 17:23:55 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2007-12-08 17:23:55 +0000 |
commit | 98ff623e6288519d12cb64c8cd23141b0f7902c8 (patch) | |
tree | 61f3da43e0346f3e445efc3a8372fb1aa8c28bfc /c | |
parent | 2007-12-03 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-98ff623e6288519d12cb64c8cd23141b0f7902c8.tar.bz2 |
2007-12-08 Till Straumann <strauman@slac.stanford.edu>
*shared/irq/irq_supp.h: removed cpp test for
BSP_SHARED_HANDLER_SUPPORT; BSPs using irq_supp.h
*must* implement shared handlers.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h | 52 |
2 files changed, 32 insertions, 26 deletions
diff --git a/c/src/lib/libbsp/powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/ChangeLog index e7a96ba81a..bfcc51c9fb 100644 --- a/c/src/lib/libbsp/powerpc/ChangeLog +++ b/c/src/lib/libbsp/powerpc/ChangeLog @@ -1,3 +1,9 @@ +2007-12-08 Till Straumann <strauman@slac.stanford.edu> + + *shared/irq/irq_supp.h: removed cpp test for + BSP_SHARED_HANDLER_SUPPORT; BSPs using irq_supp.h + *must* implement shared handlers. + 2007-12-06 Till Straumann <strauman@slac.stanford.edu> * shared/openpic/openpic.c, shared/openpic/openpic.h: diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h b/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h index a90605a95b..a2d814aa1b 100644 --- a/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h +++ b/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h @@ -57,10 +57,16 @@ struct _BSP_Exception_frame; /* IRQ dispatcher to be defined by the PIC driver; note that it MUST * implement shared interrupts. - * Note that the exception frame passed to this handler is not very - * meaningful. Only the volatile registers and info are set up. + * Note also that the exception frame passed to this handler is not very + * meaningful. Only the volatile registers and vector info are stored. + * + ******************************************************************* + * The routine must return zero if the interrupt was handled. If a + * nonzero value is returned the dispatcher may panic and flag an + * uncaught exception. + ******************************************************************* */ -void C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum); +int C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum); /* * Snippet to be used by PIC drivers; @@ -76,29 +82,23 @@ bsp_irq_dispatch_list( rtems_irq_hdl sentinel ) { - register uint32_t l_orig; - - l_orig = _ISR_Get_level(); - - /* Enable all interrupts */ - _ISR_Set_level(0); - - #ifndef BSP_SHARED_HANDLER_SUPPORT - rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle); - #else - { - rtems_irq_connect_data* vchain; - for( vchain = &tbl[irq]; - ((int)vchain != -1 && vchain->hdl != sentinel); - vchain = (rtems_irq_connect_data*)vchain->next_handler ) - { - vchain->hdl(vchain->handle); - } - } - #endif - - /* Restore original level */ - _ISR_Set_level(l_orig); + register uint32_t l_orig; + + l_orig = _ISR_Get_level(); + + /* Enable all interrupts */ + _ISR_Set_level(0); + + rtems_irq_connect_data* vchain; + for( vchain = &tbl[irq]; + ((int)vchain != -1 && vchain->hdl != sentinel); + vchain = (rtems_irq_connect_data*)vchain->next_handler ) + { + vchain->hdl(vchain->handle); + } + + /* Restore original level */ + _ISR_Set_level(l_orig); } #ifdef __cplusplus |