summaryrefslogtreecommitdiff
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2016-06-13 17:38:27 +0300
committerVineet Gupta <vgupta@synopsys.com>2016-08-10 20:16:46 +0300
commit45c3b08a117e2232fc8d7b9e849ead36386f4f96 (patch)
treefe8d92ab12ffe55a79de6a2a183f5150991988e0 /arch/arc
parent18b43e89d295cc65151c505c643c98fb2c320e59 (diff)
downloadlinux-45c3b08a117e2232fc8d7b9e849ead36386f4f96.tar.xz
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: <stable@vger.kernel.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/mm/cache.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
index 5a294b2c3cb3..0b10efe3a6a7 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -921,6 +921,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;