mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
Modify nvscic2c-pcie files to use updated licenses as per nvidia-oot. Bug 3739487 Jira C2C-826 Change-Id: I819b459fdb0743d37bc08b4c9b92097d87e62884 Signed-off-by: dbadgaiyan <dbadgaiyan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2830686 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Arihant Jejani <ajejani@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
|
|
|
|
#ifndef __IOVA_ALLOC_H__
|
|
#define __IOVA_ALLOC_H__
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/iova.h>
|
|
|
|
struct iova_alloc_domain_t;
|
|
|
|
/*
|
|
* iova_alloc_init
|
|
*
|
|
* With NvSciC2c usecase IOVA range needs to be allocated without
|
|
* physical backing. Existing DMA API framework does not allow this.
|
|
* Hence allocate new IOVA domain to allocate IOVA range.
|
|
*
|
|
* Allocate IOVA range using new IOVA domain.
|
|
* Use this IOVA range in iommu_map() with existing IOMMU domain.
|
|
*/
|
|
int
|
|
iova_alloc_init(struct device *dev, size_t size, dma_addr_t *dma_handle,
|
|
struct iova_alloc_domain_t **ivd_h);
|
|
|
|
/*
|
|
* iova_alloc_deinit
|
|
*
|
|
* Free IOVA range allocated using iova_alloc_init.
|
|
* Client needs to make sure that if physical mapping was created
|
|
* then it is released before calling iova_alloc_deinit.
|
|
|
|
* Release IOVA domain allocated in iova_alloc_init.
|
|
*/
|
|
void
|
|
iova_alloc_deinit(dma_addr_t dma_handle, size_t size,
|
|
struct iova_alloc_domain_t **ivd_h);
|
|
#endif //__IOVA_ALLOC_H__
|