RE: Linux Kernel handling AXI DECERR/SLVERR

2017-12-20 Thread Bharat Kumar Gogada
On Tue, Dec 19, 2017 at 11:28:49AM +, Bharat Kumar Gogada wrote:
> In our case the peripheral returns SLVERR first time and we see the following 
> print but kernel do not hang.
> [  231.484186] Unhandled fault: synchronous external abort 
> (0x92000210) at 0x007f9241f880 Bus error
> 
> And from simulation we know that subsequent access to peripheral 
> returns OKAY response, however we see subsequent access fail with same 
> above bus error when we boot Linux.
> 
> Is there a way to handle these synchronous abort gracefully in Linux 
> or are these fatal ?

We don't currently have any mechanism to handle these, though it might be 
possible for synchronous abort.
Since currently there is no mechanism to handle, if once synchronous abort is 
received from a peripheral,
consecutive access will show up same error even peripheral responds with OKAY ?
What are the possible ways for handling these ?

Do you know why the device is returning SLVERR in this case?
There is an error being detected by the device.

Bharat



Re: Linux Kernel handling AXI DECERR/SLVERR

2017-12-19 Thread Mark Rutland
On Tue, Dec 19, 2017 at 11:28:49AM +, Bharat Kumar Gogada wrote:
> In our case the peripheral returns SLVERR first time and we see the following 
> print but kernel do not hang.
> [  231.484186] Unhandled fault: synchronous external abort (0x92000210) at 
> 0x007f9241f880
> Bus error
> 
> And from simulation we know that subsequent access to peripheral
> returns OKAY response, however we see subsequent access fail with same
> above bus error when we boot Linux.
> 
> Is there a way to handle these synchronous abort gracefully in Linux
> or are these fatal ?

We don't currently have any mechanism to handle these, though it might
be possible for synchronous aborts.

Do you know why the device is returning SLVERR in this case?

Thanks,
Mark.


RE: Linux Kernel handling AXI DECERR/SLVERR

2017-12-19 Thread Bharat Kumar Gogada
Hi,

> When Linux is booted on ARM64 platform and an access to peripheral 
> returns DECERR or SLVERR on AXI.
> 
> In the above error cases how would Linux kernel handle these faults ? 
> Will it hang/recover ?

I believe that on contemporary CPUs these will result in an SError. As SErrors 
are asynchronous, and (in the absence of RAS extensions) their cause cannot be 
determined, these are treated as fatal, and the kernel will panic().

Thanks, Mark. 
In our case the peripheral returns SLVERR first time and we see the following 
print but kernel do not hang.
[  231.484186] Unhandled fault: synchronous external abort (0x92000210) at 
0x007f9241f880
Bus error

And from simulation we know that subsequent access to peripheral returns OKAY 
response, however we
see subsequent access fail with same above bus error when we boot Linux.

Is there a way to handle these synchronous abort  gracefully in Linux or are 
these fatal ?

Regards,
Bharat


Re: Linux Kernel handling AXI DECERR/SLVERR

2017-12-19 Thread Mark Rutland
On Tue, Dec 19, 2017 at 10:23:25AM +, Bharat Kumar Gogada wrote:
> Hi All,

Hi,

> When Linux is booted on ARM64 platform and an access to peripheral returns
> DECERR or SLVERR on AXI.
> 
> In the above error cases how would Linux kernel handle these faults ? Will it
> hang/recover ?

I believe that on contemporary CPUs these will result in an SError. As
SErrors are asynchronous, and (in the absence of RAS extensions) their
cause cannot be determined, these are treated as fatal, and the kernel
will panic().

Thanks,
Mark.