diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-26 01:00:58 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-04 09:17:07 -0800 |
commit | 64273d08dfb41549df3cd815baaaff781cd99992 (patch) | |
tree | c39284911a809c464d10b285de7dfe7421f92e84 /arch/sparc/mm | |
parent | 9acee190c8c055f634475ad3f742ff07049dd51e (diff) | |
download | kernel_goldelico_gta04-64273d08dfb41549df3cd815baaaff781cd99992.zip kernel_goldelico_gta04-64273d08dfb41549df3cd815baaaff781cd99992.tar.gz kernel_goldelico_gta04-64273d08dfb41549df3cd815baaaff781cd99992.tar.bz2 |
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/sparc/mm')
-rw-r--r-- | arch/sparc/mm/srmmu.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index dd8aa36..56df599 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -1916,18 +1916,6 @@ static void __cpuinit poke_viking(void) mreg |= VIKING_SBENABLE; mreg &= ~(VIKING_ACENABLE); srmmu_set_mmureg(mreg); - -#ifdef CONFIG_SMP - /* Avoid unnecessary cross calls. */ - BTFIXUPCOPY_CALL(flush_cache_all, local_flush_cache_all); - BTFIXUPCOPY_CALL(flush_cache_mm, local_flush_cache_mm); - BTFIXUPCOPY_CALL(flush_cache_range, local_flush_cache_range); - BTFIXUPCOPY_CALL(flush_cache_page, local_flush_cache_page); - BTFIXUPCOPY_CALL(__flush_page_to_ram, local_flush_page_to_ram); - BTFIXUPCOPY_CALL(flush_sig_insns, local_flush_sig_insns); - BTFIXUPCOPY_CALL(flush_page_for_dma, local_flush_page_for_dma); - btfixup(); -#endif } static void __init init_viking(void) @@ -2272,6 +2260,17 @@ void __init ld_mmu_srmmu(void) BTFIXUPSET_CALL(__flush_page_to_ram, smp_flush_page_to_ram, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(flush_sig_insns, smp_flush_sig_insns, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(flush_page_for_dma, smp_flush_page_for_dma, BTFIXUPCALL_NORM); + + if (poke_srmmu == poke_viking) { + /* Avoid unnecessary cross calls. */ + BTFIXUPCOPY_CALL(flush_cache_all, local_flush_cache_all); + BTFIXUPCOPY_CALL(flush_cache_mm, local_flush_cache_mm); + BTFIXUPCOPY_CALL(flush_cache_range, local_flush_cache_range); + BTFIXUPCOPY_CALL(flush_cache_page, local_flush_cache_page); + BTFIXUPCOPY_CALL(__flush_page_to_ram, local_flush_page_to_ram); + BTFIXUPCOPY_CALL(flush_sig_insns, local_flush_sig_insns); + BTFIXUPCOPY_CALL(flush_page_for_dma, local_flush_page_for_dma); + } #endif if (sparc_cpu_model == sun4d) |