armbian-build/patch/kernel/archive/spacemit-6.1/050-lib-scatterlist.patch
Patrick Yavitz 93d547d52d SpacemiT: Add current kernel patches
Mainline Linux 6.1.y
https://gitee.com/bianbu-linux

Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
2024-07-01 19:15:00 +02:00

26 lines
744 B
Diff

From 8a2e5ced1c97d81c3d7cf230a63aac66076e1ca0 Mon Sep 17 00:00:00 2001
From: Patrick Yavitz <pyavitz@armbian.com>
Date: Fri, 21 Jun 2024 11:54:06 -0400
Subject: [PATCH] add spacemit patch set
source: https://gitee.com/bianbu-linux/linux-6.1
Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
---
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index c8c3d675845c..5355d0aef039 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -616,7 +616,11 @@ struct scatterlist *sgl_alloc_order(unsigned long long length,
nalloc++;
}
sgl = kmalloc_array(nalloc, sizeof(struct scatterlist),
+#if defined(CONFIG_SOC_SPACEMIT_K1X)
+ gfp & ~(GFP_DMA | GFP_DMA32));
+#else
gfp & ~GFP_DMA);
+#endif
if (!sgl)
return NULL;