Loading...
Note: File does not exist in v4.6.
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#ifndef __NETMEM_PRIV_H
4#define __NETMEM_PRIV_H
5
6static inline unsigned long netmem_get_pp_magic(netmem_ref netmem)
7{
8 return __netmem_clear_lsb(netmem)->pp_magic;
9}
10
11static inline void netmem_or_pp_magic(netmem_ref netmem, unsigned long pp_magic)
12{
13 __netmem_clear_lsb(netmem)->pp_magic |= pp_magic;
14}
15
16static inline void netmem_clear_pp_magic(netmem_ref netmem)
17{
18 __netmem_clear_lsb(netmem)->pp_magic = 0;
19}
20
21static inline void netmem_set_pp(netmem_ref netmem, struct page_pool *pool)
22{
23 __netmem_clear_lsb(netmem)->pp = pool;
24}
25
26static inline void netmem_set_dma_addr(netmem_ref netmem,
27 unsigned long dma_addr)
28{
29 __netmem_clear_lsb(netmem)->dma_addr = dma_addr;
30}
31#endif