Browse Source

MIPS: BMIPS: Fix bmips_wr_vec()

bmips_wr_vec() copies exception vector code from start to dst.

The call to dma_cache_wback() needs to flush (end-start) bytes,
starting at dst, from write-back cache to memory.

Signed-off-by: Petri Gynther <pgynther@google.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10193/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Petri Gynther 10 years ago
parent
commit
57b4175823
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/mips/kernel/smp-bmips.c

+ 1 - 1
arch/mips/kernel/smp-bmips.c

@@ -444,7 +444,7 @@ struct plat_smp_ops bmips5000_smp_ops = {
 static void bmips_wr_vec(unsigned long dst, char *start, char *end)
 static void bmips_wr_vec(unsigned long dst, char *start, char *end)
 {
 {
 	memcpy((void *)dst, start, end - start);
 	memcpy((void *)dst, start, end - start);
-	dma_cache_wback((unsigned long)start, end - start);
+	dma_cache_wback(dst, end - start);
 	local_flush_icache_range(dst, dst + (end - start));
 	local_flush_icache_range(dst, dst + (end - start));
 	instruction_hazard();
 	instruction_hazard();
 }
 }