cache: enforce cache groups
authorCoco Li <lixiaoyan@google.com>
Wed, 29 Nov 2023 07:27:53 +0000 (07:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Dec 2023 22:24:36 +0000 (22:24 +0000)
commitaeb9ce058d7c6193dc41e06b3a5b29d22c446b14
tree3047cfd71da52b78f77f397ae3fbad4abee7267f
parent14006f1d8fa24a2320781ad503ca1cba92e940d2
cache: enforce cache groups

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>
include/linux/cache.h
scripts/kernel-doc