summaryrefslogtreecommitdiff
path: root/include/linux/once.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-11-15 20:23:01 +0300
committerJakub Kicinski <kuba@kernel.org>2021-11-17 06:07:53 +0300
commitc2c60ea37e5b6be58c9dd7aff0b2e86ba0f18e0b (patch)
treeca36be4716b4a0912c07952c5b8a85e4ae077f66 /include/linux/once.h
parent62803fec52f80e4dd375de2dd76510c405792928 (diff)
downloadlinux-c2c60ea37e5b6be58c9dd7aff0b2e86ba0f18e0b.tar.xz
once: use __section(".data.once")
.data.once contains nicely packed bool variables. It is used already by DO_ONCE_LITE(). Using it also in DO_ONCE() removes holes in .data section. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/once.h')
-rw-r--r--include/linux/once.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/once.h b/include/linux/once.h
index d361fb14ac3a..f54523052bbc 100644
--- a/include/linux/once.h
+++ b/include/linux/once.h
@@ -38,7 +38,7 @@ void __do_once_done(bool *done, struct static_key_true *once_key,
#define DO_ONCE(func, ...) \
({ \
bool ___ret = false; \
- static bool ___done = false; \
+ static bool __section(".data.once") ___done = false; \
static DEFINE_STATIC_KEY_TRUE(___once_key); \
if (static_branch_unlikely(&___once_key)) { \
unsigned long ___flags; \