From: Vineet Gupta Date: Mon, 13 Jun 2016 14:38:27 +0000 (+0200) Subject: ARC: Elide redundant setup of DMA callbacks X-Git-Tag: firefly_0821_release~176^2~4^2~31^2~231 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=03551c85c1c01bf7ec58218a2afb225d98da0b97;p=firefly-linux-kernel-4.4.55.git ARC: Elide redundant setup of DMA callbacks commit 45c3b08a117e2232fc8d7b9e849ead36386f4f96 upstream. For resources shared by all cores such as SLC and IOC, only the master core needs to do any setups / enabling / disabling etc. Signed-off-by: Vineet Gupta Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c index ff7ff6cbb811..aaf1e2d1d900 100644 --- a/arch/arc/mm/cache.c +++ b/arch/arc/mm/cache.c @@ -914,6 +914,15 @@ void arc_cache_init(void) printk(arc_cache_mumbojumbo(0, str, sizeof(str))); + /* + * Only master CPU needs to execute rest of function: + * - Assume SMP so all cores will have same cache config so + * any geomtry checks will be same for all + * - IOC setup / dma callbacks only need to be setup once + */ + if (cpu) + return; + if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE)) { struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache;