Commit ddf69ca5 authored by Lucas Stach's avatar Lucas Stach Committed by Ezequiel Garcia
Browse files

UNCLEAN: get network RX pages from DMA32 zone



Peripherals on i.MX8M are unable to DMA to memory above the 4GB mark.
This leads to reduced performance due to bounce buffering, or complete
system failure if there is not enough bounce buffer space available.

As the network RX buffer rings constitute a fair amount of DMA mapped
memory, make sure to get them from the DMA32 zone, to avoid any bounce
buffering.
Signed-off-by: Lucas Stach's avatarLucas Stach <l.stach@pengutronix.de>
parent 913a3fb7
......@@ -2776,7 +2776,7 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int length,
static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
unsigned int length)
{
return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
return __netdev_alloc_skb(dev, length, GFP_ATOMIC | GFP_DMA32);
}
/* legacy helper around __netdev_alloc_skb() */
......@@ -2854,7 +2854,7 @@ static inline struct page *__dev_alloc_pages(gfp_t gfp_mask,
static inline struct page *dev_alloc_pages(unsigned int order)
{
return __dev_alloc_pages(GFP_ATOMIC | __GFP_NOWARN, order);
return __dev_alloc_pages(GFP_ATOMIC | GFP_DMA32 | __GFP_NOWARN, order);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment