Merge tag 'xfs-6.4-rc1-fixes' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-block.git] / include / linux / iova_bitmap.h
CommitLineData
58ccf019
JM
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2022, Oracle and/or its affiliates.
4 * Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved
5 */
6#ifndef _IOVA_BITMAP_H_
7#define _IOVA_BITMAP_H_
8
9#include <linux/types.h>
10
11struct iova_bitmap;
12
13typedef int (*iova_bitmap_fn_t)(struct iova_bitmap *bitmap,
14 unsigned long iova, size_t length,
15 void *opaque);
16
17struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length,
18 unsigned long page_size,
19 u64 __user *data);
20void iova_bitmap_free(struct iova_bitmap *bitmap);
21int iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque,
22 iova_bitmap_fn_t fn);
23void iova_bitmap_set(struct iova_bitmap *bitmap,
24 unsigned long iova, size_t length);
25
26#endif