target: alloc scatterlist with GFP_DMA32 flag on spacemit k1x platform

Change-Id: Ie5d9270a36044ef2064dc2bb880d6a992286ae36
This commit is contained in:
Pan Junzhong
2024-02-22 11:59:21 +08:00
committed by zhangmeng
parent 68c71618b6
commit 3d8d1356b7

View File

@@ -2764,6 +2764,9 @@ target_alloc_sgl(struct scatterlist **sgl, unsigned int *nents, u32 length,
{
gfp_t gfp = GFP_KERNEL | (zero_page ? __GFP_ZERO : 0);
#if defined(CONFIG_SOC_SPACEMIT_K1X)
gfp |= GFP_DMA32;
#endif
*sgl = sgl_alloc_order(length, 0, chainable, gfp, nents);
return *sgl ? 0 : -ENOMEM;
}