]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
percpu: Add __percpu sparse annotations to hw_breakpoint
authorTejun Heo <tj@kernel.org>
Wed, 17 Feb 2010 01:50:50 +0000 (10:50 +0900)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 27 Feb 2010 15:23:39 +0000 (16:23 +0100)
commit44ee63587dce85593c22497140db16f4e5027860
tree0b3d45f9755080f1c7362a8a2eb69e326b0e2f85
parent018cbffe6819f6f8db20a0a3acd9bab9bfd667e4
percpu: Add __percpu sparse annotations to hw_breakpoint

Add __percpu sparse annotations to hw_breakpoint.

These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors.  This patch doesn't affect normal builds.

In kernel/hw_breakpoint.c, per_cpu(nr_task_bp_pinned, cpu)'s will
trigger spurious noderef related warnings from sparse.  Changing it to
&per_cpu(nr_task_bp_pinned[0], cpu) will work around the problem but
deemed to ugly by the maintainer.  Leave it alone until better
solution can be found.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <4B7B4B7A.9050902@kernel.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
include/linux/hw_breakpoint.h
kernel/hw_breakpoint.c
samples/hw_breakpoint/data_breakpoint.c