summaryrefslogtreecommitdiff
path: root/arch/csky/kernel/probes/kprobes.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/csky/kernel/probes/kprobes.c')
-rw-r--r--arch/csky/kernel/probes/kprobes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/csky/kernel/probes/kprobes.c b/arch/csky/kernel/probes/kprobes.c
index 42920f25e73c..34ba684d5962 100644
--- a/arch/csky/kernel/probes/kprobes.c
+++ b/arch/csky/kernel/probes/kprobes.c
@@ -30,7 +30,7 @@ static int __kprobes patch_text_cb(void *priv)
struct csky_insn_patch *param = priv;
unsigned int addr = (unsigned int)param->addr;
- if (atomic_inc_return(&param->cpu_count) == 1) {
+ if (atomic_inc_return(&param->cpu_count) == num_online_cpus()) {
*(u16 *) addr = cpu_to_le16(param->opcode);
dcache_wb_range(addr, addr + 2);
atomic_inc(&param->cpu_count);