/* The generic unmapping function for on page in the DMA address space.  */
static void dma_ops_domain_unmap(struct dma_ops_domain *dom, unsigned long address)
/* The generic unmapping function for on page in the DMA address space.  */
static void dma_ops_domain_unmap(struct dma_ops_domain *dom, unsigned long address)
{
	struct aperture_range *aperture;
	u64 *pte;
	if (address >= dom->aperture_size)
		return;
	aperture = dom->aperture[APERTURE_RANGE_INDEX(address)];
	if (!aperture)
		return;
	pte  = aperture->pte_pages[APERTURE_PAGE_INDEX(address)];
	if (!pte)
		return;
	pte += PM_LEVEL_INDEX(0, address);
	WARN_ON(!*pte);
	*pte = 0ULL;
}