* [PATCH] mm: vm_event_item: Explicit #include for THREAD_SIZE
@ 2025-09-09 20:13 Brian Norris
2025-09-09 23:53 ` Andrew Morton
2025-09-11 12:43 ` Lorenzo Stoakes
0 siblings, 2 replies; 4+ messages in thread
From: Brian Norris @ 2025-09-09 20:13 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand
Cc: linux-kernel, Michal Hocko, Mike Rapoport, Lorenzo Stoakes,
Suren Baghdasaryan, Vlastimil Babka, linux-mm, Liam R. Howlett,
Brian Norris
This header uses THREAD_SIZE, which is provided by the thread_info.h
header but is not included in this header. Depending on the #include
ordering in other files, this can produce preprocessor errors.
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
include/linux/vm_event_item.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h
index 9e15a088ba38..92f80b4d69a6 100644
--- a/include/linux/vm_event_item.h
+++ b/include/linux/vm_event_item.h
@@ -2,6 +2,8 @@
#ifndef VM_EVENT_ITEM_H_INCLUDED
#define VM_EVENT_ITEM_H_INCLUDED
+#include <linux/thread_info.h>
+
#ifdef CONFIG_ZONE_DMA
#define DMA_ZONE(xx) xx##_DMA,
#else
--
2.51.0.384.g4c02a37b29-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: vm_event_item: Explicit #include for THREAD_SIZE
2025-09-09 20:13 [PATCH] mm: vm_event_item: Explicit #include for THREAD_SIZE Brian Norris
@ 2025-09-09 23:53 ` Andrew Morton
2025-09-10 0:01 ` Brian Norris
2025-09-11 12:43 ` Lorenzo Stoakes
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2025-09-09 23:53 UTC (permalink / raw)
To: Brian Norris
Cc: David Hildenbrand, linux-kernel, Michal Hocko, Mike Rapoport,
Lorenzo Stoakes, Suren Baghdasaryan, Vlastimil Babka, linux-mm,
Liam R. Howlett
On Tue, 9 Sep 2025 13:13:57 -0700 Brian Norris <briannorris@chromium.org> wrote:
> This header uses THREAD_SIZE, which is provided by the thread_info.h
> header but is not included in this header. Depending on the #include
> ordering in other files, this can produce preprocessor errors.
>
> ...
>
> --- a/include/linux/vm_event_item.h
> +++ b/include/linux/vm_event_item.h
> @@ -2,6 +2,8 @@
> #ifndef VM_EVENT_ITEM_H_INCLUDED
> #define VM_EVENT_ITEM_H_INCLUDED
>
> +#include <linux/thread_info.h>
> +
> #ifdef CONFIG_ZONE_DMA
> #define DMA_ZONE(xx) xx##_DMA,
> #else
Is there a known configuraion which triggers this, or was this from
inspection?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: vm_event_item: Explicit #include for THREAD_SIZE
2025-09-09 23:53 ` Andrew Morton
@ 2025-09-10 0:01 ` Brian Norris
0 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2025-09-10 0:01 UTC (permalink / raw)
To: Andrew Morton
Cc: David Hildenbrand, linux-kernel, Michal Hocko, Mike Rapoport,
Lorenzo Stoakes, Suren Baghdasaryan, Vlastimil Babka, linux-mm,
Liam R. Howlett
On Tue, Sep 09, 2025 at 04:53:36PM -0700, Andrew Morton wrote:
> On Tue, 9 Sep 2025 13:13:57 -0700 Brian Norris <briannorris@chromium.org> wrote:
>
> > This header uses THREAD_SIZE, which is provided by the thread_info.h
> > header but is not included in this header. Depending on the #include
> > ordering in other files, this can produce preprocessor errors.
> >
> > ...
> >
> > --- a/include/linux/vm_event_item.h
> > +++ b/include/linux/vm_event_item.h
> > @@ -2,6 +2,8 @@
> > #ifndef VM_EVENT_ITEM_H_INCLUDED
> > #define VM_EVENT_ITEM_H_INCLUDED
> >
> > +#include <linux/thread_info.h>
> > +
> > #ifdef CONFIG_ZONE_DMA
> > #define DMA_ZONE(xx) xx##_DMA,
> > #else
>
> Is there a known configuraion which triggers this, or was this from
> inspection?
The original trigger was a non-upstream driver that includes this
header. Since the root cause lay here, I figured I might as well patch
it at the origin.
Brian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: vm_event_item: Explicit #include for THREAD_SIZE
2025-09-09 20:13 [PATCH] mm: vm_event_item: Explicit #include for THREAD_SIZE Brian Norris
2025-09-09 23:53 ` Andrew Morton
@ 2025-09-11 12:43 ` Lorenzo Stoakes
1 sibling, 0 replies; 4+ messages in thread
From: Lorenzo Stoakes @ 2025-09-11 12:43 UTC (permalink / raw)
To: Brian Norris
Cc: Andrew Morton, David Hildenbrand, linux-kernel, Michal Hocko,
Mike Rapoport, Suren Baghdasaryan, Vlastimil Babka, linux-mm,
Liam R. Howlett
On Tue, Sep 09, 2025 at 01:13:57PM -0700, Brian Norris wrote:
> This header uses THREAD_SIZE, which is provided by the thread_info.h
> header but is not included in this header. Depending on the #include
> ordering in other files, this can produce preprocessor errors.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
This LGTM, so:
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
>
> include/linux/vm_event_item.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h
> index 9e15a088ba38..92f80b4d69a6 100644
> --- a/include/linux/vm_event_item.h
> +++ b/include/linux/vm_event_item.h
> @@ -2,6 +2,8 @@
> #ifndef VM_EVENT_ITEM_H_INCLUDED
> #define VM_EVENT_ITEM_H_INCLUDED
>
> +#include <linux/thread_info.h>
> +
> #ifdef CONFIG_ZONE_DMA
> #define DMA_ZONE(xx) xx##_DMA,
> #else
> --
> 2.51.0.384.g4c02a37b29-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-11 12:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-09 20:13 [PATCH] mm: vm_event_item: Explicit #include for THREAD_SIZE Brian Norris
2025-09-09 23:53 ` Andrew Morton
2025-09-10 0:01 ` Brian Norris
2025-09-11 12:43 ` Lorenzo Stoakes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox