From: Klara Modin <klarasmodin@gmail.com>
To: akpm@linux-foundation.org
Cc: surenb@google.com, kent.overstreet@linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Klara Modin <klarasmodin@gmail.com>
Subject: [PATCH] mm/memprofiling: explicitly include irqflags.h in alloc_tag.h
Date: Sun, 7 Apr 2024 15:32:52 +0200 [thread overview]
Message-ID: <20240407133252.173636-1-klarasmodin@gmail.com> (raw)
linux/alloc_tag.h uses the macro this_cpu_inc which eventually expands to:
#define this_cpu_generic_to_op(pcp, val, op) \
do { \
unsigned long __flags; \
raw_local_irq_save(__flags); \
raw_cpu_generic_to_op(pcp, val, op); \
raw_local_irq_restore(__flags); \
} while (0)
The macros raw_local_irq_save and raw_local_irq_restore are defined in
linux/irqflags.h which is not included implicitly on all configs.
Therefore, include it explicitly.
Fixes: ac906a377c67 ("lib: add allocation tagging support for memory allocation profiling")
Link: https://lore.kernel.org/lkml/6b8149f3-80e6-413c-abcb-1925ecda9d8c@gmail.com/
Signed-off-by: Klara Modin <klarasmodin@gmail.com>
---
include/linux/alloc_tag.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/alloc_tag.h b/include/linux/alloc_tag.h
index e867461585ff..afc9e259a2d3 100644
--- a/include/linux/alloc_tag.h
+++ b/include/linux/alloc_tag.h
@@ -12,6 +12,7 @@
#include <asm/percpu.h>
#include <linux/cpumask.h>
#include <linux/static_key.h>
+#include <linux/irqflags.h>
struct alloc_tag_counters {
u64 bytes;
base-commit: f43b3aae94511d62174c3b29239da0dd22d0eeb3
--
2.44.0
next reply other threads:[~2024-04-07 13:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 13:32 Klara Modin [this message]
2024-04-07 17:01 ` Kent Overstreet
2024-04-07 17:12 ` Klara Modin
2024-04-07 17:18 ` Kent Overstreet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240407133252.173636-1-klarasmodin@gmail.com \
--to=klarasmodin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=surenb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox