From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: imprecise external abort using the flexcan driver on i.MX6Q
Date: Fri, 27 Sep 2013 11:43:59 +0200 [thread overview]
Message-ID: <5245535F.6020804@pengutronix.de> (raw)
In-Reply-To: <21061.20097.221946.197751@ipc1.ka-ro>
On 09/27/2013 11:23 AM, Lothar Wa?mann wrote:
> Hi,
>
> Santosh Shilimkar writes:
>> On Thursday 26 September 2013 11:54 AM, Russell King - ARM Linux wrote:
>>> On Thu, Sep 26, 2013 at 05:42:53PM +0200, Marc Kleine-Budde wrote:
>>>> On 09/26/2013 04:01 PM, Lothar Wa?mann wrote:
>>>>> Hi,
>>>>>
>>>>> when enabling the can interface with 'ifconfig can0 up' (after
>>>>> configuring the bitrate with canconfig) on an i.MX6Q board (TX6) I'm
>>>>> getting the following kernel dump:
>>>>>
>>>>> |flexcan 2094000.flexcan can0: writing ctrl=0x0a212003
>>>>> |flexcan 2094000.flexcan can0: flexcan_set_bittiming: mcr=0x5980000f ctrl=0x0a212003
>>>>> |flexcan 2094000.flexcan can0: flexcan_chip_start: writing mcr=0x79a2020f
>>>>> |flexcan 2094000.flexcan can0: flexcan_chip_start: writing ctrl=0x0a21ac53
>>>>> |Unhandled fault: imprecise external abort (0x1c06) at 0x00057adc
>>>>
>>>> Looks like a NULL pointer deref to me. But it doesn't make any sense,
>>>> because the offset is way beyond the length of the struct flexcan_regs.
>>>
>>> NULL pointer derefs don't produce imprecise external aborts. I believe
>>> that the FAR is unpredictable for such aborts as well, which means the
>>> "at xxxx" should be ignored.
>>>
>> yep .. FAR is never reliable for imprecise external aborts.
>>
>>> Bearing in mind that it is imprecise, that means that the abort happened
>>> sometime in the past, so the PC isn't reliable either.
>>>
>>> The code here is:
>>>
>>> 0: f57ff04e dsb st
>>> 4: e3a01000 mov r1, #0
>>> 8: e5820000 str r0, [r2]
>>> c: f57ff04e dsb st
>>> 10: e5820004 str r0, [r2, #4]
>>>
>>> Given the dsbs there, it's probably the str r0, [r2] which provoked it,
>>> and we can see from the register dump, r2 is not NULL.
>>>
>>> It's probably complaining that a clock necessary for the peripherals
>>> registers to be accessible is not running.
>>>
>> Not sure if it helps but almost 90% of the imprecise external aborts
>> cases I have seen on OMAP attributed to clock not being available
>> at the IP register accesses race conditions either at SW or
>> hardware(clock settling time). And rest of the 10 % majority falling
>> into interconnect synchronization issues.
>>
> I already checked this by enabling all clocks with devmem.
> If a clock would be missing I would expect all register wriites to
> fail not the register write to the _second_ mailbox (after the first
> mailbox has been successfully initialized).
They layout of the flexcan varies in the different imx chips. I'm
comparing the datasheets at the moment. As Russell pointed out the area
staring at offset 0x80 is by the reception FIFO engine.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130927/5ba657f9/attachment.sig>
next prev parent reply other threads:[~2013-09-27 9:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 14:01 imprecise external abort using the flexcan driver on i.MX6Q =?utf-8?Q?Lothar_Wa=C3=9Fmann?=
2013-09-26 15:22 ` Fabio Estevam
2013-09-26 15:26 ` Fabio Estevam
2013-09-27 14:32 ` Lothar Waßmann
2013-09-27 14:35 ` Marc Kleine-Budde
2013-09-26 15:42 ` Marc Kleine-Budde
2013-09-26 15:54 ` Russell King - ARM Linux
2013-09-26 16:24 ` Santosh Shilimkar
2013-09-27 9:23 ` Lothar Waßmann
2013-09-27 9:43 ` Marc Kleine-Budde [this message]
2013-09-27 10:04 ` Lothar Waßmann
2013-09-27 10:14 ` Marc Kleine-Budde
2013-09-27 10:43 ` Lothar Waßmann
2013-09-26 19:04 ` Matt Sealey
2013-09-27 9:41 ` Lothar Waßmann
2013-09-27 17:24 ` Matt Sealey
2013-09-27 19:55 ` Marc Kleine-Budde
2013-09-30 11:06 ` Lothar Waßmann
2013-09-30 11:19 ` Marc Kleine-Budde
2013-09-30 11:37 ` Lothar Waßmann
2013-09-30 11:39 ` Marc Kleine-Budde
2013-09-27 8:59 ` Lothar Waßmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5245535F.6020804@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).