arm: armv8: remove redundant definition of mmu_status
mmu_status is used in io memcpy functions to prevent accesses to non
8-byte aligned addresses when the mmu is disabled. Though there is a
redundant definition enabled when icaches is turned off by setting
SYS_ICACHE_OFF.
This patch removes the redundant definition, allowing mmu_status to
properly report the status regardless of config settings. This shouldn't
be a problem since access to non 8-byte aligned data can be done
irrespective of icache state.
Fixes: 268f6ac1f9 ("arm64: Update memcpy_{from, to}io() helpers")
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
@@ -1134,11 +1134,6 @@ int icache_status(void)
|
|||||||
return (get_sctlr() & CR_I) != 0;
|
return (get_sctlr() & CR_I) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mmu_status(void)
|
|
||||||
{
|
|
||||||
return (get_sctlr() & CR_M) != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void invalidate_icache_all(void)
|
void invalidate_icache_all(void)
|
||||||
{
|
{
|
||||||
__asm_invalidate_icache_all();
|
__asm_invalidate_icache_all();
|
||||||
@@ -1160,17 +1155,17 @@ int icache_status(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mmu_status(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void invalidate_icache_all(void)
|
void invalidate_icache_all(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) */
|
#endif /* !CONFIG_IS_ENABLED(SYS_ICACHE_OFF) */
|
||||||
|
|
||||||
|
int mmu_status(void)
|
||||||
|
{
|
||||||
|
return (get_sctlr() & CR_M) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable dCache & iCache, whether cache is actually enabled
|
* Enable dCache & iCache, whether cache is actually enabled
|
||||||
* depend on CONFIG_SYS_DCACHE_OFF and CONFIG_SYS_ICACHE_OFF
|
* depend on CONFIG_SYS_DCACHE_OFF and CONFIG_SYS_ICACHE_OFF
|
||||||
|
|||||||
Reference in New Issue
Block a user