forked from Imagelibrary/rtems
bsps: Move declarations to <bsp/irq-generic.h>
Move declarations of bsp_interrupt_get_affinity() and bsp_interrupt_set_affinity() to <bsp/irq-generic.h>. Canonicalize the <bsp/irq.h> includes. Implement bsp_interrupt_get_affinity() and bsp_interrupt_set_affinity() only if needed (usually RTEMS_SMP). Provide stub implementations for i386 to fix build errors.
This commit is contained in:
@@ -37,31 +37,11 @@
|
||||
#ifndef LIBBSP_ERC32_IRQ_CONFIG_H
|
||||
#define LIBBSP_ERC32_IRQ_CONFIG_H
|
||||
|
||||
#include <rtems/score/processormask.h>
|
||||
#include <rtems.h>
|
||||
|
||||
#define BSP_INTERRUPT_VECTOR_MAX_STD 15 /* Standard IRQ controller */
|
||||
#define BSP_INTERRUPT_VECTOR_COUNT (BSP_INTERRUPT_VECTOR_MAX_STD + 1)
|
||||
|
||||
#define BSP_INTERRUPT_CUSTOM_VALID_VECTOR
|
||||
|
||||
static inline rtems_status_code bsp_interrupt_set_affinity(
|
||||
rtems_vector_number vector,
|
||||
const Processor_mask *affinity
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
(void) affinity;
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
static inline rtems_status_code bsp_interrupt_get_affinity(
|
||||
rtems_vector_number vector,
|
||||
Processor_mask *affinity
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
_Processor_mask_From_index( affinity, 0 );
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
#endif /* LIBBSP_ERC32_IRQ_CONFIG_H */
|
||||
|
||||
@@ -42,9 +42,8 @@
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/fatal.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <bsp/irq-generic.h>
|
||||
#include <bsp/leon3.h>
|
||||
#include <rtems/rtems/intr.h>
|
||||
#include <grlib/irqamp.h>
|
||||
#include <rtems/score/profiling.h>
|
||||
#include <rtems/timecounter.h>
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#define LIBBSP_LEON3_IRQ_CONFIG_H
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/score/processormask.h>
|
||||
|
||||
#define BSP_INTERRUPT_VECTOR_MAX_STD 15 /* Standard IRQ controller */
|
||||
#define BSP_INTERRUPT_VECTOR_MAX_EXT 31 /* Extended IRQ controller */
|
||||
@@ -48,14 +47,4 @@
|
||||
/* The check is different depending on IRQ controller, runtime detected */
|
||||
#define BSP_INTERRUPT_CUSTOM_VALID_VECTOR
|
||||
|
||||
rtems_status_code bsp_interrupt_set_affinity(
|
||||
rtems_vector_number vector,
|
||||
const Processor_mask *affinity
|
||||
);
|
||||
|
||||
rtems_status_code bsp_interrupt_get_affinity(
|
||||
rtems_vector_number vector,
|
||||
Processor_mask *affinity
|
||||
);
|
||||
|
||||
#endif /* LIBBSP_LEON3_IRQ_CONFIG_H */
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define __tm27_h
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <bsp/irq-generic.h>
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
#include <rtems/score/smpimpl.h>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
#include <bsp/fatal.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <bsp/irq-generic.h>
|
||||
#include <bsp/leon3.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <rtems/sysinit.h>
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <bsp/irq.h>
|
||||
#include <bsp/irq-generic.h>
|
||||
#include <bsp/irqimpl.h>
|
||||
|
||||
|
||||
@@ -140,3 +140,25 @@ rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
|
||||
BSP_Cpu_Mask_interrupt(vector, 0);
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
#if defined(RTEMS_SMP)
|
||||
rtems_status_code bsp_interrupt_get_affinity(
|
||||
rtems_vector_number vector,
|
||||
Processor_mask *affinity
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
_Processor_mask_From_index( affinity, 0 );
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
|
||||
rtems_status_code bsp_interrupt_set_affinity(
|
||||
rtems_vector_number vector,
|
||||
const Processor_mask *affinity
|
||||
)
|
||||
{
|
||||
(void) vector;
|
||||
(void) affinity;
|
||||
return RTEMS_UNSATISFIED;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user