Lines Matching defs:fault

350  * amdgpu_gmc_fault_key - get hask key from vm fault address and pasid
364 * @ih: interrupt ring that the fault received from
365 * @addr: address of the VM fault
366 * @pasid: PASID of the process causing the fault
367 * @timestamp: timestamp of the fault
370 * True if the fault was filtered and should not be processed further.
371 * False if the fault is a new one and needs to be handled.
379 struct amdgpu_gmc_fault *fault;
382 /* Stale retry fault if timestamp goes backward */
392 /* Try to find the fault in the hash */
394 fault = &gmc->fault_ring[gmc->fault_hash[hash].idx];
395 while (fault->timestamp >= stamp) {
398 if (atomic64_read(&fault->key) == key) {
400 * if we get a fault which is already present in
402 * the fault is after the expired timestamp,
403 * then this is a new fault that needs to be added
404 * into the fault ring.
406 if (fault->timestamp_expiry != 0 &&
407 amdgpu_ih_ts_after(fault->timestamp_expiry,
414 tmp = fault->timestamp;
415 fault = &gmc->fault_ring[fault->next];
418 if (fault->timestamp >= tmp)
422 /* Add the fault to the ring */
423 fault = &gmc->fault_ring[gmc->last_fault];
424 atomic64_set(&fault->key, key);
425 fault->timestamp = timestamp;
428 fault->next = gmc->fault_hash[hash].idx;
437 * @addr: address of the VM fault
438 * @pasid: PASID of the process causing the fault
440 * Remove the address from fault filter, then future vm fault on this address
441 * will pass to retry fault handler to recover.
449 struct amdgpu_gmc_fault *fault;
464 fault = &gmc->fault_ring[gmc->fault_hash[hash].idx];
466 if (atomic64_read(&fault->key) == key) {
468 * Update the timestamp when this fault
471 fault->timestamp_expiry = last_ts;
475 tmp = fault->timestamp;
476 fault = &gmc->fault_ring[fault->next];
477 } while (fault->timestamp < tmp);