forked from Imagelibrary/rtems
score: Rename rtems_smp_process_interrupt()
Rename rtems_smp_process_interrupt() into _SMP_Inter_processor_interrupt_handler(). Delete unused header file <rtems/bspsmp.h>.
This commit is contained in:
@@ -14,15 +14,15 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <rtems/bspsmp.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
|
||||
#include <libcpu/arm-cp15.h>
|
||||
|
||||
#include <bsp/irq.h>
|
||||
|
||||
static void ipi_handler(void *arg)
|
||||
static void bsp_inter_processor_interrupt(void *arg)
|
||||
{
|
||||
rtems_smp_process_interrupt();
|
||||
_SMP_Inter_processor_interrupt_handler();
|
||||
}
|
||||
|
||||
uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
|
||||
@@ -36,7 +36,7 @@ uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
|
||||
ARM_GIC_IRQ_SGI_0,
|
||||
"IPI",
|
||||
RTEMS_INTERRUPT_UNIQUE,
|
||||
ipi_handler,
|
||||
bsp_inter_processor_interrupt,
|
||||
NULL
|
||||
);
|
||||
assert(sc == RTEMS_SUCCESSFUL);
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#ifndef LIBBSP_ARM_SHARED_ARM_A9MPCORE_START_H
|
||||
#define LIBBSP_ARM_SHARED_ARM_A9MPCORE_START_H
|
||||
|
||||
#include <rtems/bspsmp.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
|
||||
#include <libcpu/arm-cp15.h>
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <rtems.h>
|
||||
#include <rtems/bspsmp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <libcpu/cpu.h>
|
||||
#include <assert.h>
|
||||
@@ -743,13 +742,13 @@ static void smp_apic_ack(void)
|
||||
IMPS_LAPIC_WRITE(LAPIC_EOI, 0 ); /* ACK the interrupt */
|
||||
}
|
||||
|
||||
static void ap_ipi_isr(void *arg)
|
||||
static void bsp_inter_processor_interrupt(void *arg)
|
||||
{
|
||||
(void) arg;
|
||||
|
||||
smp_apic_ack();
|
||||
|
||||
rtems_smp_process_interrupt();
|
||||
_SMP_Inter_processor_interrupt_handler();
|
||||
}
|
||||
|
||||
static void ipi_install_irq(void)
|
||||
@@ -760,7 +759,7 @@ static void ipi_install_irq(void)
|
||||
16,
|
||||
"smp-imps",
|
||||
RTEMS_INTERRUPT_UNIQUE,
|
||||
ap_ipi_isr,
|
||||
bsp_inter_processor_interrupt,
|
||||
NULL
|
||||
);
|
||||
assert(status == RTEMS_SUCCESSFUL);
|
||||
@@ -787,7 +786,6 @@ static void secondary_cpu_initialize(void)
|
||||
_SMP_Start_multitasking_on_secondary_processor();
|
||||
}
|
||||
|
||||
#include <rtems/bspsmp.h>
|
||||
uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
|
||||
{
|
||||
int cores;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <rtems/bspsmp.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
|
||||
#include <libcpu/powerpc-utility.h>
|
||||
@@ -137,9 +136,9 @@ void qoriq_secondary_cpu_initialize(void)
|
||||
_SMP_Start_multitasking_on_secondary_processor();
|
||||
}
|
||||
|
||||
static void ipi_handler(void *arg)
|
||||
static void bsp_inter_processor_interrupt(void *arg)
|
||||
{
|
||||
rtems_smp_process_interrupt();
|
||||
_SMP_Inter_processor_interrupt_handler();
|
||||
}
|
||||
|
||||
uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
|
||||
@@ -152,7 +151,7 @@ uint32_t _CPU_SMP_Initialize(uint32_t configured_cpu_count)
|
||||
QORIQ_IRQ_IPI_0,
|
||||
"IPI",
|
||||
RTEMS_INTERRUPT_UNIQUE,
|
||||
ipi_handler,
|
||||
bsp_inter_processor_interrupt,
|
||||
NULL
|
||||
);
|
||||
assert(sc == RTEMS_SUCCESSFUL);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <bsp.h>
|
||||
#include <leon.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <rtems/bspsmp.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -32,11 +31,11 @@ static inline unsigned int sparc_leon3_get_cctrl( void )
|
||||
return v;
|
||||
}
|
||||
|
||||
static rtems_isr bsp_ap_ipi_isr(
|
||||
static rtems_isr bsp_inter_processor_interrupt(
|
||||
rtems_vector_number vector
|
||||
)
|
||||
{
|
||||
rtems_smp_process_interrupt();
|
||||
_SMP_Inter_processor_interrupt_handler();
|
||||
}
|
||||
|
||||
void leon3_secondary_cpu_initialize(uint32_t cpu)
|
||||
@@ -75,7 +74,7 @@ uint32_t _CPU_SMP_Initialize( uint32_t configured_cpu_count )
|
||||
|
||||
if ( used_cpu_count > 1 ) {
|
||||
LEON_Unmask_interrupt(LEON3_MP_IRQ);
|
||||
set_vector(bsp_ap_ipi_isr, LEON_TRAP_TYPE(LEON3_MP_IRQ), 1);
|
||||
set_vector(bsp_inter_processor_interrupt, LEON_TRAP_TYPE(LEON3_MP_IRQ), 1);
|
||||
}
|
||||
|
||||
for ( cpu = 1 ; cpu < used_cpu_count ; ++cpu ) {
|
||||
|
||||
@@ -10,7 +10,6 @@ include_rtemsdir = $(includedir)/rtems
|
||||
include_rtems_HEADERS = include/rtems/debug.h
|
||||
include_rtems_HEADERS += include/rtems/system.h
|
||||
include_rtems_HEADERS += include/rtems/seterr.h
|
||||
include_rtems_HEADERS += include/rtems/bspsmp.h
|
||||
|
||||
include_rtems_scoredir = $(includedir)/rtems/score
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/**
|
||||
* @file rtems/bspsmp.h
|
||||
*
|
||||
* @brief Interface Between RTEMS and an SMP Aware BSP
|
||||
*
|
||||
* This include file defines the interface between RTEMS and an
|
||||
* SMP aware BSP. These methods will only be used when RTEMS
|
||||
* is configured with SMP support enabled.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#ifndef _RTEMS_BSPSMP_H
|
||||
#define _RTEMS_BSPSMP_H
|
||||
|
||||
#include <rtems/score/cpuopts.h>
|
||||
|
||||
#if defined (RTEMS_SMP)
|
||||
#include <rtems/score/percpu.h>
|
||||
|
||||
/**
|
||||
* @defgroup RTEMS BSP SMP Interface
|
||||
*
|
||||
* @ingroup Score
|
||||
*
|
||||
* This defines the interface between RTEMS and the BSP for
|
||||
* SMP support. The interface uses the term primary
|
||||
* to refer to the "boot" processor and secondary to refer
|
||||
* to the "application" processors. Different architectures
|
||||
* use different terminology.
|
||||
*
|
||||
* It is assumed that when the processor is reset and thus
|
||||
* when RTEMS is initialized, that the primary processor is
|
||||
* the only one executing. The others are assumed to be in
|
||||
* a quiescent or reset state awaiting a command to come online.
|
||||
*/
|
||||
|
||||
/**@{*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
/**
|
||||
* @brief Process the incoming interprocessor request.
|
||||
*
|
||||
* This is the method called by the BSP's interrupt handler
|
||||
* to process the incoming interprocessor request.
|
||||
*/
|
||||
void rtems_smp_process_interrupt(void);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
#endif
|
||||
|
||||
/* end of include file */
|
||||
@@ -89,6 +89,11 @@ typedef enum {
|
||||
void _SMP_Start_multitasking_on_secondary_processor( void )
|
||||
RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
|
||||
/**
|
||||
* @brief Interrupt handler for inter-processor interrupts.
|
||||
*/
|
||||
void _SMP_Inter_processor_interrupt_handler( void );
|
||||
|
||||
/**
|
||||
* @brief Sends a SMP message to a processor.
|
||||
*
|
||||
|
||||
@@ -30,10 +30,6 @@ $(PROJECT_INCLUDE)/rtems/seterr.h: include/rtems/seterr.h $(PROJECT_INCLUDE)/rte
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/seterr.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/seterr.h
|
||||
|
||||
$(PROJECT_INCLUDE)/rtems/bspsmp.h: include/rtems/bspsmp.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/bspsmp.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/bspsmp.h
|
||||
|
||||
$(PROJECT_INCLUDE)/rtems/score/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/score
|
||||
@: > $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <rtems/bspsmp.h>
|
||||
#include <rtems/score/smpimpl.h>
|
||||
#include <rtems/score/assert.h>
|
||||
#include <rtems/score/threaddispatch.h>
|
||||
@@ -45,7 +44,7 @@ void _SMP_Start_multitasking_on_secondary_processor( void )
|
||||
_Thread_Start_multitasking();
|
||||
}
|
||||
|
||||
void rtems_smp_process_interrupt( void )
|
||||
void _SMP_Inter_processor_interrupt_handler( void )
|
||||
{
|
||||
Per_CPU_Control *self_cpu = _Per_CPU_Get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user