pasid_state 58 drivers/iommu/amd_iommu_v2.c struct pasid_state **states; pasid_state 71 drivers/iommu/amd_iommu_v2.c struct pasid_state *state; pasid_state 154 drivers/iommu/amd_iommu_v2.c static struct pasid_state **__get_pasid_state_ptr(struct device_state *dev_state, pasid_state 157 drivers/iommu/amd_iommu_v2.c struct pasid_state **root, **ptr; pasid_state 180 drivers/iommu/amd_iommu_v2.c root = (struct pasid_state **)*ptr; pasid_state 188 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state, pasid_state 191 drivers/iommu/amd_iommu_v2.c struct pasid_state **ptr; pasid_state 206 drivers/iommu/amd_iommu_v2.c *ptr = pasid_state; pasid_state 218 drivers/iommu/amd_iommu_v2.c struct pasid_state **ptr; pasid_state 233 drivers/iommu/amd_iommu_v2.c static struct pasid_state *get_pasid_state(struct device_state *dev_state, pasid_state 236 drivers/iommu/amd_iommu_v2.c struct pasid_state **ptr, *ret = NULL; pasid_state 255 drivers/iommu/amd_iommu_v2.c static void free_pasid_state(struct pasid_state *pasid_state) pasid_state 257 drivers/iommu/amd_iommu_v2.c kfree(pasid_state); pasid_state 260 drivers/iommu/amd_iommu_v2.c static void put_pasid_state(struct pasid_state *pasid_state) pasid_state 262 drivers/iommu/amd_iommu_v2.c if (atomic_dec_and_test(&pasid_state->count)) pasid_state 263 drivers/iommu/amd_iommu_v2.c wake_up(&pasid_state->wq); pasid_state 266 drivers/iommu/amd_iommu_v2.c static void put_pasid_state_wait(struct pasid_state *pasid_state) pasid_state 268 drivers/iommu/amd_iommu_v2.c atomic_dec(&pasid_state->count); pasid_state 269 drivers/iommu/amd_iommu_v2.c wait_event(pasid_state->wq, !atomic_read(&pasid_state->count)); pasid_state 270 drivers/iommu/amd_iommu_v2.c free_pasid_state(pasid_state); pasid_state 273 drivers/iommu/amd_iommu_v2.c static void unbind_pasid(struct pasid_state *pasid_state) pasid_state 277 drivers/iommu/amd_iommu_v2.c domain = pasid_state->device_state->domain; pasid_state 283 drivers/iommu/amd_iommu_v2.c pasid_state->invalid = true; pasid_state 289 drivers/iommu/amd_iommu_v2.c amd_iommu_domain_clear_gcr3(domain, pasid_state->pasid); pasid_state 295 drivers/iommu/amd_iommu_v2.c static void free_pasid_states_level1(struct pasid_state **tbl) pasid_state 307 drivers/iommu/amd_iommu_v2.c static void free_pasid_states_level2(struct pasid_state **tbl) pasid_state 309 drivers/iommu/amd_iommu_v2.c struct pasid_state **ptr; pasid_state 316 drivers/iommu/amd_iommu_v2.c ptr = (struct pasid_state **)tbl[i]; pasid_state 323 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state; pasid_state 327 drivers/iommu/amd_iommu_v2.c pasid_state = get_pasid_state(dev_state, i); pasid_state 328 drivers/iommu/amd_iommu_v2.c if (pasid_state == NULL) pasid_state 331 drivers/iommu/amd_iommu_v2.c put_pasid_state(pasid_state); pasid_state 337 drivers/iommu/amd_iommu_v2.c mmu_notifier_unregister(&pasid_state->mn, pasid_state->mm); pasid_state 339 drivers/iommu/amd_iommu_v2.c put_pasid_state_wait(pasid_state); /* Reference taken in pasid_state 356 drivers/iommu/amd_iommu_v2.c static struct pasid_state *mn_to_state(struct mmu_notifier *mn) pasid_state 358 drivers/iommu/amd_iommu_v2.c return container_of(mn, struct pasid_state, mn); pasid_state 365 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state; pasid_state 368 drivers/iommu/amd_iommu_v2.c pasid_state = mn_to_state(mn); pasid_state 369 drivers/iommu/amd_iommu_v2.c dev_state = pasid_state->device_state; pasid_state 372 drivers/iommu/amd_iommu_v2.c amd_iommu_flush_page(dev_state->domain, pasid_state->pasid, pasid_state 375 drivers/iommu/amd_iommu_v2.c amd_iommu_flush_tlb(dev_state->domain, pasid_state->pasid); pasid_state 380 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state; pasid_state 386 drivers/iommu/amd_iommu_v2.c pasid_state = mn_to_state(mn); pasid_state 387 drivers/iommu/amd_iommu_v2.c dev_state = pasid_state->device_state; pasid_state 388 drivers/iommu/amd_iommu_v2.c run_inv_ctx_cb = !pasid_state->invalid; pasid_state 391 drivers/iommu/amd_iommu_v2.c dev_state->inv_ctx_cb(dev_state->pdev, pasid_state->pasid); pasid_state 393 drivers/iommu/amd_iommu_v2.c unbind_pasid(pasid_state); pasid_state 401 drivers/iommu/amd_iommu_v2.c static void set_pri_tag_status(struct pasid_state *pasid_state, pasid_state 406 drivers/iommu/amd_iommu_v2.c spin_lock_irqsave(&pasid_state->lock, flags); pasid_state 407 drivers/iommu/amd_iommu_v2.c pasid_state->pri[tag].status = status; pasid_state 408 drivers/iommu/amd_iommu_v2.c spin_unlock_irqrestore(&pasid_state->lock, flags); pasid_state 412 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state, pasid_state 417 drivers/iommu/amd_iommu_v2.c spin_lock_irqsave(&pasid_state->lock, flags); pasid_state 418 drivers/iommu/amd_iommu_v2.c if (atomic_dec_and_test(&pasid_state->pri[tag].inflight) && pasid_state 419 drivers/iommu/amd_iommu_v2.c pasid_state->pri[tag].finish) { pasid_state 420 drivers/iommu/amd_iommu_v2.c amd_iommu_complete_ppr(dev_state->pdev, pasid_state->pasid, pasid_state 421 drivers/iommu/amd_iommu_v2.c pasid_state->pri[tag].status, tag); pasid_state 422 drivers/iommu/amd_iommu_v2.c pasid_state->pri[tag].finish = false; pasid_state 423 drivers/iommu/amd_iommu_v2.c pasid_state->pri[tag].status = PPR_SUCCESS; pasid_state 425 drivers/iommu/amd_iommu_v2.c spin_unlock_irqrestore(&pasid_state->lock, flags); pasid_state 518 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state; pasid_state 552 drivers/iommu/amd_iommu_v2.c pasid_state = get_pasid_state(dev_state, iommu_fault->pasid); pasid_state 553 drivers/iommu/amd_iommu_v2.c if (pasid_state == NULL || pasid_state->invalid) { pasid_state 560 drivers/iommu/amd_iommu_v2.c spin_lock_irqsave(&pasid_state->lock, flags); pasid_state 561 drivers/iommu/amd_iommu_v2.c atomic_inc(&pasid_state->pri[tag].inflight); pasid_state 563 drivers/iommu/amd_iommu_v2.c pasid_state->pri[tag].finish = true; pasid_state 564 drivers/iommu/amd_iommu_v2.c spin_unlock_irqrestore(&pasid_state->lock, flags); pasid_state 569 drivers/iommu/amd_iommu_v2.c finish_pri_tag(dev_state, pasid_state, tag); pasid_state 575 drivers/iommu/amd_iommu_v2.c fault->state = pasid_state; pasid_state 588 drivers/iommu/amd_iommu_v2.c if (ret != NOTIFY_OK && pasid_state) pasid_state 589 drivers/iommu/amd_iommu_v2.c put_pasid_state(pasid_state); pasid_state 604 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state; pasid_state 626 drivers/iommu/amd_iommu_v2.c pasid_state = kzalloc(sizeof(*pasid_state), GFP_KERNEL); pasid_state 627 drivers/iommu/amd_iommu_v2.c if (pasid_state == NULL) pasid_state 631 drivers/iommu/amd_iommu_v2.c atomic_set(&pasid_state->count, 1); pasid_state 632 drivers/iommu/amd_iommu_v2.c init_waitqueue_head(&pasid_state->wq); pasid_state 633 drivers/iommu/amd_iommu_v2.c spin_lock_init(&pasid_state->lock); pasid_state 636 drivers/iommu/amd_iommu_v2.c pasid_state->mm = mm; pasid_state 637 drivers/iommu/amd_iommu_v2.c pasid_state->device_state = dev_state; pasid_state 638 drivers/iommu/amd_iommu_v2.c pasid_state->pasid = pasid; pasid_state 639 drivers/iommu/amd_iommu_v2.c pasid_state->invalid = true; /* Mark as valid only if we are pasid_state 641 drivers/iommu/amd_iommu_v2.c pasid_state->mn.ops = &iommu_mn; pasid_state 643 drivers/iommu/amd_iommu_v2.c if (pasid_state->mm == NULL) pasid_state 646 drivers/iommu/amd_iommu_v2.c mmu_notifier_register(&pasid_state->mn, mm); pasid_state 648 drivers/iommu/amd_iommu_v2.c ret = set_pasid_state(dev_state, pasid_state, pasid); pasid_state 653 drivers/iommu/amd_iommu_v2.c __pa(pasid_state->mm->pgd)); pasid_state 658 drivers/iommu/amd_iommu_v2.c pasid_state->invalid = false; pasid_state 673 drivers/iommu/amd_iommu_v2.c mmu_notifier_unregister(&pasid_state->mn, mm); pasid_state 677 drivers/iommu/amd_iommu_v2.c free_pasid_state(pasid_state); pasid_state 688 drivers/iommu/amd_iommu_v2.c struct pasid_state *pasid_state; pasid_state 705 drivers/iommu/amd_iommu_v2.c pasid_state = get_pasid_state(dev_state, pasid); pasid_state 706 drivers/iommu/amd_iommu_v2.c if (pasid_state == NULL) pasid_state 712 drivers/iommu/amd_iommu_v2.c put_pasid_state(pasid_state); pasid_state 715 drivers/iommu/amd_iommu_v2.c clear_pasid_state(dev_state, pasid_state->pasid); pasid_state 721 drivers/iommu/amd_iommu_v2.c mmu_notifier_unregister(&pasid_state->mn, pasid_state->mm); pasid_state 723 drivers/iommu/amd_iommu_v2.c put_pasid_state_wait(pasid_state); /* Reference taken in