Lines Matching full:fault
65 u8 fault; member
67 } **fault; member
162 * page fault) and maybe some other commands. in nouveau_svmm_bind()
381 /* Issue fault replay for GPU to retry accesses that faulted previously. */
392 /* Cancel a replayable fault that could not be handled.
394 * Cancelling the fault will trigger recovery to reset the engine
414 struct nouveau_svm_fault *fault) in nouveau_svm_fault_cancel_fault() argument
416 nouveau_svm_fault_cancel(svm, fault->inst, in nouveau_svm_fault_cancel_fault()
417 fault->hub, in nouveau_svm_fault_cancel_fault()
418 fault->gpc, in nouveau_svm_fault_cancel_fault()
419 fault->client); in nouveau_svm_fault_cancel_fault()
423 nouveau_svm_fault_priority(u8 fault) in nouveau_svm_fault_priority() argument
425 switch (fault) { in nouveau_svm_fault_priority()
471 struct nouveau_svm_fault *fault; in nouveau_svm_fault_cache() local
479 if (!buffer->fault[buffer->fault_nr]) { in nouveau_svm_fault_cache()
480 fault = kmalloc(sizeof(*fault), GFP_KERNEL); in nouveau_svm_fault_cache()
481 if (WARN_ON(!fault)) { in nouveau_svm_fault_cache()
485 buffer->fault[buffer->fault_nr] = fault; in nouveau_svm_fault_cache()
488 fault = buffer->fault[buffer->fault_nr++]; in nouveau_svm_fault_cache()
489 fault->inst = inst; in nouveau_svm_fault_cache()
490 fault->addr = (u64)addrhi << 32 | addrlo; in nouveau_svm_fault_cache()
491 fault->time = (u64)timehi << 32 | timelo; in nouveau_svm_fault_cache()
492 fault->engine = engine; in nouveau_svm_fault_cache()
493 fault->gpc = gpc; in nouveau_svm_fault_cache()
494 fault->hub = hub; in nouveau_svm_fault_cache()
495 fault->access = (info & 0x000f0000) >> 16; in nouveau_svm_fault_cache()
496 fault->client = client; in nouveau_svm_fault_cache()
497 fault->fault = (info & 0x0000001f); in nouveau_svm_fault_cache()
499 SVM_DBG(svm, "fault %016llx %016llx %02x", in nouveau_svm_fault_cache()
500 fault->inst, fault->addr, fault->access); in nouveau_svm_fault_cache()
658 /* Have HMM fault pages within the fault window to the GPU. */ in nouveau_range_fault()
732 /* Parse available fault buffer entries into a cache, and update in nouveau_svm_fault()
735 SVM_DBG(svm, "fault handler"); in nouveau_svm_fault()
751 SVM_DBG(svm, "%d fault(s) pending", buffer->fault_nr); in nouveau_svm_fault()
757 sort(buffer->fault, buffer->fault_nr, sizeof(*buffer->fault), in nouveau_svm_fault()
763 if (!svmm || buffer->fault[fi]->inst != inst) { in nouveau_svm_fault()
765 nouveau_ivmm_find(svm, buffer->fault[fi]->inst); in nouveau_svm_fault()
767 inst = buffer->fault[fi]->inst; in nouveau_svm_fault()
770 buffer->fault[fi]->svmm = svmm; in nouveau_svm_fault()
786 if (!(svmm = buffer->fault[fi]->svmm)) { in nouveau_svm_fault()
787 nouveau_svm_fault_cancel_fault(svm, buffer->fault[fi]); in nouveau_svm_fault()
790 SVMM_DBG(svmm, "addr %016llx", buffer->fault[fi]->addr); in nouveau_svm_fault()
795 start = buffer->fault[fi]->addr; in nouveau_svm_fault()
802 * fault window, determining required pages and access in nouveau_svm_fault()
809 * Determine required permissions based on GPU fault in nouveau_svm_fault()
812 switch (buffer->fault[fi]->access) { in nouveau_svm_fault()
829 nouveau_svm_fault_cancel_fault(svm, buffer->fault[fi]); in nouveau_svm_fault()
853 * fault addresses have sufficient access permission. in nouveau_svm_fault()
855 if (buffer->fault[fn]->svmm != svmm || in nouveau_svm_fault()
856 buffer->fault[fn]->addr >= limit || in nouveau_svm_fault()
857 (buffer->fault[fi]->access == FAULT_ACCESS_READ && in nouveau_svm_fault()
859 (buffer->fault[fi]->access != FAULT_ACCESS_READ && in nouveau_svm_fault()
860 buffer->fault[fi]->access != FAULT_ACCESS_PREFETCH && in nouveau_svm_fault()
862 (buffer->fault[fi]->access != FAULT_ACCESS_READ && in nouveau_svm_fault()
863 buffer->fault[fi]->access != FAULT_ACCESS_WRITE && in nouveau_svm_fault()
864 buffer->fault[fi]->access != FAULT_ACCESS_PREFETCH && in nouveau_svm_fault()
872 struct nouveau_svm_fault *fault = in nouveau_svm_fault() local
873 buffer->fault[fi++]; in nouveau_svm_fault()
875 nouveau_svm_fault_cancel_fault(svm, fault); in nouveau_svm_fault()
881 /* Issue fault replay to the GPU. */ in nouveau_svm_fault()
959 if (buffer->fault) { in nouveau_svm_fault_buffer_dtor()
960 for (i = 0; buffer->fault[i] && i < buffer->entries; i++) in nouveau_svm_fault_buffer_dtor()
961 kfree(buffer->fault[i]); in nouveau_svm_fault_buffer_dtor()
962 kvfree(buffer->fault); in nouveau_svm_fault_buffer_dtor()
985 SVM_ERR(svm, "Fault buffer allocation failed: %d", ret); in nouveau_svm_fault_buffer_ctor()
1000 buffer->fault = kvcalloc(sizeof(*buffer->fault), buffer->entries, GFP_KERNEL); in nouveau_svm_fault_buffer_ctor()
1001 if (!buffer->fault) in nouveau_svm_fault_buffer_ctor()
1061 SVM_DBG(svm, "No supported fault buffer class"); in nouveau_svm_init()