or1k: Remove use of proc_ptr

Update #3585.
This commit is contained in:
Sebastian Huber
2018-11-08 15:05:22 +01:00
parent 12dfa5e26f
commit 54c5ffca4f
3 changed files with 25 additions and 43 deletions

View File

@@ -33,9 +33,6 @@ static struct timecounter or1ksim_tc;
/* CPU counter */ /* CPU counter */
static CPU_Counter_ticks cpu_counter_ticks; static CPU_Counter_ticks cpu_counter_ticks;
/* This prototype is added here to Avoid warnings */
void Clock_isr(void *arg);
static void generic_or1k_clock_at_tick(void) static void generic_or1k_clock_at_tick(void)
{ {
uint32_t TTMR; uint32_t TTMR;
@@ -56,7 +53,7 @@ static void generic_or1k_clock_at_tick(void)
cpu_counter_ticks += TTMR_NUM_OF_CLOCK_TICKS_INTERRUPT; cpu_counter_ticks += TTMR_NUM_OF_CLOCK_TICKS_INTERRUPT;
} }
static void generic_or1k_clock_handler_install(proc_ptr new_isr) static void generic_or1k_clock_handler_install(CPU_ISR_handler new_isr)
{ {
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_status_code sc = RTEMS_SUCCESSFUL;
_CPU_ISR_install_vector(OR1K_EXCEPTION_TICK_TIMER, _CPU_ISR_install_vector(OR1K_EXCEPTION_TICK_TIMER,

View File

@@ -69,22 +69,14 @@ uint32_t _CPU_ISR_Get_level( void )
} }
void _CPU_ISR_install_raw_handler( void _CPU_ISR_install_raw_handler(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_raw_handler new_handler,
proc_ptr *old_handler CPU_ISR_raw_handler *old_handler
) )
{ {
} CPU_ISR_raw_handler *table =
(CPU_ISR_raw_handler *) bsp_start_vector_table_begin;
void _CPU_ISR_install_vector( CPU_ISR_raw_handler current_handler;
uint32_t vector,
proc_ptr new_handler,
proc_ptr *old_handler
)
{
proc_ptr *table =
(proc_ptr *) bsp_start_vector_table_begin;
proc_ptr current_handler;
ISR_Level level; ISR_Level level;
@@ -94,7 +86,7 @@ void _CPU_ISR_install_vector(
/* The current handler is now the old one */ /* The current handler is now the old one */
if (old_handler != NULL) { if (old_handler != NULL) {
*old_handler = (proc_ptr) current_handler; *old_handler = current_handler;
} }
/* Write only if necessary to avoid writes to a maybe read-only memory */ /* Write only if necessary to avoid writes to a maybe read-only memory */

View File

@@ -590,35 +590,28 @@ void _CPU_Initialize(
void void
); );
/* typedef void ( *CPU_ISR_raw_handler )( uint32_t, CPU_Exception_frame * );
* _CPU_ISR_install_raw_handler
*
* This routine installs a "raw" interrupt handler directly into the
* processor's vector table.
*
*/
void _CPU_ISR_install_raw_handler( void _CPU_ISR_install_raw_handler(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_raw_handler new_handler,
proc_ptr *old_handler CPU_ISR_raw_handler *old_handler
); );
/* typedef void ( *CPU_ISR_handler )( uint32_t );
* _CPU_ISR_install_vector
*
* This routine installs an interrupt vector.
*
* NO_CPU Specific Information:
*
* XXX document implementation including references if appropriate
*/
void _CPU_ISR_install_vector( RTEMS_INLINE_ROUTINE void _CPU_ISR_install_vector(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_handler new_handler,
proc_ptr *old_handler CPU_ISR_handler *old_handler
); )
{
_CPU_ISR_install_raw_handler(
vector,
(CPU_ISR_raw_handler) new_handler,
(CPU_ISR_raw_handler *) old_handler
);
}
void *_CPU_Thread_Idle_body( uintptr_t ignored ); void *_CPU_Thread_Idle_body( uintptr_t ignored );