diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-13 20:49:31 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-13 20:49:31 -0700 |
commit | 5d83d66635bb1642f3c6a3690c28ff4afdf1ae5f (patch) | |
tree | fb3f20377d8567af11be07c383ff21bf5fc6850a /arch/sparc/kernel/leon_smp.c | |
parent | b25e74b1be321613bf33492cd9d2e5dd0924562d (diff) | |
download | linux-5d83d66635bb1642f3c6a3690c28ff4afdf1ae5f.tar.gz linux-5d83d66635bb1642f3c6a3690c28ff4afdf1ae5f.tar.bz2 linux-5d83d66635bb1642f3c6a3690c28ff4afdf1ae5f.zip |
sparc32: Move cache and TLB flushes over to method ops.
This eliminated most of the remaining users of btfixup.
There are some complications because of the special cases we
have for sun4d, leon, and some flavors of viking.
It was found that there are no cases where a flush_page_for_dma
method was not hooked up to something, so the "noflush" iommu
methods were removed.
Add some documentation to the viking_sun4d_smp_ops to describe exactly
the hardware bug which causes us to need special TLB flushing on
sun4d.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/leon_smp.c')
-rw-r--r-- | arch/sparc/kernel/leon_smp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index 356dfc45cdd0..f3e3630e31a3 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c @@ -75,8 +75,8 @@ void __cpuinit leon_callin(void) { int cpuid = hard_smpleon_processor_id(); - local_flush_cache_all(); - local_flush_tlb_all(); + local_ops->cache_all(); + local_ops->tlb_all(); leon_configure_cache_smp(); notify_cpu_starting(cpuid); @@ -87,8 +87,8 @@ void __cpuinit leon_callin(void) calibrate_delay(); smp_store_cpu_info(cpuid); - local_flush_cache_all(); - local_flush_tlb_all(); + local_ops->cache_all(); + local_ops->tlb_all(); /* * Unblock the master CPU _only_ when the scheduler state @@ -99,8 +99,8 @@ void __cpuinit leon_callin(void) */ do_swap(&cpu_callin_map[cpuid], 1); - local_flush_cache_all(); - local_flush_tlb_all(); + local_ops->cache_all(); + local_ops->tlb_all(); /* Fix idle thread fields. */ __asm__ __volatile__("ld [%0], %%g6\n\t" : : "r"(¤t_set[cpuid]) @@ -143,8 +143,8 @@ void __init leon_configure_cache_smp(void) } } - local_flush_cache_all(); - local_flush_tlb_all(); + local_ops->cache_all(); + local_ops->tlb_all(); } void leon_smp_setbroadcast(unsigned int mask) @@ -199,7 +199,7 @@ void __init leon_boot_cpus(void) leon_smp_setbroadcast(1 << LEON3_IRQ_TICKER); leon_configure_cache_smp(); - local_flush_cache_all(); + local_ops->cache_all(); } @@ -226,7 +226,7 @@ int __cpuinit leon_boot_one_cpu(int i) /* whirrr, whirrr, whirrrrrrrrr... */ printk(KERN_INFO "Starting CPU %d : (irqmp: 0x%x)\n", (unsigned int)i, (unsigned int)&leon3_irqctrl_regs->mpstatus); - local_flush_cache_all(); + local_ops->cache_all(); /* Make sure all IRQs are of from the start for this new CPU */ LEON_BYPASS_STORE_PA(&leon3_irqctrl_regs->mask[i], 0); @@ -251,7 +251,7 @@ int __cpuinit leon_boot_one_cpu(int i) leon_enable_irq_cpu(leon_ipi_irq, i); } - local_flush_cache_all(); + local_ops->cache_all(); return 0; } @@ -271,7 +271,7 @@ void __init leon_smp_done(void) } } *prev = first; - local_flush_cache_all(); + local_ops->cache_all(); /* Free unneeded trap tables */ if (!cpu_present(1)) { @@ -337,7 +337,7 @@ static void __init leon_ipi_init(void) local_irq_save(flags); trap_table = &sparc_ttable[SP_TRAP_IRQ1 + (leon_ipi_irq - 1)]; trap_table->inst_three += smpleon_ipi - real_irq_entry; - local_flush_cache_all(); + local_ops->cache_all(); local_irq_restore(flags); for_each_possible_cpu(cpu) { |