mirror of
https://github.com/UniXNU/NativeAdreno.git
synced 2026-11-19 14:04:21 +03:00
fix(recovery): a GPU access fault no longer fails other address spaces
An address space's check of the SMMU returned the fault status while the GPU's own faulting access was still latched, and the address space that happened to map, unmap or attach next was taken out of use: seven processes in one run, the render server among them. The status says nothing about that address space's tables, so the operation now goes on and the fault is counted. The hang check ends the fault, and also clears the SMMU's global fault status where it is set. A stalled job's command buffers are searched for the IB2 address the thread stopped in, to tell an address the job's commands named from one they did not.
This commit is contained in:
+14
-3
@@ -87,14 +87,25 @@ struct PhaseClock {
|
||||
}
|
||||
};
|
||||
}
|
||||
/* The SMMU's global fault status set while the routes and the global configuration read as they should: the GPU's own access
|
||||
* faulted (a job's bad address), which the hang check ends and clears (NativeAdrenoGpuContext::endFault). It says nothing about
|
||||
* this address space's tables, so the operation goes on; taking the address space out of use here failed whichever process
|
||||
* mapped or attached next (seven of them in one run, the render server among them). Counted with the status word. */
|
||||
extern "C" {volatile uint32_t native_adreno_global_fault[4];}
|
||||
ArmSmmu4KStatus NativeAdrenoVm::notOurFault(ArmSmmu4KStatus status,uint32_t word)
|
||||
{
|
||||
if(status!=ArmSmmu4KFault)return status;
|
||||
native_adreno_global_fault[0]=native_adreno_global_fault[0]+1;native_adreno_global_fault[1]=word;
|
||||
return ArmSmmu4KSuccess;
|
||||
}
|
||||
ArmSmmu4KStatus NativeAdrenoVm::observe() const
|
||||
{
|
||||
ArmSmmu4KStreamResult routes;
|
||||
ArmSmmu4KStatus status=ArmSmmu4KObserveStreams(&io_,streams_,context_,&routes);if(status)return status;
|
||||
ArmSmmu4KStatus status=notOurFault(ArmSmmu4KObserveStreams(&io_,streams_,context_,&routes),routes.global_fault);if(status)return status;
|
||||
ArmSmmu4KLiveRegion lower=region(0),upper=region(1);ArmSmmu4KLiveResult audit;
|
||||
status=ArmSmmu4KLiveAuditContext(context_,lower.arena?&lower:nullptr,upper.arena?&upper:nullptr,&audit);
|
||||
if(status)return status;
|
||||
return ArmSmmu4KObserveStreams(&io_,streams_,context_,&routes);
|
||||
return notOurFault(ArmSmmu4KObserveStreams(&io_,streams_,context_,&routes),routes.global_fault);
|
||||
}
|
||||
/* Global policy, the context image and the owned routes only. The scan of every other slot for a conflicting route read each
|
||||
* SMR/S2CR of the SMMU twice per map and unmap (int-152: 0.75 ms a pass, 1.3 s of the 3.2 s of 807 maps); observe(), which
|
||||
@@ -113,7 +124,7 @@ ArmSmmu4KStatus NativeAdrenoVm::observeCheap()
|
||||
if(++since_audit_>=64) {
|
||||
since_audit_=0;
|
||||
ArmSmmu4KStreamResult routes;
|
||||
return ArmSmmu4KObserveStreams(&io_,streams_,context_,&routes);
|
||||
return notOurFault(ArmSmmu4KObserveStreams(&io_,streams_,context_,&routes),routes.global_fault);
|
||||
}
|
||||
return ArmSmmu4KSuccess;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user