Lines Matching +full:per +full:- +full:cpu

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/percpu-defs.h - basic definitions for percpu areas
40 * Base implementations of per-CPU variable declarations and definitions, where
108 * Variant on the per-CPU variable declaration/definition theme used for
109 * ordinary per-CPU variables.
118 * Declaration/definition used for per-CPU variables that must come first in
128 * Declaration/definition used for per-CPU variables that must be cacheline
130 * data corresponds to a particular CPU, inefficiencies due to direct access by
134 * An example of this would be statistical data, where each CPU's set of data
135 * is updated by that CPU alone, but the data from across all CPUs is collated
136 * by a CPU processing a read from a proc file.
155 * Declaration/definition used for per-CPU variables that must be page aligned.
166 * Declaration/definition used for per-CPU variables that must be read mostly.
175 * Declaration/definition used for per-CPU variables that should be accessed
189 * Intermodule exports for per-CPU variables. sparse forgets about
211 * arch wants to implement an arch-specific percpu accessor or operation,
226 * Add an offset to a pointer but keep the pointer as-is. Use RELOC_HIDE()
233 #define per_cpu_ptr(ptr, cpu) \ argument
236 SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); \
263 #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); }) argument
269 #define per_cpu(var, cpu) (*per_cpu_ptr(&(var), cpu)) argument
387 * this_cpu operations (C) 2008-2013 Christoph Lameter <cl@linux.com>
389 * Optimized manipulation for memory allocated through the per cpu
390 * allocator or for addresses of per cpu variables.
393 * on the *same* processor. The assumption is that per cpu data is only
397 * for certain scalar sizes. F.e. provide this_cpu_add_2() to provide per
398 * cpu atomic operations for 2 byte sized RMW actions. If arch code does
403 * parameters are per cpu variables which have to be of the same size. A
432 #define raw_cpu_sub(pcp, val) raw_cpu_add(pcp, -(val))
435 #define raw_cpu_sub_return(pcp, val) raw_cpu_add_return(pcp, -(typeof(pcp))(val))
437 #define raw_cpu_dec_return(pcp) raw_cpu_add_return(pcp, -1)
496 #define __this_cpu_sub(pcp, val) __this_cpu_add(pcp, -(typeof(pcp))(val))
499 #define __this_cpu_sub_return(pcp, val) __this_cpu_add_return(pcp, -(typeof(pcp))(val))
501 #define __this_cpu_dec_return(pcp) __this_cpu_add_return(pcp, -1)
519 #define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
522 #define this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(typeof(pcp))(val))
524 #define this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1)