Function report |
Source Code:arch\x86\kernel\amd_gart_64.c |
Create Date:2022-07-28 08:52:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_iommu
Proto:static unsigned long alloc_iommu(struct device *dev, int size, unsigned long align_mask)
Type:unsigned long
Parameter:
Type | Parameter | Name |
---|---|---|
struct device * | dev | |
int | size | |
unsigned long | align_mask |
98 | base_index = @a is a power of 2 value (GART remapping area (physical) & dma_get_seg_boundary(dev), PAGE_SIZE) >> PAGE_SHIFT determines the page size |
100 | boundary_size = @a is a power of 2 value ((u64)dma_get_seg_boundary(dev) + 1, PAGE_SIZE) >> PAGE_SHIFT determines the page size |
104 | offset = iommu_area_alloc(Guarded by iommu_bitmap_lock: , .. and in pages , protected by iommu_bitmap_lock , size, base_index, boundary_size, align_mask) |
106 | If offset == -1 Then |
107 | global flush state. set for each gart wrap = true |
112 | If offset != -1 Then |
113 | protected by iommu_bitmap_lock = offset + size |
114 | If protected by iommu_bitmap_lock >= .. and in pages Then |
115 | protected by iommu_bitmap_lock = 0 |
116 | global flush state. set for each gart wrap = true |
119 | If If this is disabled the IOMMU will use an optimized flushing strategy* of only flushing when an mapping is reused Then global flush state. set for each gart wrap = true |
123 | Return offset |
Name | Describe |
---|---|
dma_map_area | Map a single continuous physical area into the IOMMU.* Caller needs to check if the iommu is needed and flush. |
__dma_map_cont | Map multiple scatterlist entries continuous into the first. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |