linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mm-new] mm/zblock: avoid failing the build
@ 2025-04-28  6:57 Igor Belousov
  2025-04-28  8:46 ` kernel test robot
  2025-04-28  9:27 ` Andrew Morton
  0 siblings, 2 replies; 3+ messages in thread
From: Igor Belousov @ 2025-04-28  6:57 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: akpm, hannes, minchan, nphamcs, senozhatsky, shakeel.butt,
	yosry.ahmed, Igor Belousov

Don't break the build for a PAGE_SIZE that is not fully supported,
just print out a warning in that case.

Signed-off-by: Igor Belousov <igor.b@beldev.am>
---
 mm/zblock.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/zblock.h b/mm/zblock.h
index fd72961c077a..8610196b651e 100644
--- a/mm/zblock.h
+++ b/mm/zblock.h
@@ -21,7 +21,8 @@
 /* max 256 slots per block, max table size 64 */
 #define SLOT_BITS 8
 #else
-#error Unsupported PAGE_SIZE
+#warn This PAGE_SIZE is not quite supported yet
+#define SLOT_BITS 8
 #endif
 
 #define MAX_SLOTS (1 << SLOT_BITS)
@@ -101,7 +102,7 @@ static const struct block_desc block_desc[] = {
 	{ SLOT_SIZE(10, 3), 10, 3 },
 	{ SLOT_SIZE(9, 3), 9, 3 },
 	{ SLOT_SIZE(4, 2), 4, 2 },
-#elif PAGE_SIZE == 0x4000
+#else
 	{ SLOT_SIZE(255, 0), 255, 0 },
 	{ SLOT_SIZE(185, 0), 185, 0 },
 	{ SLOT_SIZE(145, 0), 145, 0 },
-- 
2.49.0



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

end of thread, other threads:[~2025-04-28  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-28  6:57 [PATCH mm-new] mm/zblock: avoid failing the build Igor Belousov
2025-04-28  8:46 ` kernel test robot
2025-04-28  9:27 ` Andrew Morton

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