public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma-pool: don't allocate DMA32 pool if no 32-bit memory
@ 2026-01-11 15:26 Vladimir Kondratiev
  2026-01-11 19:08 ` kernel test robot
  2026-01-12  1:05 ` kernel test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Kondratiev @ 2026-01-11 15:26 UTC (permalink / raw)
  To: Marek Szyprowski, Robin Murphy; +Cc: Vladimir Kondratiev, iommu, linux-kernel

If system have no 32-bit memory, GFP_DMA32 pool allocation will
obviously fail, so skip it.

Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
---
 kernel/dma/pool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c
index ee45dee33d49..f38170f6635b 100644
--- a/kernel/dma/pool.c
+++ b/kernel/dma/pool.c
@@ -209,7 +209,7 @@ static int __init dma_atomic_pool_init(void)
 		if (!atomic_pool_dma)
 			ret = -ENOMEM;
 	}
-	if (IS_ENABLED(CONFIG_ZONE_DMA32)) {
+	if (IS_ENABLED(CONFIG_ZONE_DMA32) && phys_ram_base < BIT_ULL(32)) {
 		atomic_pool_dma32 = __dma_atomic_pool_init(atomic_pool_size,
 						GFP_KERNEL | GFP_DMA32);
 		if (!atomic_pool_dma32)

base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
-- 
2.43.0


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

end of thread, other threads:[~2026-01-12 12:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 15:26 [PATCH] dma-pool: don't allocate DMA32 pool if no 32-bit memory Vladimir Kondratiev
2026-01-11 19:08 ` kernel test robot
2026-01-12  1:05 ` kernel test robot
2026-01-12  6:58   ` [PATCH v2] " Vladimir Kondratiev
2026-01-12 12:43     ` Robin Murphy

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