diff options
author | Sasha Levin <alexander.levin@verizon.com> | 2016-08-30 22:04:29 -0400 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-08-31 19:21:09 -0400 |
commit | 7ae87eebbcf7bb96467ea4f3c6563e32e1f600bc (patch) | |
tree | 7a3b8612103821f7b3ff5f3ea355bee9cf5179d1 /arch/arc | |
parent | 0e16c544ede2bc7954de7583cb2ff1594fb5db97 (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/arc')
-rw-r--r-- | arch/arc/mm/cache_arc700.c | 9 |
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; |