summaryrefslogtreecommitdiff
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorCoco Li <lixiaoyan@google.com>2023-11-29 07:27:53 +0000
committerSasha Levin <sashal@kernel.org>2026-03-04 07:20:22 -0500
commit1402ebe132a932d1718a61cde40eba880a0b4ff4 (patch)
tree3bb72982466952be6dd9db790b084bb795c79cef /scripts/kernel-doc
parent4ec8a98b3dc3cdb0344bcda12847597a141d61d6 (diff)
cache: enforce cache groups
[ Upstream commit aeb9ce058d7c6193dc41e06b3a5b29d22c446b14 ] Set up build time warnings to safeguard against future header changes of organized structs. Warning includes: 1) whether all variables are still in the same cache group 2) whether all the cache groups have the sum of the members size (in the maximum condition, including all members defined in configs) The __cache_group* variables are ignored in kernel-doc check in the various header files they appear in to enforce the cache groups. Suggested-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Coco Li <lixiaoyan@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Shakeel Butt <shakeelb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Stable-dep-of: 87b08913a9ae ("inet: move icmp_global_{credit,stamp} to a separate cache line") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 6e199a745ccb..d963fdf40e90 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1592,6 +1592,11 @@ sub push_parameter($$$$$) {
$parameterdescs{$param} = "anonymous\n";
$anon_struct_union = 1;
}
+ elsif ($param =~ "__cacheline_group" )
+ # handle cache group enforcing variables: they do not need be described in header files
+ {
+ return; # ignore __cacheline_group_begin and __cacheline_group_end
+ }
# warn if parameter has no description
# (but ignore ones starting with # as these are not parameters