linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Brown <jhbrown@repinvariant.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: gowrishankar <gowrishankar.m@linux.vnet.ibm.com>,
	linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: Trouble booting PREEMPT_RT kernel on ARM platform, 2.6.33
Date: Mon, 16 Aug 2010 10:44:13 -0700	[thread overview]
Message-ID: <AANLkTingaupTO5S9vFAb2TMpT2S7v409Cx3Mknt8CXiL@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1007221842000.2616@localhost.localdomain>

Whoops, trying this again without HTML, sorry for any double-sends:

On Thu, Jul 22, 2010 at 9:44 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Wed, 21 Jul 2010, gowrishankar wrote:
>
> > On Wednesday 21 July 2010 03:56 AM, Jeremy Brown wrote:
> > > We're trying to get a PREEMPT_RT kernel running on a BeagleBoard C4
> > > (OMAP3 Arm architecture).  We're using kernel version 2.6.33, with
> > >
> > 2.6.33 ! not 2.6.33.6 ???
> > > patches from
> > > patch-2.6.33.6-rt26.gz
> > >
> > > On boot, we start seeing messages of this form:
> > >
> > > ----
> > > [ 4528.227294] BUG: sleeping function called from invalid context at
> > > kernel/rtmutex.c:684
> > > [ 4528.227294] pcnt: 1 0 in_atomic(): 1, irqs_disabled(): 128, pid:
> > > 223, name: modprobe
> > > [ 4528.227355] [<c0044490>] (unwind_backtrace+0x0/0xe8) from
> > > [<c04cb4e4>] (rt_spin_lock+0x30/0x5c)
> > > [ 4528.227386] [<c04cb4e4>] (rt_spin_lock+0x30/0x5c) from [<c032e3b0>]
> > > (twl4030_sih_set_type+0x3c/0xac)
> > >
> > sleeping spin lock is called while preempt/interrupt is disabled.
> >
> > Can you try the below patch ?
> >
> > Signed-off-by: Gowrishankar <gowrishankar.m@in.ibm.com>
> >
> > Index: linux-2.6.33.6-rt26/drivers/mfd/twl4030-irq.c
> > ===================================================================
> > --- linux-2.6.33.6-rt26.orig/drivers/mfd/twl4030-irq.c    2010-07-21
> > 12:40:42.000000000 +0530
> > +++ linux-2.6.33.6-rt26/drivers/mfd/twl4030-irq.c    2010-07-21
> > 12:41:16.000000000 +0530
> > @@ -633,14 +633,14 @@
> >      if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
> >          return -EINVAL;
> >
> > -    spin_lock_irqsave(&sih_agent_lock, flags);
> > +    raw_spin_lock_irqsave(&sih_agent_lock, flags);
> >      if ((desc->status & IRQ_TYPE_SENSE_MASK) != trigger) {
> >          desc->status &= ~IRQ_TYPE_SENSE_MASK;
> >          desc->status |= trigger;
> >          sih->edge_change |= BIT(irq - sih->irq_base);
> >          queue_work(wq, &sih->edge_work);
> >      }
> > -    spin_unlock_irqrestore(&sih_agent_lock, flags);
> > +    raw_spin_unlock_irqrestore(&sih_agent_lock, flags);
>
> Nope, that's not going to fly. First it does not compile and second
> you trigger the same problem in queue_work() which is called inside
> that section. That needs a bit more work, will have a look. (/me
> mentions, that todo list is already overly full, so do not expect
> wonders).

Hi, Thomas.  Has this has risen to the top of your todo queue?   If
not, we're going to start poking at it here; any thoughts, advice,
and/or pointers to reference material would be greatly appreciated.

If we're fortunate enough to get things working, we'll certainly send
patches to this list.

Thanks,
Jeremy

> Thanks,
>
>        tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2010-08-16 17:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 22:26 Trouble booting PREEMPT_RT kernel on ARM platform, 2.6.33 Jeremy Brown
2010-07-21  7:21 ` gowrishankar
2010-07-22 16:44   ` Thomas Gleixner
2010-07-22 17:25     ` Jeremy Brown
2010-08-16 17:44     ` Jeremy Brown [this message]

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=AANLkTingaupTO5S9vFAb2TMpT2S7v409Cx3Mknt8CXiL@mail.gmail.com \
    --to=jhbrown@repinvariant.com \
    --cc=gowrishankar.m@linux.vnet.ibm.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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).