FreeBSD/sys/sparc64/sparc64/iommu.c
/*
 * Enter a mapping into the TSB.  No locking required, since each TSB slot is
 * uniquely assigned to a single map.
 */
Enter a mapping into the TSB.  No locking required, since each TSB slot is
uniquely assigned to a single map.
Enter a mapping into the TSB . No locking required since each TSB slot is uniquely assigned to a single map .
static void
iommu_enter(struct iommu_state *is, vm_offset_t va, vm_paddr_t pa,
    int stream, int flags)
{
	uint64_t tte;
	KASSERT(va >= is->is_dvmabase,
	    ("%s: va %#lx not in DVMA space", __func__, va));
	KASSERT(pa <= is->is_pmaxaddr,
	    ("%s: XXX: physical address too large (%#lx)", __func__, pa));
	tte = MAKEIOTTE(pa, !(flags & BUS_DMA_NOWRITE),
	    !(flags & BUS_DMA_NOCACHE), stream);
	IOMMU_SET_TTE(is, va, tte);
	iommu_tlb_flush(is, va);
#ifdef IOMMU_DIAG
	IS_LOCK(is);
	iommu_diag(is, va);
	IS_UNLOCK(is);
#endif
}
static void iommu_enter ( struct iommu_state * is , vm_offset_t va , vm_paddr_t pa , int stream , int flags ) { uint64_t tte ; KASSERT ( va >= is -> is_dvmabase , ( " " , __func__ , va ) ) ; KASSERT ( pa <= is -> is_pmaxaddr , ( " " , __func__ , pa ) ) ; tte = MAKEIOTTE ( pa , ! ( flags & BUS_DMA_NOWRITE ) , ! ( flags & BUS_DMA_NOCACHE ) , stream ) ; IOMMU_SET_TTE ( is , va , tte ) ; iommu_tlb_flush ( is , va ) ; #ifdef IOMMU_DIAG IS_LOCK ( is ) ; iommu_diag ( is , va ) ; IS_UNLOCK ( is ) ; #endif }
Enter a mapping into the TSB.
Enter a mapping into the TSB .