summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSasha Levin <alexander.levin@verizon.com>2016-08-30 22:04:29 -0400
committerSasha Levin <alexander.levin@verizon.com>2016-08-31 22:05:44 -0400
commitcc2082d16b1dd1df4f10c56ad98cb266064799a5 (patch)
tree2c45ca183f7e6c2229e3012fc92b6e416ea4eef7 /arch
parent63998a4d6d38779daef8062a8f8755e22b50cc22 (diff)
ARC: Elide redundant setup of DMA callbacks
[ 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/mm/cache_arc700.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arc/mm/cache_arc700.c b/arch/arc/mm/cache_arc700.c
index 8c3a3e02ba92..2147ca2bc131 100644
--- a/arch/arc/mm/cache_arc700.c
+++ b/arch/arc/mm/cache_arc700.c
@@ -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;