Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76a08528 authored by Liam Mark's avatar Liam Mark
Browse files

net: support __netdev_alloc_frag to always use GFP_DMA



This make it possible to ensure that any clients which use
__netdev_alloc_frag always allocate memory from the DMA zone.

Change-Id: I608939e8d460cf3e6f39748fd5c73561a051f753
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent 4d74539a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -361,6 +361,9 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
	int order;
	unsigned long flags;

	if (IS_ENABLED(CONFIG_FORCE_ALLOC_FROM_DMA_ZONE))
		gfp_mask |= GFP_DMA;

	local_irq_save(flags);
	nc = this_cpu_ptr(&netdev_alloc_cache);
	if (unlikely(!nc->frag.page)) {