|
@@ -28,17 +28,8 @@ struct irq_traps
|
|
|
rt_bool_t (*handler)(void *);
|
|
|
};
|
|
|
|
|
|
-static int _ipi_hash[] =
|
|
|
-{
|
|
|
-#ifdef RT_USING_SMP
|
|
|
- [RT_SCHEDULE_IPI] = RT_SCHEDULE_IPI,
|
|
|
- [RT_STOP_IPI] = RT_STOP_IPI,
|
|
|
- [RT_SMP_CALL_IPI] = RT_SMP_CALL_IPI,
|
|
|
-#endif
|
|
|
-};
|
|
|
-
|
|
|
/* reserved ipi */
|
|
|
-static int _pirq_hash_idx = RT_ARRAY_SIZE(_ipi_hash);
|
|
|
+static int _pirq_hash_idx = RT_MAX_IPI;
|
|
|
static struct rt_pic_irq _pirq_hash[MAX_HANDLERS] =
|
|
|
{
|
|
|
[0 ... MAX_HANDLERS - 1] =
|
|
@@ -230,7 +221,7 @@ int rt_pic_config_ipi(struct rt_pic *pic, int ipi_index, int hwirq)
|
|
|
int ipi = ipi_index;
|
|
|
struct rt_pic_irq *pirq;
|
|
|
|
|
|
- if (pic && ipi < RT_ARRAY_SIZE(_ipi_hash) && hwirq >= 0 && pic->ops->irq_send_ipi)
|
|
|
+ if (pic && ipi < RT_MAX_IPI && hwirq >= 0 && pic->ops->irq_send_ipi)
|
|
|
{
|
|
|
pirq = &_pirq_hash[ipi];
|
|
|
config_pirq(pic, pirq, ipi, hwirq);
|
|
@@ -281,7 +272,7 @@ struct rt_pic_irq *rt_pic_find_ipi(struct rt_pic *pic, int ipi_index)
|
|
|
{
|
|
|
struct rt_pic_irq *pirq = &_pirq_hash[ipi_index];
|
|
|
|
|
|
- RT_ASSERT(ipi_index < RT_ARRAY_SIZE(_ipi_hash));
|
|
|
+ RT_ASSERT(ipi_index < RT_MAX_IPI);
|
|
|
RT_ASSERT(pirq->pic == pic);
|
|
|
|
|
|
return pirq;
|