iommu_gas.c (94dfb28ee0391898190813b6d6e1fbf0f7ca0ae1) | iommu_gas.c (f32f0095e9da8188a3865aaa310f547ee9e0c20b) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2013 The FreeBSD Foundation 5 * All rights reserved. 6 * 7 * This software was developed by Konstantin Belousov <kib@FreeBSD.org> 8 * under sponsorship from the FreeBSD Foundation. --- 713 unchanged lines hidden (view full) --- 722 int error; 723 724 error = iommu_gas_map(domain, common, size, offset, eflags, flags, 725 ma, res); 726 727 return (error); 728} 729 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2013 The FreeBSD Foundation 5 * All rights reserved. 6 * 7 * This software was developed by Konstantin Belousov <kib@FreeBSD.org> 8 * under sponsorship from the FreeBSD Foundation. --- 713 unchanged lines hidden (view full) --- 722 int error; 723 724 error = iommu_gas_map(domain, common, size, offset, eflags, flags, 725 ma, res); 726 727 return (error); 728} 729 |
730void 731iommu_unmap_msi(struct iommu_ctx *ctx) 732{ 733 struct iommu_map_entry *entry; 734 struct iommu_domain *domain; 735 736 domain = ctx->domain; 737 entry = domain->msi_entry; 738 if (entry == NULL) 739 return; 740 741 domain->ops->unmap(domain, entry->start, entry->end - 742 entry->start, IOMMU_PGF_WAITOK); 743 744 IOMMU_DOMAIN_LOCK(domain); 745 iommu_gas_free_space(domain, entry); 746 IOMMU_DOMAIN_UNLOCK(domain); 747 748 iommu_gas_free_entry(domain, entry); 749 750 domain->msi_entry = NULL; 751 domain->msi_base = 0; 752 domain->msi_phys = 0; 753} 754 |
|
730int 731iommu_map_msi(struct iommu_ctx *ctx, iommu_gaddr_t size, int offset, 732 u_int eflags, u_int flags, vm_page_t *ma) 733{ 734 struct iommu_domain *domain; 735 struct iommu_map_entry *entry; 736 int error; 737 --- 73 unchanged lines hidden --- | 755int 756iommu_map_msi(struct iommu_ctx *ctx, iommu_gaddr_t size, int offset, 757 u_int eflags, u_int flags, vm_page_t *ma) 758{ 759 struct iommu_domain *domain; 760 struct iommu_map_entry *entry; 761 int error; 762 --- 73 unchanged lines hidden --- |