aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-26 04:00:58 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-04 12:17:07 -0500
commit64273d08dfb41549df3cd815baaaff781cd99992 (patch)
treec39284911a809c464d10b285de7dfe7421f92e84 /arch
parent9acee190c8c055f634475ad3f742ff07049dd51e (diff)
sparc32: Don't btfixup cache flush ops for viking multiple times.
Just do it once. Pointed out by Al Viro. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/mm/srmmu.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index dd8aa36f366c..56df59903eaa 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -1916,18 +1916,6 @@ static void __cpuinit poke_viking(void)
1916 mreg |= VIKING_SBENABLE; 1916 mreg |= VIKING_SBENABLE;
1917 mreg &= ~(VIKING_ACENABLE); 1917 mreg &= ~(VIKING_ACENABLE);
1918 srmmu_set_mmureg(mreg); 1918 srmmu_set_mmureg(mreg);
1919
1920#ifdef CONFIG_SMP
1921 /* Avoid unnecessary cross calls. */
1922 BTFIXUPCOPY_CALL(flush_cache_all, local_flush_cache_all);
1923 BTFIXUPCOPY_CALL(flush_cache_mm, local_flush_cache_mm);
1924 BTFIXUPCOPY_CALL(flush_cache_range, local_flush_cache_range);
1925 BTFIXUPCOPY_CALL(flush_cache_page, local_flush_cache_page);
1926 BTFIXUPCOPY_CALL(__flush_page_to_ram, local_flush_page_to_ram);
1927 BTFIXUPCOPY_CALL(flush_sig_insns, local_flush_sig_insns);
1928 BTFIXUPCOPY_CALL(flush_page_for_dma, local_flush_page_for_dma);
1929 btfixup();
1930#endif
1931} 1919}
1932 1920
1933static void __init init_viking(void) 1921static void __init init_viking(void)
@@ -2272,6 +2260,17 @@ void __init ld_mmu_srmmu(void)
2272 BTFIXUPSET_CALL(__flush_page_to_ram, smp_flush_page_to_ram, BTFIXUPCALL_NORM); 2260 BTFIXUPSET_CALL(__flush_page_to_ram, smp_flush_page_to_ram, BTFIXUPCALL_NORM);
2273 BTFIXUPSET_CALL(flush_sig_insns, smp_flush_sig_insns, BTFIXUPCALL_NORM); 2261 BTFIXUPSET_CALL(flush_sig_insns, smp_flush_sig_insns, BTFIXUPCALL_NORM);
2274 BTFIXUPSET_CALL(flush_page_for_dma, smp_flush_page_for_dma, BTFIXUPCALL_NORM); 2262 BTFIXUPSET_CALL(flush_page_for_dma, smp_flush_page_for_dma, BTFIXUPCALL_NORM);
2263
2264 if (poke_srmmu == poke_viking) {
2265 /* Avoid unnecessary cross calls. */
2266 BTFIXUPCOPY_CALL(flush_cache_all, local_flush_cache_all);
2267 BTFIXUPCOPY_CALL(flush_cache_mm, local_flush_cache_mm);
2268 BTFIXUPCOPY_CALL(flush_cache_range, local_flush_cache_range);
2269 BTFIXUPCOPY_CALL(flush_cache_page, local_flush_cache_page);
2270 BTFIXUPCOPY_CALL(__flush_page_to_ram, local_flush_page_to_ram);
2271 BTFIXUPCOPY_CALL(flush_sig_insns, local_flush_sig_insns);
2272 BTFIXUPCOPY_CALL(flush_page_for_dma, local_flush_page_for_dma);
2273 }
2275#endif 2274#endif
2276 2275
2277 if (sparc_cpu_model == sun4d) 2276 if (sparc_cpu_model == sun4d)