Skip to contentSkip to conversation

memblock tests: define MIGRATE_CMA

PATCH In review Pratyush Yadav 3 participants 5 messages May 4

Subsystems (4)
lore
Share & tools
lore

Pratyush Yadav

author maintainer
#0 lore raw

PATCH 1/1 memblock tests: define MIGRATE_CMA

From: "Pratyush Yadav (Google)" <[email protected]>

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.

---

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(+)
tools/testing/memblock/linux/mmzone.h +4 -0
index bb682659a12d..8d934ff5b080 100644
@@ -35,4 +35,8 @@ typedef struct pglist_data {
 
 } pg_data_t;
 
+enum migratetype {
+	MIGRATE_CMA,
+};
+
 #endif

base-commit: 74d1099bb4edfca3ce6edc61dbacbed96720034c

Signature · 1 line
2.54.0.545.g6539524ca2-goog
maintainer
#1 lore raw
Quoted 9 lines · Pratyush Yadav

From: "Pratyush Yadav (Google)" <[email protected]>

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)

Quoted 6 lines

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.

Link does not open for me.

Pasha

Quoted 30 lines

---

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(+)
tools/testing/memblock/linux/mmzone.h +4 -0
index bb682659a12d..8d934ff5b080 100644
@@ -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

author maintainer
#2 lore raw
Quoted 10 lines · Pasha Tatashin
Quoted 9 lines · Pratyush Yadav

From: "Pratyush Yadav (Google)" <[email protected]>

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)

Quoted 8 lines
Quoted 6 lines

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.

Link does not open for me.

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

[...]

Signature · 2 lines
Regards,
Pratyush Yadav
author maintainer
#3 lore raw
Quoted 16 lines · Pratyush Yadav
Quoted 14 lines · Pasha Tatashin
Quoted 13 lines · Pratyush Yadav

From: "Pratyush Yadav (Google)" <[email protected]>

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.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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.

Signature · 2 lines
Regards,
Pratyush Yadav
maintainer
#4 lore raw
In reply to Pratyush Yadav
Quoted 15 lines · Pratyush Yadav

From: "Pratyush Yadav (Google)" <[email protected]>

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.

Quoted 7 lines

---

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.

Quoted 21 lines
 tools/testing/memblock/linux/mmzone.h | 4 ++++
 1 file changed, 4 insertions(+)
tools/testing/memblock/linux/mmzone.h +4 -0
index bb682659a12d..8d934ff5b080 100644
@@ -35,4 +35,8 @@ typedef struct pglist_data {
 
 } pg_data_t;
 
+enum migratetype {
+	MIGRATE_CMA,
+};
+
 #endif

base-commit: 74d1099bb4edfca3ce6edc61dbacbed96720034c

Signature · 1 line
2.54.0.545.g6539524ca2-goog
Signature · 2 lines
Sincerely yours,
Mike.