summaryrefslogtreecommitdiff
path: root/arch/mips/emma
diff options
context:
space:
mode:
authorAlex Smith <alex.smith@imgtec.com>2014-05-01 11:51:19 (GMT)
committerRalf Baechle <ralf@linux-mips.org>2014-05-28 08:54:41 (GMT)
commit57c7ea513f0e4b033ba602550992e2ca0e6b8d2c (patch)
tree8bf4a477987a4fb671c099cea658b2a3a5ac3c63 /arch/mips/emma
parentf02ffb199d3af57407a79075f3e0e6c0e8980b6c (diff)
downloadlinux-57c7ea513f0e4b033ba602550992e2ca0e6b8d2c.tar.xz
MIPS: ptrace: Avoid smp_processor_id() in preemptible code
ptrace_{get,set}_watch_regs access current_cpu_data to get the watch register count/masks, which calls smp_processor_id(). However they are run in preemptible context and therefore trigger warnings like so: [ 6340.092000] BUG: using smp_processor_id() in preemptible [00000000] code: gdb/367 [ 6340.092000] caller is ptrace_get_watch_regs+0x44/0x220 Since the watch register count/masks should be the same across all CPUs, use boot_cpu_data instead. Note that this may need to change in future should a heterogenous system be supported where the count/masks are not the same across all CPUs (the current code is also incorrect for this scenario - current_cpu_data here would not necessarily be correct for the CPU that the target task will execute on). Signed-off-by: Alex Smith <alex.smith@imgtec.com> Reviewed-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6879/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/emma')
0 files changed, 0 insertions, 0 deletions