at v6.1 771 B view raw
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