Lines Matching refs:pasid_table
97 struct pasid_table *pasid_table; in intel_pasid_alloc_table() local
106 if (WARN_ON(info->pasid_table)) in intel_pasid_alloc_table()
109 pasid_table = kzalloc(sizeof(*pasid_table), GFP_KERNEL); in intel_pasid_alloc_table()
110 if (!pasid_table) in intel_pasid_alloc_table()
122 kfree(pasid_table); in intel_pasid_alloc_table()
126 pasid_table->table = page_address(pages); in intel_pasid_alloc_table()
127 pasid_table->order = order; in intel_pasid_alloc_table()
128 pasid_table->max_pasid = 1 << (order + PAGE_SHIFT + 3); in intel_pasid_alloc_table()
129 info->pasid_table = pasid_table; in intel_pasid_alloc_table()
132 clflush_cache_range(pasid_table->table, size); in intel_pasid_alloc_table()
140 struct pasid_table *pasid_table; in intel_pasid_free_table() local
146 if (!info || !dev_is_pci(dev) || !info->pasid_table) in intel_pasid_free_table()
149 pasid_table = info->pasid_table; in intel_pasid_free_table()
150 info->pasid_table = NULL; in intel_pasid_free_table()
153 dir = pasid_table->table; in intel_pasid_free_table()
154 max_pde = pasid_table->max_pasid >> PASID_PDE_SHIFT; in intel_pasid_free_table()
160 free_pages((unsigned long)pasid_table->table, pasid_table->order); in intel_pasid_free_table()
161 kfree(pasid_table); in intel_pasid_free_table()
164 struct pasid_table *intel_pasid_get_table(struct device *dev) in intel_pasid_get_table()
172 return info->pasid_table; in intel_pasid_get_table()
180 if (!info || !info->pasid_table) in intel_pasid_get_dev_max_id()
183 return info->pasid_table->max_pasid; in intel_pasid_get_dev_max_id()
189 struct pasid_table *pasid_table; in intel_pasid_get_entry() local
194 pasid_table = intel_pasid_get_table(dev); in intel_pasid_get_entry()
195 if (WARN_ON(!pasid_table || pasid >= intel_pasid_get_dev_max_id(dev))) in intel_pasid_get_entry()
198 dir = pasid_table->table; in intel_pasid_get_entry()