diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2016-06-13 16:38:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-07 08:34:52 +0200 |
commit | 205537dfc68cf22c295f98ea989532d503a92cc0 (patch) | |
tree | d57f816bdb4d658c36800361e2e76e67aa82c497 /arch/arc | |
parent | 5534e7e3572b5924dafbef14675287e452f69ce9 (diff) | |
download | lwn-205537dfc68cf22c295f98ea989532d503a92cc0.tar.gz lwn-205537dfc68cf22c295f98ea989532d503a92cc0.zip |
ARC: Elide redundant setup of DMA callbacks
commit 45c3b08a117e2232fc8d7b9e849ead36386f4f96 upstream.
For resources shared by all cores such as SLC and IOC, only the master
core needs to do any setups / enabling / disabling etc.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/mm/cache.c | 9 |
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; |