All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: BMIPS: fix bmips_wr_vec()
@ 2015-05-27  6:25 Petri Gynther
  2015-05-27 17:36 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Petri Gynther @ 2015-05-27  6:25 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf, cernekee, f.fainelli

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>
---
 arch/mips/kernel/smp-bmips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index fd528d7..336708a 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/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)
 {
 	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));
 	instruction_hazard();
 }
-- 
2.2.0.rc0.207.ga3a616c

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-28 18:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27  6:25 [PATCH] MIPS: BMIPS: fix bmips_wr_vec() Petri Gynther
2015-05-27 17:36 ` Florian Fainelli
2015-05-28 16:41   ` Ralf Baechle
2015-05-27 20:31 ` Kevin Cernekee
2015-05-28 16:40 ` Ralf Baechle
2015-05-28 16:47   ` Kevin Cernekee
2015-05-28 18:25     ` Petri Gynther
2015-05-28 18:59       ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.