linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG - "scheduling while atomic" on a irq handler (s3c-mci)
@ 2012-05-09 14:07 Christophe Huriaux
  2012-05-09 17:49 ` Uwe Kleine-König
  0 siblings, 1 reply; 8+ messages in thread
From: Christophe Huriaux @ 2012-05-09 14:07 UTC (permalink / raw)
  To: linux-rt-users

Hi everyone,

   I am facing a problem while trying to run a rt-patched 3.2.y kernel
with PREEMPT_RT_FULL on a mini2440 board (ARM based s3c2440 SoC) :
whilst a vanilla kernel (with PREEMPT_LL) works like a charm,
PREEMPT_RTB and PREEMPT_RT_FULL makes the MMC/SD driver  (s3cmci)
hang, which result in the kernel waiting indefinitely for the root fs
to mount.

  I think that the IRQ handling of the driver is somehow disturbed by
the changes made by the RT patch. When using PREEMPT_RTB I can see the
following message in the console :

BUG: scheduling while atomic: irq/37-s3c-mci/253/0x00000102
Modules linked in:
Function entered at [<c000e90c>] from [<c029f478>]
Function entered at [<c029f478>] from [<c029fc3c>]
Function entered at [<c029fc3c>] from [<c00559c0>]
Function entered at [<c00559c0>] from [<c01dd4c8>]
Function entered at [<c01dd4c8>] from [<c0024a0c>]
Function entered at [<c0024a0c>] from [<c0024d9c>]
Function entered at [<c0024d9c>] from [<c0024fe8>]
Function entered at [<c0024fe8>] from [<c0025140>]
Function entered at [<c0025140>] from [<c00549f0>]
Function entered at [<c00549f0>] from [<c00547c4>]
Function entered at [<c00547c4>] from [<c0039954>]
Function entered at [<c0039954>] from [<c000a120>]

  When I run the kernel under Qemu, debug through gdb and put a
breakpoint on unwind_backtace the details of the previous backtrace is
:

#0  unwind_backtrace (regs=0x0, tsk=0x0) at arch/arm/kernel/unwind.c:409
#1  0xc029f478 in schedule_debug (prev=<optimized out>) at kernel/sched.c:4357
#2  __schedule () at kernel/sched.c:4537
#3  0xc029fc3c in schedule () at kernel/sched.c:4625
#4  0xc00559c0 in synchronize_irq (irq=<optimized out>) at
kernel/irq/manage.c:73
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

  I don't see the "bug" message with PREEMPT_RT_FULL, the kernel just
hang waiting for the rootfs. The problem did not occur in the 2.6.y
tree AFAIK.

  I'd like to investigate more and fix the s3cmci driver but I don't
know where to begin, could someone give me some hints on what should
be done/not be done for a rt patch compliant device driver/irq handler
?


Regards,
Christophe Huriaux

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-23  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 14:07 BUG - "scheduling while atomic" on a irq handler (s3c-mci) Christophe Huriaux
2012-05-09 17:49 ` Uwe Kleine-König
2012-05-10 13:17   ` Christophe Huriaux
2012-05-15 17:38     ` Steven Rostedt
2012-05-20  5:27     ` [PATCH] genirq: don't sync irq thread if current happen to be the very irq thread Yong Zhang
2012-05-20 12:19       ` [PATCH v2] " Yong Zhang
2012-05-22 13:50         ` Thomas Gleixner
2012-05-23  6:54           ` Yong Zhang

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).