mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 09:40:54 +07:00
[ARM] pxa: do not enable L2 after MMU is enabled
Outer cache checked whether L2 is enabled or not. If L2 isn't enabled in XSC3, it would enable L2. This operation is evil that would make system hang. In XSC3 core document, these words are mentioned in below. "Following reset, the L2 Unified Cache Enable bit is cleared. To enable the L2 Cache, software may set the bit to a '1' before or at the same time as enabling the MMU. Enabling the L2 Cache after the MMU has been enabled or disabling the L2 Cache after the L2 Cache has been enabled, may result in unpredictable behavior of the processor." When outer cache is initialized, the MMU is already enabled. We couldn't enable L2 after MMU enabled. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
This commit is contained in:
parent
91a86a964f
commit
dc8601a224
@ -221,15 +221,14 @@ static int __init xsc3_l2_init(void)
|
||||
if (!cpu_is_xsc3() || !xsc3_l2_present())
|
||||
return 0;
|
||||
|
||||
if (!(get_cr() & CR_L2)) {
|
||||
if (get_cr() & CR_L2) {
|
||||
pr_info("XScale3 L2 cache enabled.\n");
|
||||
adjust_cr(CR_L2, CR_L2);
|
||||
xsc3_l2_inv_all();
|
||||
}
|
||||
|
||||
outer_cache.inv_range = xsc3_l2_inv_range;
|
||||
outer_cache.clean_range = xsc3_l2_clean_range;
|
||||
outer_cache.flush_range = xsc3_l2_flush_range;
|
||||
outer_cache.inv_range = xsc3_l2_inv_range;
|
||||
outer_cache.clean_range = xsc3_l2_clean_range;
|
||||
outer_cache.flush_range = xsc3_l2_flush_range;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user