]> git.karo-electronics.de Git - linux-beck.git/commit
percpu: invoke __verify_pcpu_ptr() from the generic part of accessors and operations
authorTejun Heo <tj@kernel.org>
Tue, 17 Jun 2014 23:12:40 +0000 (19:12 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 17 Jun 2014 23:12:40 +0000 (19:12 -0400)
commit6fbc07bbe2b5a898532f970c5a397f8789ace0d5
treec9b615d1c4e48b35d13bdfdef786875b45c605d9
parenteba117889ac444bea6e8270049cbaeed48169889
percpu: invoke __verify_pcpu_ptr() from the generic part of accessors and operations

__verify_pcpu_ptr() is used to verify that a specified parameter is
actually an percpu pointer by percpu accessor and operation
implementations.  Currently, where it's called isn't clearly defined
and we just ensure that it's invoked at least once for all accessors
and operations.

The lack of clarity on when it should be called isn't nice and given
that this is a completely generic issue, there's no reason to make
archs worry about it.

This patch updates __verify_pcpu_ptr() invocations such that it's
always invoked from the final generic wrapper once per access or
operation.  As this is already the case for {raw|this}_cpu_*()
definitions through __pcpu_size_*(), only the {raw|per|this}_cpu_ptr()
accessors need to be updated.

This change makes it unnecessary for archs to worry about
__verify_pcpu_ptr().  x86's arch_raw_cpu_ptr() is updated accordingly.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
arch/x86/include/asm/percpu.h
include/linux/percpu-defs.h