Skip to content

Commit 45c3b08

Browse files
committed
ARC: Elide redundant setup of DMA callbacks
For resources shared by all cores such as SLC and IOC, only the master core needs to do any setups / enabling / disabling etc. Cc: <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 18b43e8 commit 45c3b08

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arch/arc/mm/cache.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,15 @@ void arc_cache_init(void)
921921

922922
printk(arc_cache_mumbojumbo(0, str, sizeof(str)));
923923

924+
/*
925+
* Only master CPU needs to execute rest of function:
926+
* - Assume SMP so all cores will have same cache config so
927+
* any geomtry checks will be same for all
928+
* - IOC setup / dma callbacks only need to be setup once
929+
*/
930+
if (cpu)
931+
return;
932+
924933
if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE)) {
925934
struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache;
926935

0 commit comments

Comments
 (0)