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 19:21:09 -0400
commit7ae87eebbcf7bb96467ea4f3c6563e32e1f600bc (patch)
tree7a3b8612103821f7b3ff5f3ea355bee9cf5179d1 /arch
parent0e16c544ede2bc7954de7583cb2ff1594fb5db97 (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 12b2100db073..9cfaae9887b9 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;