]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/zbud.h
mm/hotplug: invalid PFNs from pfn_to_online_page()
[mirror_ubuntu-bionic-kernel.git] / include / linux / zbud.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
4e2e2770
SJ
2#ifndef _ZBUD_H_
3#define _ZBUD_H_
4
5#include <linux/types.h>
6
7struct zbud_pool;
8
9struct zbud_ops {
10 int (*evict)(struct zbud_pool *pool, unsigned long handle);
11};
12
c83db4f4 13struct zbud_pool *zbud_create_pool(gfp_t gfp, const struct zbud_ops *ops);
4e2e2770 14void zbud_destroy_pool(struct zbud_pool *pool);
99eef8e9 15int zbud_alloc(struct zbud_pool *pool, size_t size, gfp_t gfp,
4e2e2770
SJ
16 unsigned long *handle);
17void zbud_free(struct zbud_pool *pool, unsigned long handle);
18int zbud_reclaim_page(struct zbud_pool *pool, unsigned int retries);
19void *zbud_map(struct zbud_pool *pool, unsigned long handle);
20void zbud_unmap(struct zbud_pool *pool, unsigned long handle);
21u64 zbud_get_pool_size(struct zbud_pool *pool);
22
23#endif /* _ZBUD_H_ */