File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ void arm_gic_irq_enable(unsigned int intid)
250
250
251
251
if (GIC_IS_SPI (intid ))
252
252
{
253
- arm_gic_write_irouter (this_cpu (), intid );
253
+ arm_gic_write_irouter (up_cpu_index (), intid );
254
254
}
255
255
256
256
putreg32 (mask , ISENABLER (GET_DIST_BASE (intid ), idx ));
@@ -809,7 +809,8 @@ static void arm_gic_init(void)
809
809
int err ;
810
810
811
811
cpu = this_cpu ();
812
- g_gic_rdists [cpu ] = CONFIG_GICR_BASE + cpu * CONFIG_GICR_OFFSET ;
812
+ g_gic_rdists [cpu ] = CONFIG_GICR_BASE +
813
+ up_cpu_index () * CONFIG_GICR_OFFSET ;
813
814
814
815
err = gic_validate_redist_version ();
815
816
if (err )
Original file line number Diff line number Diff line change @@ -383,6 +383,10 @@ static inline void up_irq_restore(irqstate_t flags)
383
383
****************************************************************************/
384
384
385
385
#ifdef CONFIG_ARCH_HAVE_MULTICPU
386
+ # ifndef MPID_TO_CORE
387
+ # define MPID_TO_CORE (mpid ) \
388
+ (((mpid) >> MPIDR_AFF0_SHIFT) & MPIDR_AFFLVL_MASK)
389
+ # endif
386
390
# define up_cpu_index () ((int)MPID_TO_CORE(GET_MPIDR()))
387
391
#endif /* CONFIG_ARCH_HAVE_MULTICPU */
388
392
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ void arm64_gic_irq_enable(unsigned int intid)
257
257
#ifndef CONFIG_ARM64_GICV3_SPI_ROUTING_CPU0
258
258
if (GIC_IS_SPI (intid ))
259
259
{
260
- arm64_gic_write_irouter (( GET_MPIDR () & MPIDR_ID_MASK ), intid );
260
+ arm64_gic_write_irouter (up_cpu_index ( ), intid );
261
261
}
262
262
#endif
263
263
@@ -952,7 +952,8 @@ static void arm64_gic_init(void)
952
952
int err ;
953
953
954
954
cpu = this_cpu ();
955
- g_gic_rdists [cpu ] = CONFIG_GICR_BASE + cpu * CONFIG_GICR_OFFSET ;
955
+ g_gic_rdists [cpu ] = CONFIG_GICR_BASE +
956
+ up_cpu_index () * CONFIG_GICR_OFFSET ;
956
957
957
958
err = gic_validate_redist_version ();
958
959
if (err )
You can’t perform that action at this time.
0 commit comments