OSDN Git Service

MIPS: Fix ejtag handler on SMP
authorHeiher <r@hev.cc>
Mon, 11 Jun 2018 09:01:10 +0000 (17:01 +0800)
committerPaul Burton <paul.burton@mips.com>
Sun, 24 Jun 2018 16:27:27 +0000 (09:27 -0700)
commitc8bf38055efaf764fd8c313695759c64dc735842
tree01514c17094ee3154485f4b1888492f319c4cd83
parentbe462bd9700aec12029d43d48e6ff2207cb68fb7
MIPS: Fix ejtag handler on SMP

On SMP systems, the shared ejtag debug buffer may be overwritten by
other cores, because every cores can generate ejtag exception at
same time.

Unfortunately, in that context, it's difficult to relax more registers
to access per cpu buffers. so use ll/sc to serialize the access.

[paul.burton@mips.com:
  This could in theory be backported at least as far back as the
  beginning of the git era, however in general it's exceedingly rare
  that anyone would hit this without further changes, so it doesn't seem
  worthwhile marking for backport.]

Signed-off-by: Heiher <r@hev.cc>
Patchwork: https://patchwork.linux-mips.org/patch/19507/
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: jhogan@kernel.org
Cc: ralf@linux-mips.org
arch/mips/kernel/genex.S