All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre COFFIGNAL <acoffignal@geral.com>
To: xenomai@xenomai.org
Subject: Re: [Xenomai] imx28 rtcan flexcan system freezes
Date: Thu, 23 Jan 2014 14:10:13 +0100	[thread overview]
Message-ID: <52E114B5.1090807@geral.com> (raw)
In-Reply-To: <52E110EC.4090009@geral.com>


Le 23/01/2014 13:54, Alexandre COFFIGNAL a écrit :
>
> Le 23/01/2014 12:36, Wolfgang Grandegger a écrit :
>> Hi Gilles,
>>
>>
>>
>> On Thu, 23 Jan 2014 11:04:44 +0100, Gilles Chanteperdrix
>>
>> <gilles.chanteperdrix@xenomai.org> wrote:
>>
>>> On 01/22/2014 03:12 PM, Gilles Chanteperdrix wrote:
>>>> On 01/22/2014 03:04 PM, Alexandre COFFIGNAL wrote:
>>>>> Le 22/01/2014 14:30, Gilles Chanteperdrix a écrit :
>>>>>> On 01/22/2014 02:27 PM, Alexandre COFFIGNAL wrote:
>>>>>>> Le 22/01/2014 13:00, Gilles Chanteperdrix a écrit :
>>>>>>>> On 01/22/2014 12:36 PM, Alexandre COFFIGNAL wrote:
>>>>>>>>>>> + cf->data[3]=((data0 >> 0)  & 0xFF) ;
>>>>>>>>>>> +        cf->data[2]=((data0 >> 8) & 0xFF) ;
>>>>>>>>>>> +        cf->data[1]=((data0 >> 16) & 0xFF) ;
>>>>>>>>>>> +        cf->data[0]=((data0 >> 24) & 0xFF) ;
>>>>>>>>>>> +        cf->data[7]=((data1 >> 0) & 0xFF) ;
>>>>>>>>>>> +        cf->data[6]=((data1 >> 8) & 0xFF) ;
>>>>>>>>>>> +        cf->data[5]=((data1 >> 16) & 0xFF) ;
>>>>>>>>>>> +        cf->data[4]=((data1 >> 24) & 0xFF) ;
>>>>>>>>>>> rtcan flexcan works perfectly.
>>>>>>>>>>> is  anyone know what is the problem with first instructions ?
>>>>>>>>>> Probably mb->data does not have the right alignment. Could you
>> not
>>
>>>>>>>>>> arrange to get it properly aligned? Failing that, you should use
>>>>>>>>>> put_unaligned instead of open coding it.
>>
>>
>> How are unaligned accesses handled on your system? Alexandre,
>>
>> what does "cat /proc/cpu/alignment" report? Aligned access
>>
>> would be better, I agree.
>>
>>
>>
>>>>>>>>> here structures used in flexcan driver, it seem to be aligned
>>>>>>>> I am talking about the alignment of cf->data, since obviously, 
>>>>>>>> that
>>>>>>>> is
>>>>>>>> the one which is causing problems.
>>>>>>> Thank a lot, put_unaligned fix this issue if you want, i can send a
>>>>>>> path
>>>>>> The other solution (getting cf->data to be properly aligned) 
>>>>>> would be
>>>>>> more efficient, why is not it possible to get cf->data properly
>>>>>> aligned?
>>>>> I think, i can't get cf->data to be properly aligned because "cf" is
>>>>> receive internal frame representation within the ring buffer
>>>>> of a struct rtcan_socket and struct rtcan_rb_frame is a generic
>>>>> structure used in all rtcan drivers .
>>>> Well, if you fix rtcan_rb_frame to be aligned, it will be aligned for
>>>> all drivers, so that looks like a worthwile improvement...
>>> Wolfgang, what do you think? Should we change the alignment of
>>> rtcan_rb_frame::data, or use put_unaligned on ARM?
>>
>>
>> I realized the mail and wonder why this problem does not show up with
>>
>> vanilla
>>
>> Linux. Maybe we need to port over some patch from there. I will have a
>>
>> closer
>>
>> look this even or over the weekend.
>>
>>
>>
>> Wolfgang.
>>
>>
>>
>> _______________________________________________
>> Xenomai mailing list
>> Xenomai@xenomai.org
>> http://www.xenomai.org/mailman/listinfo/xenomai
>
> Hi,
>
> "cat /proc/cpu/alignment" report
> User:           0
> System:         0
> Skipped:        0
> Half:           0
> Word:           0
> DWord:          0
> Multi:          0
> User faults:    0 (ignored)
>
> something wrong with that ?
>
> Alexandre.
>
>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai

For your information :
Actualy my kernel is linux 3.8.13 vanilla from 
https://www.kernel.org/pub/linux/kernel/v3.x/"
with Adeos/Xenomai Real-time patch 2.6.3 from
download.gna.org/xenomai/stable/xenomai-2.6.3.tar.bz2



  reply	other threads:[~2014-01-23 13:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 10:24 [Xenomai] imx28 rtcan flexcan system freezes Alexandre COFFIGNAL
2014-01-22 11:23 ` Gilles Chanteperdrix
2014-01-22 11:36   ` Alexandre COFFIGNAL
2014-01-22 12:00     ` Gilles Chanteperdrix
2014-01-22 13:27       ` Alexandre COFFIGNAL
2014-01-22 13:30         ` Gilles Chanteperdrix
2014-01-22 14:04           ` Alexandre COFFIGNAL
2014-01-22 14:12             ` Gilles Chanteperdrix
2014-01-23 10:04               ` Gilles Chanteperdrix
2014-01-23 11:36                 ` Wolfgang Grandegger
2014-01-23 12:05                   ` Gilles Chanteperdrix
2014-01-23 12:21                     ` Wolfgang Grandegger
2014-01-23 12:23                       ` Gilles Chanteperdrix
2014-01-23 13:07                     ` Gilles Chanteperdrix
2014-01-23 12:54                   ` Alexandre COFFIGNAL
2014-01-23 13:10                     ` Alexandre COFFIGNAL [this message]
2014-01-26 19:26               ` Wolfgang Grandegger
2014-01-26 19:29                 ` Gilles Chanteperdrix
2014-01-26 20:16                   ` Wolfgang Grandegger
2014-01-26 20:56                     ` Gilles Chanteperdrix
2014-01-27  7:56                       ` Wolfgang Grandegger
2014-01-28 22:06                         ` Gilles Chanteperdrix
2014-01-29  7:16                           ` Wolfgang Grandegger
2014-01-29 15:50                             ` Alexandre COFFIGNAL
2014-01-29 17:58                               ` Gilles Chanteperdrix
2014-01-31 13:15                                 ` Alexandre COFFIGNAL
2014-01-23 19:48             ` Gilles Chanteperdrix

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=52E114B5.1090807@geral.com \
    --to=acoffignal@geral.com \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.