armv7-a: icache also need SMP cache coherency configuration
This can fixes the random crash happened sometime during boot. Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
69feebe48c
commit
bedd5d382d
@ -318,7 +318,7 @@ __cpu3_start:
|
|||||||
* after SMP cache coherency has been setup.
|
* after SMP cache coherency has been setup.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0 /* !defined(CPU_DCACHE_DISABLE) && !defined(CONFIG_SMP) */
|
#if !defined(CPU_DCACHE_DISABLE) && !defined(CONFIG_SMP)
|
||||||
/* Dcache enable
|
/* Dcache enable
|
||||||
*
|
*
|
||||||
* SCTLR_C Bit 2: DCache enable
|
* SCTLR_C Bit 2: DCache enable
|
||||||
@ -327,7 +327,7 @@ __cpu3_start:
|
|||||||
orr r0, r0, #(SCTLR_C)
|
orr r0, r0, #(SCTLR_C)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CPU_ICACHE_DISABLE
|
#if !defined(CPU_ICACHE_DISABLE) && !defined(CONFIG_SMP)
|
||||||
/* Icache enable
|
/* Icache enable
|
||||||
*
|
*
|
||||||
* SCTLR_I Bit 12: ICache enable
|
* SCTLR_I Bit 12: ICache enable
|
||||||
|
@ -452,7 +452,7 @@ __start:
|
|||||||
orr r0, r0, #(SCTLR_C)
|
orr r0, r0, #(SCTLR_C)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CPU_ICACHE_DISABLE
|
#if !defined(CPU_ICACHE_DISABLE) && !defined(CONFIG_SMP)
|
||||||
/* Icache enable
|
/* Icache enable
|
||||||
*
|
*
|
||||||
* SCTLR_I Bit 12: ICache enable
|
* SCTLR_I Bit 12: ICache enable
|
||||||
|
@ -434,7 +434,7 @@ __start:
|
|||||||
orr r0, r0, #(SCTLR_C)
|
orr r0, r0, #(SCTLR_C)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CPU_ICACHE_DISABLE
|
#if !defined(CPU_ICACHE_DISABLE) && !defined(CONFIG_SMP)
|
||||||
/* Icache enable
|
/* Icache enable
|
||||||
*
|
*
|
||||||
* SCTLR_I Bit 12: ICache enable
|
* SCTLR_I Bit 12: ICache enable
|
||||||
|
@ -203,6 +203,6 @@ void arm_enable_smp(int cpu)
|
|||||||
arm_set_actlr(regval);
|
arm_set_actlr(regval);
|
||||||
|
|
||||||
regval = arm_get_sctlr();
|
regval = arm_get_sctlr();
|
||||||
regval |= SCTLR_C;
|
regval |= SCTLR_C | SCTLR_I;
|
||||||
arm_set_sctlr(regval);
|
arm_set_sctlr(regval);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user