Re: system freeze - beaglebone black xenomai - gpio interrupts driver

2020-02-08 Thread Greg Gallagher via Xenomai
Hi,

On Sat, Feb 8, 2020 at 6:56 AM Laurentiu-Cristian Duca <
laurentiu.d...@gmail.com> wrote:

> Hello there
>
>   Greg, any news?
>
> Thanks
>

Still working on it, I’ve only had a couple hours this week to work on it.
I’m debugging the irq storm that happens after we trigger the gpio
interrupt.  I plan on spending some time this weekend on it.

Greg

>
> On 1/31/20, Greg Gallagher  wrote:
> > Hey,
> >
> > On Wed, Jan 29, 2020 at 11:58 AM Greg Gallagher 
> > wrote:
> >>
> >> Hey,
> >>
> >> On Wed, Jan 29, 2020 at 12:07 AM Greg Gallagher 
> >> wrote:
> >> >
> >> > Hi,
> >> >
> >> > On Tue, Jan 28, 2020 at 7:37 AM Laurentiu-Cristian Duca
> >> >  wrote:
> >> > >
> >> > > Again, to make things clear:
> >> > > I have tested two modules: one with RTDM gpio-interrupts and one
> with
> >> > > classic linux interrupts.
> >> > > The one with RTDM gpio-interrupts:
> >> > > - makes kernel freeze on 4.14.71 and 4.19.82 ipipe-enabled kernels
> >> > > - works (but with ipipe warnings when interrupt arrives) in 4.4.71
> and
> >> > > 4.9.51
> >> > > The one with classic linux interrupts:
> >> > > - works in PREEMPT_RT linux (tested on 5.4.5 and 4.19.59 PREEMPT_RT
> >> > > non-ipipe non-xenomai)
> >> > > - makes kernel freeze when interrupt arrives on 4.14.71 and 4.19.82
> >> > > for xenomai ipipe enabled kernels
> >> > >
> >> > > On 1/28/20, Laurentiu-Cristian Duca 
> wrote:
> >> > > > This does not happen with non-ipipe enabled kernels.
> >> > > > I have tested a classic gpio-interrupt module on PREEMPT_RT and it
> >> > > > works,
> >> > > > but when I tested it on an ipipe-enabled kernel (4.14.71 and
> >> > > > 4.19.82)
> >> > > > got kernel freeze.
> >> > > >
> >> > > > On 1/28/20, Greg Gallagher  wrote:
> >> > > >> On Tue, Jan 28, 2020 at 7:11 AM Laurentiu-Cristian Duca <
> >> > > >> laurentiu.d...@gmail.com> wrote:
> >> > > >>
> >> > > >>> I forgot to say that I've tested 4.14.71 with xenomai 3.0.9
> >> > > >>>
> >> > > >>> On 1/28/20, Laurentiu-Cristian Duca 
> >> > > >>> wrote:
> >> > > >>> > Hello Jan and friends,
> >> > > >>> >
> >> > > >>> > The situation is the following for bbb:
> >> > > >>> > - 4.14.71 and 4.19.82 xenomai-3 master enabled kernels
> >> > > >>> > freeze when trying to use gpio-interrupts;
> >> > > >>> > when interrupt comes the gpioout is toggled but the system
> >> > > >>> > do not respond anymore to keyboard and nothing more is shown
> on
> >> > > >>> > the
> >> > > >>> screen
> >> > > >>> > - note that even if I try a classic (linux only, non-xenomai)
> >> > > >>
> >> > > >> This happens even with non-ipipe enables kernels?
> >> > > >
> >> > > >>
> >> > > >>
> >> > > >>> > gpio interrupt handler in 4.19.82 with xenomai-3
> >> > > >>> > the system freeze when interrupt comes
> >> > > >>> > - 4.9.51 and 4.4.71 xenomai 3.0.5 enabled kernels work
> >> > > >>> > blinking gpioout and do not block,
> >> > > >>> > but both show warnings when interrupt comes
> >> > > >>> > which significantly increase interrupt latency.
> >> > > >>> >
> >> > > >>> >
> >> > > >>> > On 1/28/20, Jan Kiszka  wrote:
> >> > > >>> >> On 24.01.20 07:24, Greg Gallagher via Xenomai wrote:
> >> > > >>> >>> I sent a patch offline, if you could try it that would be
> >> > > >>> >>> great.
> >> > > >>> >>> I'm
> >> > > >>> >>> having issues getting my board set up.
> >> > > >>> >>>
> >> > > >>> >>
> >> > > >>> >> Do we know by now if this is an I-pipe issue or rather
> >> > > >>> >> something
> >> > > >>> >> cobalt-related?
> >> > > >>> >>
> >> > > >>> >> Jan
> >> > > >>> >>
> >> > > >>> >>> On Thu, Jan 23, 2020 at 1:13 PM Greg Gallagher
> >> > > >>> >>> 
> >> > > >>> >>> wrote:
> >> > > >>> 
> >> > > >>>  Hi,
> >> > > >>> 
> >> > > >>>  On Thu, Jan 23, 2020 at 12:15 PM Laurentiu-Cristian Duca
> >> > > >>>   wrote:
> >> > > >>> >
> >> > > >>> > Hi, the interrupt comes one per second in my test, so
> there
> >> > > >>> > is no
> >> > > >>> > flood.
> >> > > >>> > In 4.19 the system it blinks the gpioout but it does not
> >> > > >>> > respond
> >> > > >>> > to
> >> > > >>> > keyboard and does not show anything more on the screen.
> >> > > >>> 
> >> > > >>>  Okay, there's a couple things that are different between
> 4.4
> >> > > >>>  and
> >> > > >>>  4.19
> >> > > >>>  that I'm looking into, which is taking me a little long
> then
> >> > > >>>  I
> >> > > >>>  thought.  I won't have this patch ready till tomorrow
> >> > > >>>  morning.  I
> >> > > >>>  finally have beaglebone black hardware, I'll make sure the
> >> > > >>>  kernel
> >> > > >>>  boots and then send the patch to you for testing.
> >> > > >>> 
> >> > > >>>  -Greg
> >> > > >>> 
> >> > > >>> 
> >> > > >>> >
> >> > > >>> > On Thu, Jan 23, 2020, 19:03 Greg Gallagher
> >> > > >>> > 
> >> > > >>> > wrote:
> >> > > >>> >>
> >> > > >>> >> Hi,
> >> > > >>> >>
> >> > > >>> >> On Thu, Jan 23, 2020 at 9:21 AM Laurentiu-Cristian Duca
> >> 

Re: system freeze - beaglebone black xenomai - gpio interrupts driver

2020-02-08 Thread Laurentiu-Cristian Duca via Xenomai
Hello there

  Greg, any news?

Thanks

On 1/31/20, Greg Gallagher  wrote:
> Hey,
>
> On Wed, Jan 29, 2020 at 11:58 AM Greg Gallagher 
> wrote:
>>
>> Hey,
>>
>> On Wed, Jan 29, 2020 at 12:07 AM Greg Gallagher 
>> wrote:
>> >
>> > Hi,
>> >
>> > On Tue, Jan 28, 2020 at 7:37 AM Laurentiu-Cristian Duca
>> >  wrote:
>> > >
>> > > Again, to make things clear:
>> > > I have tested two modules: one with RTDM gpio-interrupts and one with
>> > > classic linux interrupts.
>> > > The one with RTDM gpio-interrupts:
>> > > - makes kernel freeze on 4.14.71 and 4.19.82 ipipe-enabled kernels
>> > > - works (but with ipipe warnings when interrupt arrives) in 4.4.71 and
>> > > 4.9.51
>> > > The one with classic linux interrupts:
>> > > - works in PREEMPT_RT linux (tested on 5.4.5 and 4.19.59 PREEMPT_RT
>> > > non-ipipe non-xenomai)
>> > > - makes kernel freeze when interrupt arrives on 4.14.71 and 4.19.82
>> > > for xenomai ipipe enabled kernels
>> > >
>> > > On 1/28/20, Laurentiu-Cristian Duca  wrote:
>> > > > This does not happen with non-ipipe enabled kernels.
>> > > > I have tested a classic gpio-interrupt module on PREEMPT_RT and it
>> > > > works,
>> > > > but when I tested it on an ipipe-enabled kernel (4.14.71 and
>> > > > 4.19.82)
>> > > > got kernel freeze.
>> > > >
>> > > > On 1/28/20, Greg Gallagher  wrote:
>> > > >> On Tue, Jan 28, 2020 at 7:11 AM Laurentiu-Cristian Duca <
>> > > >> laurentiu.d...@gmail.com> wrote:
>> > > >>
>> > > >>> I forgot to say that I've tested 4.14.71 with xenomai 3.0.9
>> > > >>>
>> > > >>> On 1/28/20, Laurentiu-Cristian Duca 
>> > > >>> wrote:
>> > > >>> > Hello Jan and friends,
>> > > >>> >
>> > > >>> > The situation is the following for bbb:
>> > > >>> > - 4.14.71 and 4.19.82 xenomai-3 master enabled kernels
>> > > >>> > freeze when trying to use gpio-interrupts;
>> > > >>> > when interrupt comes the gpioout is toggled but the system
>> > > >>> > do not respond anymore to keyboard and nothing more is shown on
>> > > >>> > the
>> > > >>> screen
>> > > >>> > - note that even if I try a classic (linux only, non-xenomai)
>> > > >>
>> > > >> This happens even with non-ipipe enables kernels?
>> > > >
>> > > >>
>> > > >>
>> > > >>> > gpio interrupt handler in 4.19.82 with xenomai-3
>> > > >>> > the system freeze when interrupt comes
>> > > >>> > - 4.9.51 and 4.4.71 xenomai 3.0.5 enabled kernels work
>> > > >>> > blinking gpioout and do not block,
>> > > >>> > but both show warnings when interrupt comes
>> > > >>> > which significantly increase interrupt latency.
>> > > >>> >
>> > > >>> >
>> > > >>> > On 1/28/20, Jan Kiszka  wrote:
>> > > >>> >> On 24.01.20 07:24, Greg Gallagher via Xenomai wrote:
>> > > >>> >>> I sent a patch offline, if you could try it that would be
>> > > >>> >>> great.
>> > > >>> >>> I'm
>> > > >>> >>> having issues getting my board set up.
>> > > >>> >>>
>> > > >>> >>
>> > > >>> >> Do we know by now if this is an I-pipe issue or rather
>> > > >>> >> something
>> > > >>> >> cobalt-related?
>> > > >>> >>
>> > > >>> >> Jan
>> > > >>> >>
>> > > >>> >>> On Thu, Jan 23, 2020 at 1:13 PM Greg Gallagher
>> > > >>> >>> 
>> > > >>> >>> wrote:
>> > > >>> 
>> > > >>>  Hi,
>> > > >>> 
>> > > >>>  On Thu, Jan 23, 2020 at 12:15 PM Laurentiu-Cristian Duca
>> > > >>>   wrote:
>> > > >>> >
>> > > >>> > Hi, the interrupt comes one per second in my test, so there
>> > > >>> > is no
>> > > >>> > flood.
>> > > >>> > In 4.19 the system it blinks the gpioout but it does not
>> > > >>> > respond
>> > > >>> > to
>> > > >>> > keyboard and does not show anything more on the screen.
>> > > >>> 
>> > > >>>  Okay, there's a couple things that are different between 4.4
>> > > >>>  and
>> > > >>>  4.19
>> > > >>>  that I'm looking into, which is taking me a little long then
>> > > >>>  I
>> > > >>>  thought.  I won't have this patch ready till tomorrow
>> > > >>>  morning.  I
>> > > >>>  finally have beaglebone black hardware, I'll make sure the
>> > > >>>  kernel
>> > > >>>  boots and then send the patch to you for testing.
>> > > >>> 
>> > > >>>  -Greg
>> > > >>> 
>> > > >>> 
>> > > >>> >
>> > > >>> > On Thu, Jan 23, 2020, 19:03 Greg Gallagher
>> > > >>> > 
>> > > >>> > wrote:
>> > > >>> >>
>> > > >>> >> Hi,
>> > > >>> >>
>> > > >>> >> On Thu, Jan 23, 2020 at 9:21 AM Laurentiu-Cristian Duca
>> > > >>> >> via
>> > > >>> >> Xenomai
>> > > >>> >>  wrote:
>> > > >>> >>>
>> > > >>> >>> Hello xenomai community,
>> > > >>> >>>
>> > > >>> >>>  I have successfully tested in xenomai SPI with
>> > > >>> >>> interrupts
>> > > >>> >>> on
>> > > >>> >>> bbb.
>> > > >>> >>> However, on bbb, if I try to test a basic gpio interrupts
>> > > >>> >>> driver,
>> > > >>> >>> problems appear.
>> > > >>> >>>  Please see details below. I appreciate any idea.
>> > > >>> >>>
>> > > >>> >>> 1. xenomai-3 master