]> git.hungrycats.org Git - linux/commitdiff
ARC: Elide redundant setup of DMA callbacks
authorSasha Levin <alexander.levin@verizon.com>
Wed, 31 Aug 2016 02:04:29 +0000 (22:04 -0400)
committerSasha Levin <alexander.levin@verizon.com>
Thu, 1 Sep 2016 02:05:44 +0000 (22:05 -0400)
[ Upstream commit 45c3b08a117e2232fc8d7b9e849ead36386f4f96 ]

For resources shared by all cores such as SLC and IOC, only the master
core needs to do any setups / enabling / disabling etc.

Cc: <stable@vger.kernel.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
arch/arc/mm/cache_arc700.c

index 8c3a3e02ba92c8adbc368dba9a3cd283f32c3e72..2147ca2bc1313e1090b06f064d08e05a3d476c57 100644 (file)
@@ -155,6 +155,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;