Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Blackfin: SMP: kgdb: flush core internal write buffer before flushinv

KGDB single step in SMP kernel may hang forever in flushinv without a
CSYNC ahead. This is because the core internal write buffers need to
be flushed before invalidating the data cache to make sure the insn
fetch is not out of sync.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

authored by

Sonic Zhang and committed by
Mike Frysinger
064cc44e e54b6730

+5
+5
arch/blackfin/mach-bf561/atomic.S
··· 49 49 jump .Lretry_corelock 50 50 .Ldone_corelock: 51 51 p0 = r1; 52 + /* flush core internal write buffer before invalidate dcache */ 52 53 CSYNC(r2); 53 54 flushinv[p0]; 54 55 SSYNC(r2); ··· 686 685 r1 = -L1_CACHE_BYTES; 687 686 r1 = r0 & r1; 688 687 p0 = r1; 688 + /* flush core internal write buffer before invalidate dcache */ 689 + CSYNC(r2); 689 690 flushinv[p0]; 690 691 SSYNC(r2); 691 692 r0 = [p1]; ··· 910 907 r1 = -L1_CACHE_BYTES; 911 908 r1 = r0 & r1; 912 909 p0 = r1; 910 + /* flush core internal write buffer before invalidate dcache */ 911 + CSYNC(r2); 913 912 flushinv[p0]; 914 913 SSYNC(r2); 915 914 r0 = [p1];