public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memblock tests: define MIGRATE_CMA
@ 2026-05-04 10:27 Pratyush Yadav
  2026-05-04 10:32 ` Pasha Tatashin
  2026-05-04 13:46 ` Mike Rapoport
  0 siblings, 2 replies; 5+ messages in thread
From: Pratyush Yadav @ 2026-05-04 10:27 UTC (permalink / raw)
  To: Pasha Tatashin, Mike Rapoport, Michal Clapinski, Pratyush Yadav
  Cc: kexec, linux-mm, linux-kernel

From: "Pratyush Yadav (Google)" <pratyush@kernel.org>

kho_scratch_migratetype(), defined in include/linux/memblock.h uses enum
migratetype. This breaks build for memblock tests with:

./linux/memblock.h:634:73: error: parameter 2 (‘mt’) has incomplete type
  634 |                                                        enum migratetype mt)

Fix it by defining enum migratetype and MIGRATE_CMA. As is the case with
the other headers in tools/testing/memblock, do not bring in the whole 
thing, only what is needed.

Reported-by: Mike Rapoport <rppt@kernel.org>
Closes: https://lore.kernel.org/linux-mm/afcdDm4aAJvNaQqH@kernel.org/
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
---

Notes:
    I didn't add a Fixes here since the commit hash for the deferred series
    isn't stable yet. Anyway, I think we should fold this into "kho: fix
    deferred initialization of scratch areas". So random bisects don't land
    on a broken test.

 tools/testing/memblock/linux/mmzone.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/memblock/linux/mmzone.h b/tools/testing/memblock/linux/mmzone.h
index bb682659a12d..8d934ff5b080 100644
--- a/tools/testing/memblock/linux/mmzone.h
+++ b/tools/testing/memblock/linux/mmzone.h
@@ -35,4 +35,8 @@ typedef struct pglist_data {
 
 } pg_data_t;
 
+enum migratetype {
+	MIGRATE_CMA,
+};
+
 #endif

base-commit: 74d1099bb4edfca3ce6edc61dbacbed96720034c
-- 
2.54.0.545.g6539524ca2-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] memblock tests: define MIGRATE_CMA
  2026-05-04 10:27 [PATCH] memblock tests: define MIGRATE_CMA Pratyush Yadav
@ 2026-05-04 10:32 ` Pasha Tatashin
  2026-05-04 12:31   ` Pratyush Yadav
  2026-05-04 13:46 ` Mike Rapoport
  1 sibling, 1 reply; 5+ messages in thread
From: Pasha Tatashin @ 2026-05-04 10:32 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: Mike Rapoport, Michal Clapinski, kexec, linux-mm, linux-kernel

On Mon, May 4, 2026 at 6:27 AM Pratyush Yadav <pratyush@kernel.org> wrote:
>
> From: "Pratyush Yadav (Google)" <pratyush@kernel.org>
>
> kho_scratch_migratetype(), defined in include/linux/memblock.h uses enum
> migratetype. This breaks build for memblock tests with:
>
> ./linux/memblock.h:634:73: error: parameter 2 (‘mt’) has incomplete type
>   634 |                                                        enum migratetype mt)
>
> Fix it by defining enum migratetype and MIGRATE_CMA. As is the case with
> the other headers in tools/testing/memblock, do not bring in the whole
> thing, only what is needed.
>
> Reported-by: Mike Rapoport <rppt@kernel.org>
> Closes: https://lore.kernel.org/linux-mm/afcdDm4aAJvNaQqH@kernel.org/

Link does not open for me.

Pasha

> Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
> ---
>
> Notes:
>     I didn't add a Fixes here since the commit hash for the deferred series
>     isn't stable yet. Anyway, I think we should fold this into "kho: fix
>     deferred initialization of scratch areas". So random bisects don't land
>     on a broken test.
>
>  tools/testing/memblock/linux/mmzone.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/memblock/linux/mmzone.h b/tools/testing/memblock/linux/mmzone.h
> index bb682659a12d..8d934ff5b080 100644
> --- a/tools/testing/memblock/linux/mmzone.h
> +++ b/tools/testing/memblock/linux/mmzone.h
> @@ -35,4 +35,8 @@ typedef struct pglist_data {
>
>  } pg_data_t;
>
> +enum migratetype {
> +       MIGRATE_CMA,
> +};
> +
>  #endif
>
> base-commit: 74d1099bb4edfca3ce6edc61dbacbed96720034c
> --
> 2.54.0.545.g6539524ca2-goog
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] memblock tests: define MIGRATE_CMA
  2026-05-04 10:32 ` Pasha Tatashin
@ 2026-05-04 12:31   ` Pratyush Yadav
  2026-05-04 12:33     ` Pratyush Yadav
  0 siblings, 1 reply; 5+ messages in thread
From: Pratyush Yadav @ 2026-05-04 12:31 UTC (permalink / raw)
  To: Pasha Tatashin
  Cc: Pratyush Yadav, Mike Rapoport, Michal Clapinski, kexec, linux-mm,
	linux-kernel

On Mon, May 04 2026, Pasha Tatashin wrote:

> On Mon, May 4, 2026 at 6:27 AM Pratyush Yadav <pratyush@kernel.org> wrote:
>>
>> From: "Pratyush Yadav (Google)" <pratyush@kernel.org>
>>
>> kho_scratch_migratetype(), defined in include/linux/memblock.h uses enum
>> migratetype. This breaks build for memblock tests with:
>>
>> ./linux/memblock.h:634:73: error: parameter 2 (‘mt’) has incomplete type
>>   634 |                                                        enum migratetype mt)
>>
>> Fix it by defining enum migratetype and MIGRATE_CMA. As is the case with
>> the other headers in tools/testing/memblock, do not bring in the whole
>> thing, only what is needed.
>>
>> Reported-by: Mike Rapoport <rppt@kernel.org>
>> Closes: https://lore.kernel.org/linux-mm/afcdDm4aAJvNaQqH@kernel.org/
>
> Link does not open for me.

Dunno why. Works fine for me... Maybe some temporary issue with lore?

[...]

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] memblock tests: define MIGRATE_CMA
  2026-05-04 12:31   ` Pratyush Yadav
@ 2026-05-04 12:33     ` Pratyush Yadav
  0 siblings, 0 replies; 5+ messages in thread
From: Pratyush Yadav @ 2026-05-04 12:33 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: Pasha Tatashin, Mike Rapoport, Michal Clapinski, kexec, linux-mm,
	linux-kernel

On Mon, May 04 2026, Pratyush Yadav wrote:

> On Mon, May 04 2026, Pasha Tatashin wrote:
>
>> On Mon, May 4, 2026 at 6:27 AM Pratyush Yadav <pratyush@kernel.org> wrote:
>>>
>>> From: "Pratyush Yadav (Google)" <pratyush@kernel.org>
>>>
>>> kho_scratch_migratetype(), defined in include/linux/memblock.h uses enum
>>> migratetype. This breaks build for memblock tests with:
>>>
>>> ./linux/memblock.h:634:73: error: parameter 2 (‘mt’) has incomplete type
>>>   634 |                                                        enum migratetype mt)
>>>
>>> Fix it by defining enum migratetype and MIGRATE_CMA. As is the case with
>>> the other headers in tools/testing/memblock, do not bring in the whole
>>> thing, only what is needed.
>>>
>>> Reported-by: Mike Rapoport <rppt@kernel.org>
>>> Closes: https://lore.kernel.org/linux-mm/afcdDm4aAJvNaQqH@kernel.org/
>>
>> Link does not open for me.
>
> Dunno why. Works fine for me... Maybe some temporary issue with lore?

Or, look for the thread under "Re: [PATCH v9 0/3] kho: add support for
deferred struct page init" in your mailbox.

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] memblock tests: define MIGRATE_CMA
  2026-05-04 10:27 [PATCH] memblock tests: define MIGRATE_CMA Pratyush Yadav
  2026-05-04 10:32 ` Pasha Tatashin
@ 2026-05-04 13:46 ` Mike Rapoport
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2026-05-04 13:46 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: Pasha Tatashin, Michal Clapinski, kexec, linux-mm, linux-kernel

On Mon, May 04, 2026 at 12:27:40PM +0200, Pratyush Yadav wrote:
> From: "Pratyush Yadav (Google)" <pratyush@kernel.org>
> 
> kho_scratch_migratetype(), defined in include/linux/memblock.h uses enum
> migratetype. This breaks build for memblock tests with:
> 
> ./linux/memblock.h:634:73: error: parameter 2 (‘mt’) has incomplete type
>   634 |                                                        enum migratetype mt)
> 
> Fix it by defining enum migratetype and MIGRATE_CMA. As is the case with
> the other headers in tools/testing/memblock, do not bring in the whole 
> thing, only what is needed.
> 
> Reported-by: Mike Rapoport <rppt@kernel.org>
> Closes: https://lore.kernel.org/linux-mm/afcdDm4aAJvNaQqH@kernel.org/
> Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
> ---
> 
> Notes:
>     I didn't add a Fixes here since the commit hash for the deferred series
>     isn't stable yet. Anyway, I think we should fold this into "kho: fix
>     deferred initialization of scratch areas". So random bisects don't land
>     on a broken test.

I applied it to next as a separate patch for now.
 
>  tools/testing/memblock/linux/mmzone.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/memblock/linux/mmzone.h b/tools/testing/memblock/linux/mmzone.h
> index bb682659a12d..8d934ff5b080 100644
> --- a/tools/testing/memblock/linux/mmzone.h
> +++ b/tools/testing/memblock/linux/mmzone.h
> @@ -35,4 +35,8 @@ typedef struct pglist_data {
>  
>  } pg_data_t;
>  
> +enum migratetype {
> +	MIGRATE_CMA,
> +};
> +
>  #endif
> 
> base-commit: 74d1099bb4edfca3ce6edc61dbacbed96720034c
> -- 
> 2.54.0.545.g6539524ca2-goog
> 

-- 
Sincerely yours,
Mike.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-04 13:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 10:27 [PATCH] memblock tests: define MIGRATE_CMA Pratyush Yadav
2026-05-04 10:32 ` Pasha Tatashin
2026-05-04 12:31   ` Pratyush Yadav
2026-05-04 12:33     ` Pratyush Yadav
2026-05-04 13:46 ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox