forked from Imagelibrary/rtems
dev/irq: Optional arm_gic_irq_processor_count()
Provide arm_gic_irq_processor_count() only in SMP configurations.
This commit is contained in:
@@ -113,9 +113,11 @@ static inline rtems_status_code arm_gic_irq_generate_software_irq(
|
|||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RTEMS_SMP
|
||||||
uint32_t arm_gic_irq_processor_count(void);
|
uint32_t arm_gic_irq_processor_count(void);
|
||||||
|
|
||||||
void arm_gic_irq_initialize_secondary_cpu(void);
|
void arm_gic_irq_initialize_secondary_cpu(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -400,9 +400,11 @@ void arm_gic_trigger_sgi(rtems_vector_number vector, uint32_t targets)
|
|||||||
| GIC_DIST_ICDSGIR_SGIINTID(vector);
|
| GIC_DIST_ICDSGIR_SGIINTID(vector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RTEMS_SMP
|
||||||
uint32_t arm_gic_irq_processor_count(void)
|
uint32_t arm_gic_irq_processor_count(void)
|
||||||
{
|
{
|
||||||
volatile gic_dist *dist = ARM_GIC_DIST;
|
volatile gic_dist *dist = ARM_GIC_DIST;
|
||||||
|
|
||||||
return GIC_DIST_ICDICTR_CPU_NUMBER_GET(dist->icdictr) + 1;
|
return GIC_DIST_ICDICTR_CPU_NUMBER_GET(dist->icdictr) + 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -280,6 +280,7 @@ void arm_gic_trigger_sgi(rtems_vector_number vector, uint32_t targets)
|
|||||||
gicv3_trigger_sgi(vector, targets);
|
gicv3_trigger_sgi(vector, targets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RTEMS_SMP
|
||||||
uint32_t arm_gic_irq_processor_count(void)
|
uint32_t arm_gic_irq_processor_count(void)
|
||||||
{
|
{
|
||||||
volatile gic_dist *dist = ARM_GIC_DIST;
|
volatile gic_dist *dist = ARM_GIC_DIST;
|
||||||
@@ -306,3 +307,4 @@ uint32_t arm_gic_irq_processor_count(void)
|
|||||||
|
|
||||||
return cpu_count;
|
return cpu_count;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user