Lines Matching refs:as

119 	ret = mmu_hw_do_operation_locked(pfdev, mmu->as, iova, size, op);  in mmu_hw_do_operation()
126 int as_nr = mmu->as; in panfrost_mmu_enable()
160 int as; in panfrost_mmu_as_get() local
164 as = mmu->as; in panfrost_mmu_as_get()
165 if (as >= 0) { in panfrost_mmu_as_get()
167 u32 mask = BIT(as) | BIT(16 + as); in panfrost_mmu_as_get()
192 as = ffz(pfdev->as_alloc_mask); in panfrost_mmu_as_get()
193 if (!(BIT(as) & pfdev->features.as_present)) { in panfrost_mmu_as_get()
203 as = lru_mmu->as; in panfrost_mmu_as_get()
205 WARN_ON(as < 0); in panfrost_mmu_as_get()
206 lru_mmu->as = -1; in panfrost_mmu_as_get()
210 mmu->as = as; in panfrost_mmu_as_get()
211 set_bit(as, &pfdev->as_alloc_mask); in panfrost_mmu_as_get()
215 dev_dbg(pfdev->dev, "Assigned AS%d to mmu %p, alloc_mask=%lx", as, mmu, pfdev->as_alloc_mask); in panfrost_mmu_as_get()
221 return as; in panfrost_mmu_as_get()
240 mmu->as = -1; in panfrost_mmu_reset()
263 if (mmu->as < 0) in panfrost_mmu_flush_range()
287 dev_dbg(pfdev->dev, "map: as=%d, iova=%llx, paddr=%lx, len=%zx", mmu->as, iova, paddr, len); in mmu_map_sg()
343 mapping->mmu->as, iova, len); in panfrost_mmu_unmap()
383 addr_to_mapping(struct panfrost_device *pfdev, int as, u64 addr) in addr_to_mapping() argument
392 if (as == mmu->as) in addr_to_mapping()
419 static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, in panfrost_mmu_map_fault_addr() argument
430 bomapping = addr_to_mapping(pfdev, as, addr); in panfrost_mmu_map_fault_addr()
441 WARN_ON(bomapping->mmu->as != as); in panfrost_mmu_map_fault_addr()
508 dev_dbg(pfdev->dev, "mapped page fault @ AS%d %llx", as, addr); in panfrost_mmu_map_fault_addr()
531 if (mmu->as >= 0) { in panfrost_mmu_release_ctx()
534 panfrost_mmu_disable(pfdev, mmu->as); in panfrost_mmu_release_ctx()
537 clear_bit(mmu->as, &pfdev->as_alloc_mask); in panfrost_mmu_release_ctx()
538 clear_bit(mmu->as, &pfdev->as_in_use_mask); in panfrost_mmu_release_ctx()
602 mmu->as = -1; in panfrost_mmu_ctx_create()
664 u32 as = ffs(status | (status >> 16)) - 1; in panfrost_mmu_irq_handler_thread() local
665 u32 mask = BIT(as) | BIT(as + 16); in panfrost_mmu_irq_handler_thread()
672 fault_status = mmu_read(pfdev, AS_FAULTSTATUS(as)); in panfrost_mmu_irq_handler_thread()
673 addr = mmu_read(pfdev, AS_FAULTADDRESS_LO(as)); in panfrost_mmu_irq_handler_thread()
674 addr |= (u64)mmu_read(pfdev, AS_FAULTADDRESS_HI(as)) << 32; in panfrost_mmu_irq_handler_thread()
685 if ((status & mask) == BIT(as) && (exception_type & 0xF8) == 0xC0) in panfrost_mmu_irq_handler_thread()
686 ret = panfrost_mmu_map_fault_addr(pfdev, as, addr); in panfrost_mmu_irq_handler_thread()
698 as, addr, in panfrost_mmu_irq_handler_thread()
713 panfrost_mmu_disable(pfdev, as); in panfrost_mmu_irq_handler_thread()