linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free  already-free IRQ 1"
@ 2013-08-29 21:54 Michael Langfinger
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Langfinger @ 2013-08-29 21:54 UTC (permalink / raw)
  To: linux-rt-users

 Hi,

 when I try to boot kernel 3.10.9-rt5 (or lower) on the Atmel 
 AT91SAM9G25, I get the following error:

 WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x1a8()
 Trying to free already-free IRQ 1
 Modules linked in:
 CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.9-rt5 #1
 [<c000cffc>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c001550c>] 
 (warn_slowpath_common+0x4)
 [<c001550c>] (warn_slowpath_common+0x4c/0x68) from [<c00155a8>] 
 (warn_slowpath_)
 [<c00155a8>] (warn_slowpath_fmt+0x2c/0x3c) from [<c004f84c>] 
 (__free_irq+0x90/0)
 [<c004f84c>] (__free_irq+0x90/0x1a8) from [<c0043d18>] 
 (clockevents_set_mode+0x)
 [<c0043d18>] (clockevents_set_mode+0x28/0x5c) from [<c0043d5c>] 
 (clockevents_sh)
 [<c0043d5c>] (clockevents_shutdown+0x10/0x20) from [<c004403c>] 
 (clockevents_ex)
 [<c004403c>] (clockevents_exchange_device+0x74/0x80) from [<c0044410>] 
 (tick_no)
 [<c0044410>] (tick_notify+0xec/0x2d8) from [<c0035768>] 
 (notifier_call_chain+0x)
 [<c0035768>] (notifier_call_chain+0x38/0x68) from [<c00357b8>] 
 (raw_notifier_ca)
 [<c00357b8>] (raw_notifier_call_chain+0x14/0x18) from [<c0043c58>] 
 (clockevents)
 [<c0043c58>] (clockevents_register_device+0x90/0x128) from [<c0453abc>] 
 (time_i)
 [<c0453abc>] (time_init+0x1c/0x28) from [<c04508c4>] 
 (start_kernel+0x1b0/0x304)
 [<c04508c4>] (start_kernel+0x1b0/0x304) from [<20008040>] (0x20008040)
 ---[ end trace 0000000000000001 ]---

 This happens twice and the system hangs afterwards. I tried with  with 
 CONFIG_PREEMPT_RT_FULL as well as with CONFIG_PREEMPT_RTB, in both cases 
 I get the same error.

 I am no expert in this matter, so I would be grateful for any 
 assistance that might help me to solve the problem. Thank you!

 Kind regards,

 Michael Langfinger

 P.S.: Below you can find the complete output of the boot sequence, if 
 it helps.

 Uncompressing Linux... done, booting the kernel.
 Booting Linux on physical CPU 0x0
 Linux version 3.10.9-rt5 (mitarbeiter@ariag25-dev) (gcc version 4.7.3 
 (Ubuntu/L3
 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
 CPU: VIVT data cache, VIVT instruction cache
 Machine: Atmel AT91SAM (Device Tree), model: Acme Systems Aria G25
 Memory policy: ECC disabled, Data cache writeback
 AT91: Detected soc type: at91sam9x5
 AT91: Detected soc subtype: at91sam9g25
 AT91: sram at 0x300000 of 0x8000 mapped at 0xfef70000
 DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
 Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 
 65024
 Kernel command line: mem=256M console=ttyS0,115200 root=/dev/mmcblk0p2 
 rootfsty1
 PID hash table entries: 1024 (order: 0, 4096 bytes)
 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
 Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
 Memory: 256MB = 256MB total
 Memory: 254852k/254852k available, 7292k reserved, 0K highmem
 Virtual kernel memory layout:
     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
     modules : 0xbf000000 - 0xc0000000   (  16 MB)
       .text : 0xc0008000 - 0xc044f5e8   (4382 kB)
       .init : 0xc0450000 - 0xc04768dc   ( 155 kB)
       .data : 0xc0478000 - 0xc04a9740   ( 198 kB)
        .bss : 0xc04a9740 - 0xc04d5858   ( 177 kB)
 SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 Preemptible hierarchical RCU implementation.
 NR_IRQS:16 nr_irqs:16 16
 ------------[ cut here ]------------
 WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x1a8()
 Trying to free already-free IRQ 1
 Modules linked in:
 CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.9-rt5 #1
 [<c000cffc>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c001550c>] 
 (warn_slowpath_common+0x4)
 [<c001550c>] (warn_slowpath_common+0x4c/0x68) from [<c00155a8>] 
 (warn_slowpath_)
 [<c00155a8>] (warn_slowpath_fmt+0x2c/0x3c) from [<c004f84c>] 
 (__free_irq+0x90/0)
 [<c004f84c>] (__free_irq+0x90/0x1a8) from [<c0043d18>] 
 (clockevents_set_mode+0x)
 [<c0043d18>] (clockevents_set_mode+0x28/0x5c) from [<c0043d5c>] 
 (clockevents_sh)
 [<c0043d5c>] (clockevents_shutdown+0x10/0x20) from [<c004403c>] 
 (clockevents_ex)
 [<c004403c>] (clockevents_exchange_device+0x74/0x80) from [<c0044410>] 
 (tick_no)
 [<c0044410>] (tick_notify+0xec/0x2d8) from [<c0035768>] 
 (notifier_call_chain+0x)
 [<c0035768>] (notifier_call_chain+0x38/0x68) from [<c00357b8>] 
 (raw_notifier_ca)
 [<c00357b8>] (raw_notifier_call_chain+0x14/0x18) from [<c0043c58>] 
 (clockevents)
 [<c0043c58>] (clockevents_register_device+0x90/0x128) from [<c0453abc>] 
 (time_i)
 [<c0453abc>] (time_init+0x1c/0x28) from [<c04508c4>] 
 (start_kernel+0x1b0/0x304)
 [<c04508c4>] (start_kernel+0x1b0/0x304) from [<20008040>] (0x20008040)
 ---[ end trace 0000000000000001 ]---
 sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 
 3489660920ms
 Console: colour dummy device 80x30
 Calibrating delay loop... 198.76 BogoMIPS (lpj=775168)
 pid_max: default: 32768 minimum: 301
 Mount-cache hash table entries: 512
 CPU: Testing write buffer coherency: ok
 Setting up static identity map for 0xc032aac0 - 0xc032ab18
 devtmpfs: initialized
 pinctrl core: initialized pinctrl subsystem
 NET: Registered protocol family 16
 DMA: preallocated 256 KiB pool for atomic coherent allocations
 AT91: Power Management
 AT91: Starting after power-restored wakeup
 gpio-at91 fffff400.gpio: at address fefff400
 gpio-at91 fffff600.gpio: at address fefff600
 gpio-at91 fffff800.gpio: at address fefff800
 gpio-at91 fffffa00.gpio: at address fefffa00
 pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver
 ------------[ cut here ]------------
 WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x1a8()
 Trying to free already-free IRQ 1
 Modules linked in:
 CPU: 0 PID: 1 Comm: swapper Tainted: G        W    3.10.9-rt5 #1
 [<c000cffc>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c001550c>] 
 (warn_slowpath_common+0x4)
 [<c001550c>] (warn_slowpath_common+0x4c/0x68) from [<c00155a8>] 
 (warn_slowpath_)
 [<c00155a8>] (warn_slowpath_fmt+0x2c/0x3c) from [<c004f84c>] 
 (__free_irq+0x90/0)
 [<c004f84c>] (__free_irq+0x90/0x1a8) from [<c0043d18>] 
 (clockevents_set_mode+0x)
 [<c0043d18>] (clockevents_set_mode+0x28/0x5c) from [<c0043ff0>] 
 (clockevents_ex)
 [<c0043ff0>] (clockevents_exchange_device+0x28/0x80) from [<c0044410>] 
 (tick_no)
 [<c0044410>] (tick_notify+0xec/0x2d8) from [<c0035768>] 
 (notifier_call_chain+0x)
 [<c0035768>] (notifier_call_chain+0x38/0x68) from [<c00357b8>] 
 (raw_notifier_ca)
 [<c00357b8>] (raw_notifier_call_chain+0x14/0x18) from [<c0043c58>] 
 (clockevents)
 [<c0043c58>] (clockevents_register_device+0x90/0x128) from [<c04694e4>] 
 (tcb_cl)
 [<c04694e4>] (tcb_clksrc_init+0x1c4/0x204) from [<c0008890>] 
 (do_one_initcall+0)
 [<c0008890>] (do_one_initcall+0x90/0x148) from [<c0450b00>] 
 (kernel_init_freeab)
 [<c0450b00>] (kernel_init_freeable+0xe8/0x1ac) from [<c0323138>] 
 (kernel_init+0)
 [<c0323138>] (kernel_init+0x8/0xe4) from [<c0009450>] 
 (ret_from_fork+0x14/0x24)
 ---[ end trace 0000000000000002 ]---
 bio: create slab <bio-0> at 0
 at_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy slave 
 ), 8 chas
 at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy slave 
 ), 8 chas
 SCSI subsystem initialized
 usbcore: registered new interface driver usbfs
 usbcore: registered new interface driver hub
 usbcore: registered new device driver usb
 cfg80211: Calling CRDA to update world regulatory domain
 Switching to clocksource tcb_clksrc
 NET: Registered protocol family 2
 TCP established hash table entries: 2048 (order: 2, 16384 bytes)
 TCP bind hash table entries: 2048 (order: 3, 49152 bytes)
 TCP: Hash tables configured (established 2048 bind 2048)
 TCP: reno registered
 UDP hash table entries: 256 (order: 2, 16384 bytes)
 UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
 NET: Registered protocol family 1
 msgmni has been set to 497
 Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
 io scheduler noop registered (default)
 io scheduler deadline registered
 io scheduler cfq registered
 fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16) is a ATMEL_SERIAL
 console [ttyS0] enabled
 f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 23) is a ATMEL_SERIAL
 f8020000.serial: ttyS2 at MMIO 0xf8020000 (irq = 24) is a ATMEL_SERIAL
 brd: module loaded
 loop: module loaded
 atmel_spi f0000000.spi: version: 0x212
 atmel_spi f0000000.spi: DMA channel not available, SPI unable to use 
 DMA
 atmel_spi f0000000.spi: Atmel SPI Controller using PIO only
 atmel_spi f0000000.spi: Atmel SPI Controller at 0xf0000000 (irq 28)
 atmel_spi f0000000.spi: master is unqueued, this is deprecated
 macb f802c000.ethernet (unregistered net_device): invalid hw address, 
 using ranm
 libphy: MACB_mii_bus: probed
 macb f802c000.ethernet eth0: Cadence MACB at 0xf802c000 irq 25 
 (2a:4d:fa:f3:37:)
 macb f802c000.ethernet eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
 (mii_bu)
 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 ehci-atmel: EHCI Atmel driver
 atmel-ehci 700000.ehci: EHCI Host Controller
 atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
 atmel-ehci 700000.ehci: irq 29, io mem 0x00700000


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

* Re: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
@ 2013-08-30 11:18 Sami Pietikäinen
  2013-09-01 10:40 ` Michael Langfinger
  0 siblings, 1 reply; 11+ messages in thread
From: Sami Pietikäinen @ 2013-08-30 11:18 UTC (permalink / raw)
  To: linux-rt-users@vger.kernel.org

Hello Michael

We have encountered the same warnings with the Atmel SAMA5D35 processor when using the RT_PREEMPT patch. We get the same warnings with both 3.6.9-rt21 and 3.10.9-rt5 kernels. However, the 3.6.9-rt21 kernel boots just fine, and we also had problems booting the 3.10.9-rt5 kernel. Therefore these warnings and boot hanging might be unrelated.

What's causing these warnings is still unknown, but at least we got the 3.10.9-rt5 kernel to boot. The boot problem seems to be caused by the TCB clock source (tcb_clksrc). You could try to unset the CONFIG_ATMEL_TCB_CLKSRC option, but this is not optimal configuration for rt. 

I have attached a patch which goes on top of the rt5 patch that seems to fix the boot hang issue. Could you please report the results if you have time to test this patch? Please note that I have not yet done any rt-tests with this patch.

BR,
Sami Pietikäinen
Software Developer
Wapice Ltd.

--- a/drivers/clocksource/tcb_clksrc.c	2013-08-29 16:14:14.611335823 +0300
+++ b/drivers/clocksource/tcb_clksrc.c	2013-08-29 16:16:28.129657272 +0300
@@ -192,9 +192,13 @@
 	clkevt.clk = t2_clk;
 	tc_irqaction.dev_id = &clkevt;
 
-	timer_clock = clk32k_divisor_idx;
+	timer_clock = divisor_idx;
 
-	clkevt.clkevt.cpumask = cpumask_of(0);
+	if (!divisor)
+		clkevt.freq = 32768;
+	else
+		clkevt.freq = clk_get_rate(t2_clk)/divisor;
+	clkevt.clkevt.cpumask = cpumask_of(0);
 
 	clockevents_config_and_register(&clkevt.clkevt, 32768, 1, 0xffff);
--
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

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

* Re: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free  already-free IRQ 1"
  2013-08-30 11:18 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1" Sami Pietikäinen
@ 2013-09-01 10:40 ` Michael Langfinger
  2013-09-03  9:09   ` Sami Pietikäinen
  2013-10-11 10:09   ` Sebastian Andrzej Siewior
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Langfinger @ 2013-09-01 10:40 UTC (permalink / raw)
  To: Sami Pietikäinen; +Cc: linux-rt-users

 Hello Sami,

 first of all, thanks for your support and thanks for the patch. 
 Unfortunately, the boot process still hangs, although there seems to be 
 some kind of progress (the SD/MMC card is detected, which was not the 
 case before - so the kernel seems to crash later).

 I attached the output of the serial console. The first output is from a 
 kernel that was configured with full RT support 
 (CONFIG_PREEMPT_RT_FULL), the second one with basic RT support 
 (CONFIG_PREEMPT_RTB).

 Further information that might be interesting:

 - kernel configuration: I use the default configuration for the ARIA 
 G25 (http://www.acmesystems.it/aria), which is available under 
 https://github.com/tanzilli/linux-3.10, as basis for my custom kernel 
 configuration. The only change that I made was to add support for the 
 rtl8187 chipset (as a module).
 - Device tree structure files: I have to use at91-ariag25.dts / 
 at91sam9x5.dtsi from the kernel from the github repository mentioned 
 above, because otherwise even the regular kernel 3.10.9 crashes with a 
 kernel panic. I haven't looked deeper into this problem, because the 
 release candidate versions of kernel 3.11 boot fine with the DTS files 
 that are delivered with them and I plan to switch to kernel 3.11 as soon 
 as it is released, anyway.

 I attached the output of the boot process (with your patch applied) 
 below. The first one is from kernel 3.10.9-rt5 with 
 CONFIG_PREEMPT_RT_FULL set, the second one is from kernel 3.10.9-rt5 
 with CONFIG_PREEMPT_RTB.

 If you need any further information, please let me know!

 Kind regards,
 Michael Langfinger


 CONFIG_PREEMPT_RT_FULL:
 Starting linux kernel ..., machid: 0x1035
 
 Uncompressing Linux... done, booting the kernel.
 Booting Linux on physical CPU 0x0
 Linux version 3.10.9-rt5 (mitarbeiter@ariag25-dev) (gcc version 4.7.3 
 (Ubuntu/L3
 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
 CPU: VIVT data cache, VIVT instruction cache
 Machine: Atmel AT91SAM (Device Tree), model: Acme Systems Aria G25
 Memory policy: ECC disabled, Data cache writeback
 AT91: Detected soc type: at91sam9x5
 AT91: Detected soc subtype: at91sam9g25
 AT91: sram at 0x300000 of 0x8000 mapped at 0xfef70000
 DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
 Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 
 65024
 Kernel command line: mem=256M console=ttyS0,115200 root=/dev/mmcblk0p2 
 rootfsty1
 PID hash table entries: 1024 (order: 0, 4096 bytes)
 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
 Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
 Memory: 256MB = 256MB total
 Memory: 254852k/254852k available, 7292k reserved, 0K highmem
 Virtual kernel memory layout:
     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
     modules : 0xbf000000 - 0xc0000000   (  16 MB)
       .text : 0xc0008000 - 0xc044f5e8   (4382 kB)
       .init : 0xc0450000 - 0xc04768fc   ( 155 kB)
       .data : 0xc0478000 - 0xc04a9740   ( 198 kB)
        .bss : 0xc04a9740 - 0xc04d5858   ( 177 kB)
 SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 Preemptible hierarchical RCU implementation.
 NR_IRQS:16 nr_irqs:16 16
 ------------[ cut here ]------------
 WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x1a8()
 Trying to free already-free IRQ 1
 Modules linked in:
 CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.9-rt5 #4
 [<c000cffc>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c001550c>] 
 (warn_slowpath_common+0x4)
 [<c001550c>] (warn_slowpath_common+0x4c/0x68) from [<c00155a8>] 
 (warn_slowpath_)
 [<c00155a8>] (warn_slowpath_fmt+0x2c/0x3c) from [<c004f84c>] 
 (__free_irq+0x90/0)
 [<c004f84c>] (__free_irq+0x90/0x1a8) from [<c0043d18>] 
 (clockevents_set_mode+0x)
 [<c0043d18>] (clockevents_set_mode+0x28/0x5c) from [<c0043d5c>] 
 (clockevents_sh)
 [<c0043d5c>] (clockevents_shutdown+0x10/0x20) from [<c004403c>] 
 (clockevents_ex)
 [<c004403c>] (clockevents_exchange_device+0x74/0x80) from [<c0044410>] 
 (tick_no)
 [<c0044410>] (tick_notify+0xec/0x2d8) from [<c0035768>] 
 (notifier_call_chain+0x)
 [<c0035768>] (notifier_call_chain+0x38/0x68) from [<c00357b8>] 
 (raw_notifier_ca)
 [<c00357b8>] (raw_notifier_call_chain+0x14/0x18) from [<c0043c58>] 
 (clockevents)
 [<c0043c58>] (clockevents_register_device+0x90/0x128) from [<c0453abc>] 
 (time_i)
 [<c0453abc>] (time_init+0x1c/0x28) from [<c04508c4>] 
 (start_kernel+0x1b0/0x304)
 [<c04508c4>] (start_kernel+0x1b0/0x304) from [<20008040>] (0x20008040)
 ---[ end trace 0000000000000001 ]---
 sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 
 3489660920ms
 Console: colour dummy device 80x30
 Calibrating delay loop... 198.76 BogoMIPS (lpj=775168)
 pid_max: default: 32768 minimum: 301
 Mount-cache hash table entries: 512
 CPU: Testing write buffer coherency: ok
 Setting up static identity map for 0xc032aac0 - 0xc032ab18
 devtmpfs: initialized
 pinctrl core: initialized pinctrl subsystem
 NET: Registered protocol family 16
 DMA: preallocated 256 KiB pool for atomic coherent allocations
 AT91: Power Management
 AT91: Starting after power-restored wakeup
 gpio-at91 fffff400.gpio: at address fefff400
 gpio-at91 fffff600.gpio: at address fefff600
 gpio-at91 fffff800.gpio: at address fefff800
 gpio-at91 fffffa00.gpio: at address fefffa00
 pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver
 ------------[ cut here ]------------
 WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x1a8()
 Trying to free already-free IRQ 1
 Modules linked in:
 CPU: 0 PID: 1 Comm: swapper Tainted: G        W    3.10.9-rt5 #4
 [<c000cffc>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c001550c>] 
 (warn_slowpath_common+0x4)
 [<c001550c>] (warn_slowpath_common+0x4c/0x68) from [<c00155a8>] 
 (warn_slowpath_)
 [<c00155a8>] (warn_slowpath_fmt+0x2c/0x3c) from [<c004f84c>] 
 (__free_irq+0x90/0)
 [<c004f84c>] (__free_irq+0x90/0x1a8) from [<c0043d18>] 
 (clockevents_set_mode+0x)
 [<c0043d18>] (clockevents_set_mode+0x28/0x5c) from [<c0043ff0>] 
 (clockevents_ex)
 [<c0043ff0>] (clockevents_exchange_device+0x28/0x80) from [<c0044410>] 
 (tick_no)
 [<c0044410>] (tick_notify+0xec/0x2d8) from [<c0035768>] 
 (notifier_call_chain+0x)
 [<c0035768>] (notifier_call_chain+0x38/0x68) from [<c00357b8>] 
 (raw_notifier_ca)
 [<c00357b8>] (raw_notifier_call_chain+0x14/0x18) from [<c0043c58>] 
 (clockevents)
 [<c0043c58>] (clockevents_register_device+0x90/0x128) from [<c0469510>] 
 (tcb_cl)
 [<c0469510>] (tcb_clksrc_init+0x1f0/0x238) from [<c0008890>] 
 (do_one_initcall+0)
 [<c0008890>] (do_one_initcall+0x90/0x148) from [<c0450b00>] 
 (kernel_init_freeab)
 [<c0450b00>] (kernel_init_freeable+0xe8/0x1ac) from [<c0323138>] 
 (kernel_init+0)
 [<c0323138>] (kernel_init+0x8/0xe4) from [<c0009450>] 
 (ret_from_fork+0x14/0x24)
 ---[ end trace 0000000000000002 ]---
 bio: create slab <bio-0> at 0
 at_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy slave 
 ), 8 chas
 at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy slave 
 ), 8 chas
 SCSI subsystem initialized
 usbcore: registered new interface driver usbfs
 usbcore: registered new interface driver hub
 usbcore: registered new device driver usb
 cfg80211: Calling CRDA to update world regulatory domain
 Switching to clocksource tcb_clksrc
 NET: Registered protocol family 2
 TCP established hash table entries: 2048 (order: 2, 16384 bytes)
 TCP bind hash table entries: 2048 (order: 3, 49152 bytes)
 TCP: Hash tables configured (established 2048 bind 2048)
 TCP: reno registered
 UDP hash table entries: 256 (order: 2, 16384 bytes)
 UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
 NET: Registered protocol family 1
 msgmni has been set to 497
 Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
 io scheduler noop registered (default)
 io scheduler deadline registered
 io scheduler cfq registered
 fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16) is a ATMEL_SERIAL
 console [ttyS0] enabled
 f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 23) is a ATMEL_SERIAL
 f8020000.serial: ttyS2 at MMIO 0xf8020000 (irq = 24) is a ATMEL_SERIAL
 brd: module loaded
 loop: module loaded
 atmel_spi f0000000.spi: version: 0x212
 atmel_spi f0000000.spi: DMA channel not available, SPI unable to use 
 DMA
 atmel_spi f0000000.spi: Atmel SPI Controller using PIO only
 atmel_spi f0000000.spi: Atmel SPI Controller at 0xf0000000 (irq 28)
 atmel_spi f0000000.spi: master is unqueued, this is deprecated
 macb f802c000.ethernet (unregistered net_device): invalid hw address, 
 using ranm
 libphy: MACB_mii_bus: probed
 macb f802c000.ethernet eth0: Cadence MACB at 0xf802c000 irq 25 
 (ea:20:33:bb:87:)
 macb f802c000.ethernet eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
 (mii_bu)
 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 ehci-atmel: EHCI Atmel driver
 atmel-ehci 700000.ehci: EHCI Host Controller
 atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
 atmel-ehci 700000.ehci: irq 29, io mem 0x00700000
 atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
 usb usb1: Product: EHCI Host Controller
 usb usb1: Manufacturer: Linux 3.10.9-rt5 ehci_hcd
 usb usb1: SerialNumber: 700000.ehci
 hub 1-0:1.0: USB hub found
 hub 1-0:1.0: 3 ports detected
 usbcore: registered new interface driver usbserial
 usbcore: registered new interface driver usbserial_generic
 usbserial: USB Serial support registered for generic
 usbcore: registered new interface driver ftdi_sio
 usbserial: USB Serial support registered for FTDI USB Serial Device
 usbcore: registered new interface driver pl2303
 usbserial: USB Serial support registered for pl2303
 mousedev: PS/2 mouse device common for all mice
 genirq: Flags mismatch irq 16. 00002080 (at91_rtc) vs. 000152a0 
 (at91_tick)
 at91_rtc fffffeb0.rtc: IRQ 16 already in use.
 at91_rtc: probe of fffffeb0.rtc failed with error -16
 i2c /dev entries driver
 Driver for 1-wire Dallas network protocol.
 leds-gpio leds.3: pins are not configured from the driver
 ledtrig-cpu: registered to indicate activity on CPUs
 usbcore: registered new interface driver usbhid
 usbhid: USB HID core driver
 TCP: cubic registered
 NET: Registered protocol family 10
 sit: IPv6 over IPv4 tunneling driver
 NET: Registered protocol family 17
 Key type dns_resolver registered
 drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
 atmel_mci f0008000.mmc: version: 0x504
 atmel_mci f0008000.mmc: using dma0chan0 for DMA transfers
 atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 22, 1 
 slots
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 Waiting 1sec before mounting root device...
 mmc0: host does not support reading read-only switch. assuming 
 write-enable.
 mmc0: new high speed SDHC card at address 0002
 mmcblk0: mmc0:0002 00000 14.9 GiB
  mmcblk0: p1 p2 p3
 EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: 
 (null)
 VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
 devtmpfs: mounted
 Freeing unused kernel memory: 152K (c0450000 - c0476000)
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 udevd[620]: starting version 175
 ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
 at91_ohci 600000.ohci: AT91 OHCI
 at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
 at91_ohci 600000.ohci: irq 29, io mem 0x00600000
 usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
 at91_i2c f8010000.i2c: using dma0chan1 (tx) and dma0chan2 (rx) for DMA 
 transfers
 at91_i2c f8010000.i2c: AT91 i2c bus driver.
 usb usb2: Product: AT91 OHCI
 usb usb2: Manufacturer: Linux 3.10.9-rt5 ohci_hcd
 usb usb2: SerialNumber: at91
 hub 2-0:1.0: USB hub found
 hub 2-0:1.0: 3 ports detected
 EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
 EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
 EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: 
 (null)
 IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
 macb f802c000.ethernet eth0: link up (100/Full)
 IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq

 [ the last two lines are repeated several times, then the system hangs 
 ]

 CONFIG_PREEMPT_RTB:
 Starting linux kernel ..., machid: 0x1035
 
 Uncompressing Linux... done, booting the kernel.
 Booting Linux on physical CPU 0x0
 Linux version 3.10.9-rt5 (mitarbeiter@ariag25-dev) (gcc version 4.7.3 
 (Ubuntu/L3
 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
 CPU: VIVT data cache, VIVT instruction cache
 Machine: Atmel AT91SAM (Device Tree), model: Acme Systems Aria G25
 Memory policy: ECC disabled, Data cache writeback
 AT91: Detected soc type: at91sam9x5
 AT91: Detected soc subtype: at91sam9g25
 AT91: sram at 0x300000 of 0x8000 mapped at 0xfef70000
 DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
 Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 
 65024
 Kernel command line: mem=256M console=ttyS0,115200 root=/dev/mmcblk0p2 
 rootfsty1
 PID hash table entries: 1024 (order: 0, 4096 bytes)
 Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
 Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
 Memory: 256MB = 256MB total
 Memory: 254864k/254864k available, 7280k reserved, 0K highmem
 Virtual kernel memory layout:
     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
     modules : 0xbf000000 - 0xc0000000   (  16 MB)
       .text : 0xc0008000 - 0xc045b484   (4430 kB)
       .init : 0xc045c000 - 0xc048239c   ( 153 kB)
       .data : 0xc0484000 - 0xc04b2a80   ( 187 kB)
        .bss : 0xc04b2a80 - 0xc04d3a08   ( 132 kB)
 SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 Preemptible hierarchical RCU implementation.
 NR_IRQS:16 nr_irqs:16 16
 ------------[ cut here ]------------
 WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x190()
 Trying to free already-free IRQ 1
 Modules linked in:
 CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.9-rt5 #5
 [<c000d000>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c0015768>] 
 (warn_slowpath_common+0x4)
 [<c0015768>] (warn_slowpath_common+0x4c/0x68) from [<c0015804>] 
 (warn_slowpath_)
 [<c0015804>] (warn_slowpath_fmt+0x2c/0x3c) from [<c0050b5c>] 
 (__free_irq+0x90/0)
 [<c0050b5c>] (__free_irq+0x90/0x190) from [<c0045408>] 
 (clockevents_set_mode+0x)
 [<c0045408>] (clockevents_set_mode+0x28/0x5c) from [<c004544c>] 
 (clockevents_sh)
 [<c004544c>] (clockevents_shutdown+0x10/0x20) from [<c0045720>] 
 (clockevents_ex)
 [<c0045720>] (clockevents_exchange_device+0x74/0x80) from [<c0045ab0>] 
 (tick_no)
 [<c0045ab0>] (tick_notify+0xec/0x2c0) from [<c0036ff8>] 
 (notifier_call_chain+0x)
 [<c0036ff8>] (notifier_call_chain+0x38/0x68) from [<c0037048>] 
 (raw_notifier_ca)
 [<c0037048>] (raw_notifier_call_chain+0x14/0x18) from [<c0045354>] 
 (clockevents)
 [<c0045354>] (clockevents_register_device+0x90/0x11c) from [<c045fabc>] 
 (time_i)
 [<c045fabc>] (time_init+0x1c/0x28) from [<c045c8c0>] 
 (start_kernel+0x1ac/0x300)
 [<c045c8c0>] (start_kernel+0x1ac/0x300) from [<20008040>] (0x20008040)
 ---[ end trace 1b75b31a2719ed1c ]---
 sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 
 3489660920ms
 Console: colour dummy device 80x30
 Calibrating delay loop... 198.76 BogoMIPS (lpj=775168)
 pid_max: default: 32768 minimum: 301
 Mount-cache hash table entries: 512
 CPU: Testing write buffer coherency: ok
 Setting up static identity map for 0xc033b200 - 0xc033b258
 devtmpfs: initialized
 pinctrl core: initialized pinctrl subsystem
 NET: Registered protocol family 16
 DMA: preallocated 256 KiB pool for atomic coherent allocations
 AT91: Power Management
 AT91: Starting after power-restored wakeup
 gpio-at91 fffff400.gpio: at address fefff400
 gpio-at91 fffff600.gpio: at address fefff600
 gpio-at91 fffff800.gpio: at address fefff800
 gpio-at91 fffffa00.gpio: at address fefffa00
 pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver
 ------------[ cut here ]------------
 WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x190()
 Trying to free already-free IRQ 1
 Modules linked in:
 CPU: 0 PID: 1 Comm: swapper Tainted: G        W    3.10.9-rt5 #5
 [<c000d000>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c0015768>] 
 (warn_slowpath_common+0x4)
 [<c0015768>] (warn_slowpath_common+0x4c/0x68) from [<c0015804>] 
 (warn_slowpath_)
 [<c0015804>] (warn_slowpath_fmt+0x2c/0x3c) from [<c0050b5c>] 
 (__free_irq+0x90/0)
 [<c0050b5c>] (__free_irq+0x90/0x190) from [<c0045408>] 
 (clockevents_set_mode+0x)
 [<c0045408>] (clockevents_set_mode+0x28/0x5c) from [<c00456d4>] 
 (clockevents_ex)
 [<c00456d4>] (clockevents_exchange_device+0x28/0x80) from [<c0045ab0>] 
 (tick_no)
 [<c0045ab0>] (tick_notify+0xec/0x2c0) from [<c0036ff8>] 
 (notifier_call_chain+0x)
 [<c0036ff8>] (notifier_call_chain+0x38/0x68) from [<c0037048>] 
 (raw_notifier_ca)
 [<c0037048>] (raw_notifier_call_chain+0x14/0x18) from [<c0045354>] 
 (clockevents)
 [<c0045354>] (clockevents_register_device+0x90/0x11c) from [<c0475220>] 
 (tcb_cl)
 [<c0475220>] (tcb_clksrc_init+0x1f0/0x238) from [<c0008880>] 
 (do_one_initcall+0)
 [<c0008880>] (do_one_initcall+0x90/0x148) from [<c045cafc>] 
 (kernel_init_freeab)
 [<c045cafc>] (kernel_init_freeable+0xe8/0x1ac) from [<c03337ec>] 
 (kernel_init+0)
 [<c03337ec>] (kernel_init+0x8/0xe4) from [<c0009450>] 
 (ret_from_fork+0x14/0x24)
 ---[ end trace 1b75b31a2719ed1d ]---
 bio: create slab <bio-0> at 0
 at_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy slave 
 ), 8 chas
 at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy slave 
 ), 8 chas
 SCSI subsystem initialized
 usbcore: registered new interface driver usbfs
 usbcore: registered new interface driver hub
 usbcore: registered new device driver usb
 Switching to clocksource tcb_clksrc
 cfg80211: Calling CRDA to update world regulatory domain
 NET: Registered protocol family 2
 TCP established hash table entries: 2048 (order: 2, 16384 bytes)
 TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
 TCP: Hash tables configured (established 2048 bind 2048)
 TCP: reno registered
 UDP hash table entries: 256 (order: 0, 4096 bytes)
 UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 NET: Registered protocol family 1
 msgmni has been set to 497
 Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
 io scheduler noop registered (default)
 io scheduler deadline registered
 io scheduler cfq registered
 fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16) is a ATMEL_SERIAL
 console [ttyS0] enabled
 f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 23) is a ATMEL_SERIAL
 f8020000.serial: ttyS2 at MMIO 0xf8020000 (irq = 24) is a ATMEL_SERIAL
 brd: module loaded
 loop: module loaded
 atmel_spi f0000000.spi: version: 0x212
 atmel_spi f0000000.spi: DMA channel not available, SPI unable to use 
 DMA
 atmel_spi f0000000.spi: Atmel SPI Controller using PIO only
 atmel_spi f0000000.spi: Atmel SPI Controller at 0xf0000000 (irq 28)
 atmel_spi f0000000.spi: master is unqueued, this is deprecated
 macb f802c000.ethernet (unregistered net_device): invalid hw address, 
 using ranm
 libphy: MACB_mii_bus: probed
 macb f802c000.ethernet eth0: Cadence MACB at 0xf802c000 irq 25 
 (02:47:d1:42:ed:)
 macb f802c000.ethernet eth0: attached PHY driver [SMSC LAN8710/LAN8720] 
 (mii_bu)
 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 ehci-atmel: EHCI Atmel driver
 atmel-ehci 700000.ehci: EHCI Host Controller
 atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
 atmel-ehci 700000.ehci: irq 29, io mem 0x00700000
 atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
 usb usb1: Product: EHCI Host Controller
 usb usb1: Manufacturer: Linux 3.10.9-rt5 ehci_hcd
 usb usb1: SerialNumber: 700000.ehci
 hub 1-0:1.0: USB hub found
 hub 1-0:1.0: 3 ports detected
 usbcore: registered new interface driver usbserial
 usbcore: registered new interface driver usbserial_generic
 usbserial: USB Serial support registered for generic
 usbcore: registered new interface driver ftdi_sio
 usbserial: USB Serial support registered for FTDI USB Serial Device
 usbcore: registered new interface driver pl2303
 usbserial: USB Serial support registered for pl2303
 mousedev: PS/2 mouse device common for all mice
 genirq: Flags mismatch irq 16. 00002080 (at91_rtc) vs. 000152a0 
 (at91_tick)
 at91_rtc fffffeb0.rtc: IRQ 16 already in use.
 at91_rtc: probe of fffffeb0.rtc failed with error -16
 i2c /dev entries driver
 Driver for 1-wire Dallas network protocol.
 leds-gpio leds.3: pins are not configured from the driver
 ledtrig-cpu: registered to indicate activity on CPUs
 usbcore: registered new interface driver usbhid
 usbhid: USB HID core driver
 TCP: cubic registered
 NET: Registered protocol family 10
 sit: IPv6 over IPv4 tunneling driver
 NET: Registered protocol family 17
 Key type dns_resolver registered
 drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
 atmel_mci f0008000.mmc: version: 0x504
 atmel_mci f0008000.mmc: using dma0chan0 for DMA transfers
 atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 22, 1 
 slots
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 Waiting 1sec before mounting root device...
 mmc0: host does not support reading read-only switch. assuming 
 write-enable.
 mmc0: new high speed SDHC card at address 0002
 mmcblk0: mmc0:0002 00000 14.9 GiB
  mmcblk0: p1 p2 p3
 EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: 
 (null)
 VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
 devtmpfs: mounted
 Freeing unused kernel memory: 152K (c045c000 - c0482000)
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0 
 (at91_tick)
 atmel_serial: atmel_startup - Can't get irq
 udevd[614]: starting version 175
 ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
 at91_ohci 600000.ohci: AT91 OHCI
 at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
 at91_ohci 600000.ohci: irq 29, io mem 0x00600000
 at91_i2c f8010000.i2c: using dma0chan1 (tx) and dma0chan2 (rx) for DMA 
 transfers
 usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
 at91_i2c f8010000.i2c: AT91 i2c bus driver.
 usb usb2: Product: AT91 OHCI
 usb usb2: Manufacturer: Linux 3.10.9-rt5 ohci_hcd
 usb usb2: SerialNumber: at91
 hub 2-0:1.0: USB hub found
 hub 2-0:1.0: 3 ports detected
 EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
 EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
 ------------[ cut here ]------------
 Kernel BUG at c011cd20 [verbose debug info unavailable]
 Internal error: Oops - BUG: 0 [#1] PREEMPT ARM
 Modules linked in: i2c_at91 ohci_hcd
 CPU: 0 PID: 853 Comm: checkroot.sh Tainted: G        W    3.10.9-rt5 #5
 task: cf892b80 ti: cecd2000 task.ti: cecd2000
 PC is at do_get_write_access+0x320/0x474
 LR is at do_get_write_access+0x320/0x474
 pc : [<c011cd20>]    lr : [<c011cd20>]    psr: 20000013
 sp : cecd3d00  ip : 000002a4  fp : c0496328
 r10: cf898c00  r9 : ffff6f0d  r8 : cf499460
 r7 : 00000000  r6 : cf4ed000  r5 : cf40b100  r4 : cf4e8b80
 r3 : cecd2000  r2 : 00000002  r1 : 00000002  r0 : 00000001
 Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
 Control: 0005317f  Table: 2ed6c000  DAC: 00000015
 Process checkroot.sh (pid: 853, stack limit = 0xcecd21b8)
 Stack: (0xcecd3d00 to 0xcecd4000)
 3d00: 00000000 cecd3d10 cecd3d40 cfff5000 cf801580 cf499460 c0340024 
 c008a29c
 3d20: 00000029 cf40b100 cf499460 cf4e8b80 cf499460 cf40b100 c0343620 
 000000f7
 3d40: cecd3dc6 cfbae960 c0340024 c011cfb8 cf40b100 cf4f0948 cf499460 
 c010762c
 3d60: c0343620 000000f7 cf4f0948 cf499460 cf898800 00000000 cf996600 
 c00e7290
 3d80: cf8188d0 cf402a18 00000000 00000000 00000000 00000000 00000000 
 00000000
 3da0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
 00000000
 3dc0: 00000000 002f0000 cfbae960 cf4f0948 cfbae960 c00e71e8 cfbae968 
 cecd3e7c
 3de0: c0340024 c008d574 cecd3e7c 00000000 cfbae960 cecd3e80 cfbae960 
 c008d64c
 3e00: cecd3ec0 c009b7d4 cecd3ec0 cf423438 cecd2000 ced47015 00000000 
 00020020
 3e20: 00000000 00000000 cf8188d0 cf4135d8 00000000 00000021 73e14981 
 cf4f0948
 3e40: 00000000 00000000 ffffff9c cecd3ec0 00000000 cfbae960 cecd2000 
 cecd3f38
 3e60: 0002fbc4 c0340024 00000001 c009ba84 cecd3e7c 00000001 00000000 
 00000000
 3e80: cf8188d0 cf442d48 00000000 b6e68000 000005b7 c0340024 00000001 
 cecd3f38
 3ea0: ffffff9c 00000001 0002fbc4 0002fbb8 00000001 c009c090 00000041 
 ceca14b8
 3ec0: cf8188d0 cf442d48 73e14981 00000008 ced47015 c0099628 00000000 
 cf402a18
 3ee0: cf4f0948 00000101 00000002 00000000 00000000 b6e688da cecd3fb0 
 00000003
 3f00: cf801d80 cf892b80 0002fbb8 c008a29c c04c5f78 cf892b80 00000000 
 ced47010
 3f20: cecd2000 cf892b80 ced47010 c0093bf0 cf892b80 cecd2000 ced47010 
 00000000
 3f40: 00000000 00000000 cfacea00 cecd2000 cf892b80 ced47010 00000001 
 c0094fe4
 3f60: 00000ff0 0002fbf4 00000000 cf892cbc 00000000 ced47000 0002fbc4 
 0002fbb8
 3f80: 0000000b c0009524 cecd2000 00000000 0002fbb8 c0095518 0002fbb8 
 0002fbf4
 3fa0: 0002fbc4 c00093c0 0002fbb8 0002fbf4 0002fbf4 0002fbb8 0002fbc4 
 00000000
 3fc0: 0002fbb8 0002fbf4 0002fbc4 0000000b 0002fbc4 000277bc 00025764 
 0002fbb8
 3fe0: b6ef1160 be8602b0 0000ce34 b6ef116c 60000010 0002fbf4 00004000 
 001a0a42
 [<c011cd20>] (do_get_write_access+0x320/0x474) from [<c011cfb8>] 
 (jbd2_journal_)
 [<c011cfb8>] (jbd2_journal_get_write_access+0x24/0x38) from 
 [<c010762c>] (__ext)
 [<c010762c>] (__ext4_journal_get_write_access+0x50/0x68) from 
 [<c00e7290>] (ext)
 [<c00e7290>] (ext4_file_open+0xa8/0x1f4) from [<c008d574>] 
 (do_dentry_open.isra)
 [<c008d574>] (do_dentry_open.isra.14+0x1b8/0x26c) from [<c008d64c>] 
 (finish_ope)
 [<c008d64c>] (finish_open+0x24/0x38) from [<c009b7d4>] 
 (do_last.isra.46+0x91c/0)
 [<c009b7d4>] (do_last.isra.46+0x91c/0xb24) from [<c009ba84>] 
 (path_openat+0xa8/)
 [<c009ba84>] (path_openat+0xa8/0x404) from [<c009c090>] 
 (do_filp_open+0x2c/0x78)
 [<c009c090>] (do_filp_open+0x2c/0x78) from [<c0093bf0>] 
 (open_exec+0x34/0x11c)
 [<c0093bf0>] (open_exec+0x34/0x11c) from [<c0094fe4>] 
 (do_execve+0x1a0/0x49c)
 [<c0094fe4>] (do_execve+0x1a0/0x49c) from [<c0095518>] 
 (SyS_execve+0x30/0x44)
 [<c0095518>] (SyS_execve+0x30/0x44) from [<c00093c0>] 
 (ret_fast_syscall+0x0/0x2)
 Code: 1a000003 ea000032 e3a00001 ebfc72f8 (e7f001f2)
 ---[ end trace 1b75b31a2719ed1f ]---
 note: checkroot.sh[853] exited with preempt_count 2
 BUG: scheduling while atomic: checkroot.sh/853/0x40000003
 Modules linked in: i2c_at91 ohci_hcd
 Preemption disabled at:[<  (null)>]   (null)
 
 CPU: 0 PID: 853 Comm: checkroot.sh Tainted: G      D W    3.10.9-rt5 #5
 [<c000d000>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c0335760>] 
 (__schedule_bug+0x7c/0xa0)
 [<c0335760>] (__schedule_bug+0x7c/0xa0) from [<c0339868>] 
 (__schedule+0x58/0x2e)
 [<c0339868>] (__schedule+0x58/0x2e0) from [<c0039c6c>] 
 (__cond_resched+0x20/0x3)
 [<c0039c6c>] (__cond_resched+0x20/0x38) from [<c0339b84>] 
 (_cond_resched+0x3c/0)
 [<c0339b84>] (_cond_resched+0x3c/0x44) from [<c00a7280>] 
 (put_files_struct+0x80)
 [<c00a7280>] (put_files_struct+0x80/0xd0) from [<c001a450>] 
 (do_exit+0x32c/0x86)
 [<c001a450>] (do_exit+0x32c/0x86c) from [<c000b7a8>] (die+0x218/0x254)
 [<c000b7a8>] (die+0x218/0x254) from [<c00085b0>] 
 (do_undefinstr+0x1ac/0x1cc)
 [<c00085b0>] (do_undefinstr+0x1ac/0x1cc) from [<c00090cc>] 
 (__und_svc_finish+0x)
 Exception stack(0xcecd3cb8 to 0xcecd3d00)
 3ca0:                                                       00000001 
 00000002
 3cc0: 00000002 cecd2000 cf4e8b80 cf40b100 cf4ed000 00000000 cf499460 
 ffff6f0d
 3ce0: cf898c00 c0496328 000002a4 cecd3d00 c011cd20 c011cd20 20000013 
 ffffffff
 [<c00090cc>] (__und_svc_finish+0x0/0x14) from [<c011cd20>] 
 (do_get_write_access)
 [<c011cd20>] (do_get_write_access+0x320/0x474) from [<c011cfb8>] 
 (jbd2_journal_)
 [<c011cfb8>] (jbd2_journal_get_write_access+0x24/0x38) from 
 [<c010762c>] (__ext)
 [<c010762c>] (__ext4_journal_get_write_access+0x50/0x68) from 
 [<c00e7290>] (ext)
 [<c00e7290>] (ext4_file_open+0xa8/0x1f4) from [<c008d574>] 
 (do_dentry_open.isra)
 [<c008d574>] (do_dentry_open.isra.14+0x1b8/0x26c) from [<c008d64c>] 
 (finish_ope)
 [<c008d64c>] (finish_open+0x24/0x38) from [<c009b7d4>] 
 (do_last.isra.46+0x91c/0)
 [<c009b7d4>] (do_last.isra.46+0x91c/0xb24) from [<c009ba84>] 
 (path_openat+0xa8/)
 [<c009ba84>] (path_openat+0xa8/0x404) from [<c009c090>] 
 (do_filp_open+0x2c/0x78)
 [<c009c090>] (do_filp_open+0x2c/0x78) from [<c0093bf0>] 
 (open_exec+0x34/0x11c)
 [<c0093bf0>] (open_exec+0x34/0x11c) from [<c0094fe4>] 
 (do_execve+0x1a0/0x49c)
 [<c0094fe4>] (do_execve+0x1a0/0x49c) from [<c0095518>] 
 (SyS_execve+0x30/0x44)
 [<c0095518>] (SyS_execve+0x30/0x44) from [<c00093c0>] 
 (ret_fast_syscall+0x0/0x2)
 BUG: scheduling while atomic: checkroot.sh/853/0x40000003
 Modules linked in: i2c_at91 ohci_hcd
 Preemption disabled at:[<  (null)>]   (null)
 
 CPU: 0 PID: 853 Comm: checkroot.sh Tainted: G      D W    3.10.9-rt5 #5
 [<c000d000>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c0335760>] 
 (__schedule_bug+0x7c/0xa0)
 [<c0335760>] (__schedule_bug+0x7c/0xa0) from [<c0339868>] 
 (__schedule+0x58/0x2e)
 [<c0339868>] (__schedule+0x58/0x2e0) from [<c0039c6c>] 
 (__cond_resched+0x20/0x3)
 [<c0039c6c>] (__cond_resched+0x20/0x38) from [<c0339b84>] 
 (_cond_resched+0x3c/0)
 [<c0339b84>] (_cond_resched+0x3c/0x44) from [<c002fd98>] 
 (task_work_run+0x94/0x)
 [<c002fd98>] (task_work_run+0x94/0xa4) from [<c001a464>] 
 (do_exit+0x340/0x86c)
 [<c001a464>] (do_exit+0x340/0x86c) from [<c000b7a8>] (die+0x218/0x254)
 [<c000b7a8>] (die+0x218/0x254) from [<c00085b0>] 
 (do_undefinstr+0x1ac/0x1cc)
 [<c00085b0>] (do_undefinstr+0x1ac/0x1cc) from [<c00090cc>] 
 (__und_svc_finish+0x)
 Exception stack(0xcecd3cb8 to 0xcecd3d00)
 3ca0:                                                       00000001 
 00000002
 3cc0: 00000002 cecd2000 cf4e8b80 cf40b100 cf4ed000 00000000 cf499460 
 ffff6f0d
 3ce0: cf898c00 c0496328 000002a4 cecd3d00 c011cd20 c011cd20 20000013 
 ffffffff
 [<c00090cc>] (__und_svc_finish+0x0/0x14) from [<c011cd20>] 
 (do_get_write_access)
 [<c011cd20>] (do_get_write_access+0x320/0x474) from [<c011cfb8>] 
 (jbd2_journal_)
 [<c011cfb8>] (jbd2_journal_get_write_access+0x24/0x38) from 
 [<c010762c>] (__ext)
 [<c010762c>] (__ext4_journal_get_write_access+0x50/0x68) from 
 [<c00e7290>] (ext)
 [<c00e7290>] (ext4_file_open+0xa8/0x1f4) from [<c008d574>] 
 (do_dentry_open.isra)
 [<c008d574>] (do_dentry_open.isra.14+0x1b8/0x26c) from [<c008d64c>] 
 (finish_ope)
 [<c008d64c>] (finish_open+0x24/0x38) from [<c009b7d4>] 
 (do_last.isra.46+0x91c/0)
 [<c009b7d4>] (do_last.isra.46+0x91c/0xb24) from [<c009ba84>] 
 (path_openat+0xa8/)
 [<c009ba84>] (path_openat+0xa8/0x404) from [<c009c090>] 
 (do_filp_open+0x2c/0x78)
 [<c009c090>] (do_filp_open+0x2c/0x78) from [<c0093bf0>] 
 (open_exec+0x34/0x11c)
 [<c0093bf0>] (open_exec+0x34/0x11c) from [<c0094fe4>] 
 (do_execve+0x1a0/0x49c)
 [<c0094fe4>] (do_execve+0x1a0/0x49c) from [<c0095518>] 
 (SyS_execve+0x30/0x44)
 [<c0095518>] (SyS_execve+0x30/0x44) from [<c00093c0>] 
 (ret_fast_syscall+0x0/0x2)
 ------------[ cut here ]------------
 Kernel BUG at c011cd20 [verbose debug info unavailable]
 Internal error: Oops - BUG: 0 [#2] PREEMPT ARM
 Modules linked in: i2c_at91 ohci_hcd
 CPU: 0 PID: 856 Comm: rm Tainted: G      D W    3.10.9-rt5 #5
 task: cf893cc0 ti: cecac000 task.ti: cecac000
 PC is at do_get_write_access+0x320/0x474
 LR is at do_get_write_access+0x320/0x474
 pc : [<c011cd20>]    lr : [<c011cd20>]    psr: 20000013
 sp : cecade20  ip : 000002a4  fp : c0496328
 r10: cf898c00  r9 : ffff6f49  r8 : cf4994a0
 r7 : 00000000  r6 : cf4ed000  r5 : cf40f340  r4 : cf4e8bc0
 r3 : cecac000  r2 : 00000002  r1 : 00000002  r0 : 00000001
 Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
 Control: 0005317f  Table: 2ec84000  DAC: 00000015
 Process rm (pid: 856, stack limit = 0xcecac1b8)
 Stack: (0xcecade20 to 0xcecae000)
 de20: 00000000 cecade30 c1034000 00001000 cf801580 cf4994a0 00000000 
 c008a29c
 de40: 02000029 cf40f340 cf4994a0 cf4e8bc0 cf4994a0 cf40f340 c0343d3b 
 00000871
 de60: 0001e0a0 c10345c4 00000000 c011cfb8 cf40f340 cf411668 cf4994a0 
 c010762c
 de80: c0343d3b 00000871 cf411668 cf42d438 cf40f340 cf4994a0 00000000 
 c00f6d7c
 dea0: 00000abd 00000018 ced46000 0001e0a0 cf40f340 c0107490 00000abd 
 cf4994a0
 dec0: cf42d438 cf411668 00000000 ced46000 cf40f340 c00f7ed0 0001e0a0 
 ffffff9c
 dee0: 00000000 c10345c4 cf442c38 cf442c38 cf411668 00000000 ced46000 
 cf442c38
 df00: 00000000 cf411668 00000000 ced46000 ffffff9c c009a4e4 cf411668 
 cf442c38
 df20: 00000000 cf42d438 cf442c38 c009a640 cf8188d0 cf406440 01afef23 
 00000004
 df40: ced46015 c0099628 00000000 cf402a18 cf411668 00000000 00000002 
 00000000
 df60: 00000000 00000000 00000000 00000000 0000000c 00000000 52209f99 
 14a171c4
 df80: 45984f0e 34f15674 0001f268 beb4bcdc 00000000 00000148 c0009524 
 cecac000
 dfa0: 00000000 c00093c0 0001f268 beb4bcdc ffffff9c 0001e0a0 00000000 
 00000000
 dfc0: 0001f268 beb4bcdc 00000000 00000148 0001e038 00000002 00000000 
 00000000
 dfe0: b6f2b760 beb4bb98 00009e50 b6f2b76c 60000010 ffffff9c 4a001a48 
 501c1010
 [<c011cd20>] (do_get_write_access+0x320/0x474) from [<c011cfb8>] 
 (jbd2_journal_)
 [<c011cfb8>] (jbd2_journal_get_write_access+0x24/0x38) from 
 [<c010762c>] (__ext)
 [<c010762c>] (__ext4_journal_get_write_access+0x50/0x68) from 
 [<c00f6d7c>] (ext)
 [<c00f6d7c>] (ext4_delete_entry+0x88/0x10c) from [<c00f7ed0>] 
 (ext4_unlink+0xe8)
 [<c00f7ed0>] (ext4_unlink+0xe8/0x24c) from [<c009a4e4>] 
 (vfs_unlink+0x5c/0xf4)
 [<c009a4e4>] (vfs_unlink+0x5c/0xf4) from [<c009a640>] 
 (do_unlinkat+0xc4/0x170)
 [<c009a640>] (do_unlinkat+0xc4/0x170) from [<c00093c0>] 
 (ret_fast_syscall+0x0/0)
 Code: 1a000003 ea000032 e3a00001 ebfc72f8 (e7f001f2)
 ---[ end trace 1b75b31a2719ed20 ]---
 note: rm[856] exited with preempt_count 2
 BUG: scheduling while atomic: rm/856/0x40000003
 Modules linked in: i2c_at91 ohci_hcd
 Preemption disabled at:[<  (null)>]   (null)
 
 CPU: 0 PID: 856 Comm: rm Tainted: G      D W    3.10.9-rt5 #5
 [<c000d000>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c0335760>] 
 (__schedule_bug+0x7c/0xa0)
 [<c0335760>] (__schedule_bug+0x7c/0xa0) from [<c0339868>] 
 (__schedule+0x58/0x2e)
 [<c0339868>] (__schedule+0x58/0x2e0) from [<c0039c6c>] 
 (__cond_resched+0x20/0x3)
 [<c0039c6c>] (__cond_resched+0x20/0x38) from [<c0339b84>] 
 (_cond_resched+0x3c/0)
 [<c0339b84>] (_cond_resched+0x3c/0x44) from [<c00a7280>] 
 (put_files_struct+0x80)
 [<c00a7280>] (put_files_struct+0x80/0xd0) from [<c001a450>] 
 (do_exit+0x32c/0x86)
 [<c001a450>] (do_exit+0x32c/0x86c) from [<c000b7a8>] (die+0x218/0x254)
 [<c000b7a8>] (die+0x218/0x254) from [<c00085b0>] 
 (do_undefinstr+0x1ac/0x1cc)
 [<c00085b0>] (do_undefinstr+0x1ac/0x1cc) from [<c00090cc>] 
 (__und_svc_finish+0x)
 Exception stack(0xcecaddd8 to 0xcecade20)
 ddc0:                                                       00000001 
 00000002
 dde0: 00000002 cecac000 cf4e8bc0 cf40f340 cf4ed000 00000000 cf4994a0 
 ffff6f49
 de00: cf898c00 c0496328 000002a4 cecade20 c011cd20 c011cd20 20000013 
 ffffffff
 [<c00090cc>] (__und_svc_finish+0x0/0x14) from [<c011cd20>] 
 (do_get_write_access)
 [<c011cd20>] (do_get_write_access+0x320/0x474) from [<c011cfb8>] 
 (jbd2_journal_)
 [<c011cfb8>] (jbd2_journal_get_write_access+0x24/0x38) from 
 [<c010762c>] (__ext)
 [<c010762c>] (__ext4_journal_get_write_access+0x50/0x68) from 
 [<c00f6d7c>] (ext)
 [<c00f6d7c>] (ext4_delete_entry+0x88/0x10c) from [<c00f7ed0>] 
 (ext4_unlink+0xe8)
 [<c00f7ed0>] (ext4_unlink+0xe8/0x24c) from [<c009a4e4>] 
 (vfs_unlink+0x5c/0xf4)
 [<c009a4e4>] (vfs_unlink+0x5c/0xf4) from [<c009a640>] 
 (do_unlinkat+0xc4/0x170)
 [<c009a640>] (do_unlinkat+0xc4/0x170) from [<c00093c0>] 
 (ret_fast_syscall+0x0/0)
 ------------[ cut here ]------------
 Kernel BUG at c011cd20 [verbose debug info unavailable]
 Internal error: Oops - BUG: 0 [#3] PREEMPT ARM
 Modules linked in: i2c_at91 ohci_hcd
 CPU: 0 PID: 850 Comm: logsave Tainted: G      D W    3.10.9-rt5 #5
 task: cf893140 ti: ced3c000 task.ti: ced3c000
 PC is at do_get_write_access+0x320/0x474
 LR is at do_get_write_access+0x320/0x474
 pc : [<c011cd20>]    lr : [<c011cd20>]    psr: 20000013
 sp : ced3dcd8  ip : 000002a4  fp : c0496328
 r10: cf898c00  r9 : ffff6f61  r8 : cf499500
 r7 : 00000000  r6 : cf4ed000  r5 : cf40b100  r4 : cf4e8b80
 r3 : ced3c000  r2 : 00000002  r1 : 00000002  r0 : 00000001
 Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
 Control: 0005317f  Table: 2ec18000  DAC: 00000015
 Process logsave (pid: 850, stack limit = 0xced3c1b8)
 Stack: (0xced3dcd8 to 0xced3e000)
 dcc0:                                                       00000000 
 ced3dce8
 dce0: cf898c00 00000000 ced3df78 c011c2cc ced3ddec c00a4dec 00000050 
 cf996600
 dd00: cf4eefd8 cf4e8b80 cf499500 cf40b100 c0343ddd 000009e8 cf4eefd8 
 00000000
 dd20: ced3df78 c011cfb8 cf40b100 cf4eefd8 cf499500 c010762c c0343ddd 
 000009e8
 dd40: cf4eefd8 cf499500 cf996600 cf499500 cf4eefb4 c00f72e0 00000000 
 cf4eefd8
 dd60: 00000000 c0107490 00001274 00000000 cf499500 cf4eefd8 ced3de00 
 00000000
 dd80: 00000000 c00efabc cf442700 00000000 cf801600 cf8188d0 ced3df78 
 c008a29c
 dda0: 0000a068 18ada959 ced3ddd8 ced3ddd8 00000000 cf4426e8 000081a0 
 0000a068
 ddc0: cf4eefd8 ced3de00 ced3df78 c00a61d8 cf4426e8 ced3de00 0000000b 
 18ada959
 dde0: cf4426e8 00000001 cf4eefd8 ced3dec0 cf818d20 ced3debc cf4eeda8 
 c008d6d4
 de00: 0000a068 c049994c cf818d20 cf4eefd8 00000000 00000000 0000000b 
 18ada959
 de20: 0000000b 18ada959 0000000b 18ada959 cf818d20 ced3dec0 cf818d20 
 ced3df00
 de40: 00000001 c009b884 00008060 cf818d20 ced3c000 ced4301e 00000000 
 00000241
 de60: 00000001 00000001 cf8188d0 cf442770 00000000 00000022 015547fe 
 cf4eefd8
 de80: cf8188d0 cf442770 ffffff9c ced3df00 00000000 cf818d20 ced3c000 
 ced43000
 dea0: ced3c000 ced3df78 bea85f18 c009ba84 ced3debc c003a1c0 00000000 
 00000002
 dec0: cf8188d0 cf4426e8 ced3defc c0339aa0 8ff9c445 ced3df78 00000001 
 ced43000
 dee0: ffffff9c c0009524 ced3c000 00000000 bea85f18 c009c090 00000041 
 ced3df40
 df00: cf8188d0 cf4426e8 595547fe 00000009 ced4301e c0099628 cf8188d0 
 cf402a18
 df20: cf4eefd8 00000301 00000002 00000000 00000000 00000001 00000003 
 cfa793c8
 df40: cfa793c0 ffffff9c bea85f18 c00a7480 00000241 00000001 ced43000 
 00000003
 df60: 00000001 ced43000 ffffff9c c008e520 ced3df6c 00000001 00000241 
 000081a4
 df80: 00000022 00000300 bea85ae0 00000001 00000241 000120ac 00000005 
 c0009524
 dfa0: 00000000 c00093c0 00000001 00000241 bea85f18 00000241 000001a4 
 00000000
 dfc0: 00000001 00000241 000120ac 00000005 00000003 bea85c34 00000000 
 bea85f18
 dfe0: 00012098 bea85b90 00008dac b6f0fcdc 60000010 bea85f18 41000048 
 50081000
 [<c011cd20>] (do_get_write_access+0x320/0x474) from [<c011cfb8>] 
 (jbd2_journal_)
 [<c011cfb8>] (jbd2_journal_get_write_access+0x24/0x38) from 
 [<c010762c>] (__ext)
 [<c010762c>] (__ext4_journal_get_write_access+0x50/0x68) from 
 [<c00f72e0>] (ext)
 [<c00f72e0>] (ext4_orphan_add+0x84/0x198) from [<c00efabc>] 
 (ext4_setattr+0x510)
 [<c00efabc>] (ext4_setattr+0x510/0x54c) from [<c00a61d8>] 
 (notify_change+0x210/)
 [<c00a61d8>] (notify_change+0x210/0x2fc) from [<c008d6d4>] 
 (do_truncate+0x74/0x)
 [<c008d6d4>] (do_truncate+0x74/0x98) from [<c009b884>] 
 (do_last.isra.46+0x9cc/0)
 [<c009b884>] (do_last.isra.46+0x9cc/0xb24) from [<c009ba84>] 
 (path_openat+0xa8/)
 [<c009ba84>] (path_openat+0xa8/0x404) from [<c009c090>] 
 (do_filp_open+0x2c/0x78)
 [<c009c090>] (do_filp_open+0x2c/0x78) from [<c008e520>] 
 (do_sys_open+0xe8/0x174)
 [<c008e520>] (do_sys_open+0xe8/0x174) from [<c00093c0>] 
 (ret_fast_syscall+0x0/0)
 Code: 1a000003 ea000032 e3a00001 ebfc72f8 (e7f001f2)
 ---[ end trace 1b75b31a2719ed21 ]---
 note: logsave[850] exited with preempt_count 2
 BUG: scheduling while atomic: logsave/850/0x40000003
 Modules linked in: i2c_at91 ohci_hcd
 Preemption disabled at:[<  (null)>]   (null)
 
 CPU: 0 PID: 850 Comm: logsave Tainted: G      D W    3.10.9-rt5 #5
 [<c000d000>] (unwind_backtrace+0x0/0xe0) from [<c000b58c>] 
 (show_stack+0x10/0x1)
 [<c000b58c>] (show_stack+0x10/0x14) from [<c0335760>] 
 (__schedule_bug+0x7c/0xa0)
 [<c0335760>] (__schedule_bug+0x7c/0xa0) from [<c0339868>] 
 (__schedule+0x58/0x2e)
 [<c0339868>] (__schedule+0x58/0x2e0) from [<c0039c6c>] 
 (__cond_resched+0x20/0x3)
 [<c0039c6c>] (__cond_resched+0x20/0x38) from [<c0339b84>] 
 (_cond_resched+0x3c/0)
 [<c0339b84>] (_cond_resched+0x3c/0x44) from [<c00a7280>] 
 (put_files_struct+0x80)
 [<c00a7280>] (put_files_struct+0x80/0xd0) from [<c001a450>] 
 (do_exit+0x32c/0x86)
 [<c001a450>] (do_exit+0x32c/0x86c) from [<c000b7a8>] (die+0x218/0x254)
 [<c000b7a8>] (die+0x218/0x254) from [<c00085b0>] 
 (do_undefinstr+0x1ac/0x1cc)
 [<c00085b0>] (do_undefinstr+0x1ac/0x1cc) from [<c00090cc>] 
 (__und_svc_finish+0x)
 Exception stack(0xced3dc90 to 0xced3dcd8)
 dc80:                                     00000001 00000002 00000002 
 ced3c000
 dca0: cf4e8b80 cf40b100 cf4ed000 00000000 cf499500 ffff6f61 cf898c00 
 c0496328
 dcc0: 000002a4 ced3dcd8 c011cd20 c011cd20 20000013 ffffffff
 [<c00090cc>] (__und_svc_finish+0x0/0x14) from [<c011cd20>] 
 (do_get_write_access)
 [<c011cd20>] (do_get_write_access+0x320/0x474) from [<c011cfb8>] 
 (jbd2_journal_)
 [<c011cfb8>] (jbd2_journal_get_write_access+0x24/0x38) from 
 [<c010762c>] (__ext)
 [<c010762c>] (__ext4_journal_get_write_access+0x50/0x68) from 
 [<c00f72e0>] (ext)
 [<c00f72e0>] (ext4_orphan_add+0x84/0x198) from [<c00efabc>] 
 (ext4_setattr+0x510)
 [<c00efabc>] (ext4_setattr+0x510/0x54c) from [<c00a61d8>] 
 (notify_change+0x210/)
 [<c00a61d8>] (notify_change+0x210/0x2fc) from [<c008d6d4>] 
 (do_truncate+0x74/0x)
 [<c008d6d4>] (do_truncate+0x74/0x98) from [<c009b884>] 
 (do_last.isra.46+0x9cc/0)
 [<c009b884>] (do_last.isra.46+0x9cc/0xb24) from [<c009ba84>] 
 (path_openat+0xa8/)
 [<c009ba84>] (path_openat+0xa8/0x404) from [<c009c090>] 
 (do_filp_open+0x2c/0x78)
 [<c009c090>] (do_filp_open+0x2c/0x78) from [<c008e520>] 
 (do_sys_open+0xe8/0x174)
 [<c008e520>] (do_sys_open+0xe8/0x174) from [<c00093c0>] 
 (ret_fast_syscall+0x0/0)



> Hello Michael
>
> We have encountered the same warnings with the Atmel SAMA5D35
> processor when using the RT_PREEMPT patch. We get the same warnings
> with both 3.6.9-rt21 and 3.10.9-rt5 kernels. However, the 3.6.9-rt21
> kernel boots just fine, and we also had problems booting the
> 3.10.9-rt5 kernel. Therefore these warnings and boot hanging might be
> unrelated.
>
> What's causing these warnings is still unknown, but at least we got
> the 3.10.9-rt5 kernel to boot. The boot problem seems to be caused by
> the TCB clock source (tcb_clksrc). You could try to unset the
> CONFIG_ATMEL_TCB_CLKSRC option, but this is not optimal configuration
> for rt.
>
> I have attached a patch which goes on top of the rt5 patch that seems
> to fix the boot hang issue. Could you please report the results if 
> you
> have time to test this patch? Please note that I have not yet done 
> any
> rt-tests with this patch.
>
> BR,
> Sami Pietikäinen
> Software Developer
> Wapice Ltd.
>
> --- a/drivers/clocksource/tcb_clksrc.c	2013-08-29 16:14:14.611335823 
> +0300
> +++ b/drivers/clocksource/tcb_clksrc.c	2013-08-29 16:16:28.129657272 
> +0300
> @@ -192,9 +192,13 @@
>  	clkevt.clk = t2_clk;
>  	tc_irqaction.dev_id = &clkevt;
>
> -	timer_clock = clk32k_divisor_idx;
> +	timer_clock = divisor_idx;
>
> -	clkevt.clkevt.cpumask = cpumask_of(0);
> +	if (!divisor)
> +		clkevt.freq = 32768;
> +	else
> +		clkevt.freq = clk_get_rate(t2_clk)/divisor;
> +	clkevt.clkevt.cpumask = cpumask_of(0);
>
>  	clockevents_config_and_register(&clkevt.clkevt, 32768, 1, 0xffff);
> --
> 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

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

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

* RE: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
  2013-09-01 10:40 ` Michael Langfinger
@ 2013-09-03  9:09   ` Sami Pietikäinen
  2013-10-11 10:09   ` Sebastian Andrzej Siewior
  1 sibling, 0 replies; 11+ messages in thread
From: Sami Pietikäinen @ 2013-09-03  9:09 UTC (permalink / raw)
  To: linux-rt-users@langfinger.org; +Cc: linux-rt-users@vger.kernel.org

Hello Michael,

Thank you for the boot logs. The warnings seem very similar to the ones we are seeing, so it is probably the same issue.

I am sorry to hear that the patch I sent earlier did not solve your problem. But as a matter of fact, it did not solve our problems completely either. Now that I enabled CONFIG_HIGH_RES_TIMERS the boot hang issue is back. So, the 3.10.10-rt7 kernel boots with CONFIG_ATMEL_TCB_CLKSRC set, but if I also enabled the high resolution timers the boot hangs (I did not change any other setting in menuconfig). The 3.6.9-rt21 kernel works with similar config just fine apart from the two boot warnings. I also did rt-tests with the 3.6.9-rt21 kernel, and I did not find anything abnormal.

I have attached boot logs for both the working 3.6.9-rt21 and the broken 3.10.10-rt7 kernels (I removed some unrelated product specific details from log). The 3.10.10-rt7 has the patch I sent earlier applied. I also noticed that when the clock source is changed to tcb_clksrc the printk timestamps are not incremented anymore (see 3.10.10-rt7 bootlog).

If anyone has any ideas about what could be causing these issues, I would be happy to hear all the ideas.

BR,
Sami Pietikäinen


3.10.10-rt7 broken kernel - bootlog
--------------------------------------------
## Booting kernel from Legacy Image at 22000000 ...
   Image Name:   Linux-3.10.10-rt7-custom
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2566432 Bytes = 2.4 MiB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.10.10-rt7-custom (gcc version 4.7.2 (GCC) ) #4 PREEMPT RT Mon Sep 2 14:20:21 EEST 2013
[    0.000000] CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Atmel SAMA5 (Device Tree), model: Atmel SAMA5D35-EK
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AT91: Detected soc type: sama5d3
[    0.000000] AT91: Detected soc subtype: sama5d35
[    0.000000] AT91: sram at 0x300000 of 0x20000 mapped at 0xfef58000
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] Clocks: CPU 528 MHz, master 132 MHz, main 12.000 MHz
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 loglevel=7 rootfstype=ubifs ubi.mtd=4 root=ubi0:rootfs mtdparts=(removed)
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 514692k/514692k available, 9596k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0469da0   (4488 kB)
[    0.000000]       .init : 0xc046a000 - 0xc048ca04   ( 139 kB)
[    0.000000]       .data : 0xc048e000 - 0xc04bd160   ( 189 kB)
[    0.000000]        .bss : 0xc04bd160 - 0xc04dd518   ( 129 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at linux-yocto-rt/3.10.10-rt7-r0/linux/kernel/irq/manage.c:1341 __free_irq+0x98/0x1bc()
[    0.000000] Trying to free already-free IRQ 1
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.10-rt7-custom #4
[    0.000000] [<c0011b18>] (unwind_backtrace+0x0/0xf8) from [<c0010610>] (show_stack+0x10/0x14)
[    0.000000] [<c0010610>] (show_stack+0x10/0x14) from [<c00198b4>] (warn_slowpath_common+0x4c/0x68)
[    0.000000] [<c00198b4>] (warn_slowpath_common+0x4c/0x68) from [<c0019964>] (warn_slowpath_fmt+0x30/0x40)
[    0.000000] [<c0019964>] (warn_slowpath_fmt+0x30/0x40) from [<c0053ffc>] (__free_irq+0x98/0x1bc)
[    0.000000] [<c0053ffc>] (__free_irq+0x98/0x1bc) from [<c0048ed0>] (clockevents_set_mode+0x28/0x5c)
[    0.000000] [<c0048ed0>] (clockevents_set_mode+0x28/0x5c) from [<c0048f14>] (clockevents_shutdown+0x10/0x20)
[    0.000000] [<c0048f14>] (clockevents_shutdown+0x10/0x20) from [<c0049228>] (clockevents_exchange_device+0x6c/0x7c)
[    0.000000] [<c0049228>] (clockevents_exchange_device+0x6c/0x7c) from [<c0049658>] (tick_notify+0x158/0x308)
[    0.000000] [<c0049658>] (tick_notify+0x158/0x308) from [<c003a790>] (notifier_call_chain+0x44/0x84)
[    0.000000] [<c003a790>] (notifier_call_chain+0x44/0x84) from [<c003a88c>] (raw_notifier_call_chain+0x18/0x20)
[    0.000000] [<c003a88c>] (raw_notifier_call_chain+0x18/0x20) from [<c0048de4>] (clockevents_register_device+0x60/0x124)
[    0.000000] [<c0048de4>] (clockevents_register_device+0x60/0x124) from [<c046caa4>] (time_init+0x1c/0x28)
[    0.000000] [<c046caa4>] (time_init+0x1c/0x28) from [<c046a8b4>] (start_kernel+0x19c/0x28c)
[    0.000000] [<c046a8b4>] (start_kernel+0x19c/0x28c) from [<20008070>] (0x20008070)
[    0.000000] ---[ end trace 0000000000000001 ]---
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[    0.000000] Console: colour dummy device 80x30
[    0.070000] Calibrating delay loop... 262.96 BogoMIPS (lpj=1314816)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.070000] CPU: Testing write buffer coherency: ok
[    0.080000] Setting up static identity map for 0xc034d6e0 - 0xc034d714
[    0.080000] devtmpfs: initialized
[    0.080000] pinctrl core: initialized pinctrl subsystem
[    0.080000] NET: Registered protocol family 16
[    0.080000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.110000] gpio-at91 fffff200.gpio: at address fefff200
[    0.110000] gpio-at91 fffff400.gpio: at address fefff400
[    0.110000] gpio-at91 fffff600.gpio: at address fefff600
[    0.120000] gpio-at91 fffff800.gpio: at address fefff800
[    0.120000] gpio-at91 fffffa00.gpio: at address fefffa00
[    0.120000] pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver
[    0.120000] ------------[ cut here ]------------
[    0.120000] WARNING: at linux-yocto-rt/3.10.10-rt7-r0/linux/kernel/irq/manage.c:1341 __free_irq+0x98/0x1bc()
[    0.120000] Trying to free already-free IRQ 1
[    0.120000] Modules linked in:
[    0.120000] CPU: 0 PID: 1 Comm: swapper Tainted: G        W    3.10.10-rt7-custom #4
[    0.120000] [<c0011b18>] (unwind_backtrace+0x0/0xf8) from [<c0010610>] (show_stack+0x10/0x14)
[    0.120000] [<c0010610>] (show_stack+0x10/0x14) from [<c00198b4>] (warn_slowpath_common+0x4c/0x68)
[    0.120000] [<c00198b4>] (warn_slowpath_common+0x4c/0x68) from [<c0019964>] (warn_slowpath_fmt+0x30/0x40)
[    0.120000] [<c0019964>] (warn_slowpath_fmt+0x30/0x40) from [<c0053ffc>] (__free_irq+0x98/0x1bc)
[    0.120000] [<c0053ffc>] (__free_irq+0x98/0x1bc) from [<c0048ed0>] (clockevents_set_mode+0x28/0x5c)
[    0.120000] [<c0048ed0>] (clockevents_set_mode+0x28/0x5c) from [<c00491e0>] (clockevents_exchange_device+0x24/0x7c)
[    0.120000] [<c00491e0>] (clockevents_exchange_device+0x24/0x7c) from [<c0049658>] (tick_notify+0x158/0x308)
[    0.120000] [<c0049658>] (tick_notify+0x158/0x308) from [<c003a790>] (notifier_call_chain+0x44/0x84)
[    0.120000] [<c003a790>] (notifier_call_chain+0x44/0x84) from [<c003a88c>] (raw_notifier_call_chain+0x18/0x20)
[    0.120000] [<c003a88c>] (raw_notifier_call_chain+0x18/0x20) from [<c0048de4>] (clockevents_register_device+0x60/0x124)
[    0.120000] [<c0048de4>] (clockevents_register_device+0x60/0x124) from [<c047f524>] (tcb_clksrc_init+0x20c/0x248)
[    0.120000] [<c047f524>] (tcb_clksrc_init+0x20c/0x248) from [<c0008714>] (do_one_initcall+0xec/0x14c)
[    0.120000] [<c0008714>] (do_one_initcall+0xec/0x14c) from [<c046aa8c>] (kernel_init_freeable+0xe8/0x1ac)
[    0.120000] [<c046aa8c>] (kernel_init_freeable+0xe8/0x1ac) from [<c034643c>] (kernel_init+0x8/0xe4)
[    0.120000] [<c034643c>] (kernel_init+0x8/0xe4) from [<c000e198>] (ret_from_fork+0x14/0x3c)
[    0.120000] ---[ end trace 0000000000000002 ]---
[    0.160000] bio: create slab <bio-0> at 0
[    0.160000] at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels
[    0.170000] at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels
[    0.180000] SCSI subsystem initialized
[    0.180000] usbcore: registered new interface driver usbfs
[    0.180000] usbcore: registered new interface driver hub
[    0.180000] usbcore: registered new device driver usb
[    0.180000] at91_i2c f0018000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
[    0.180000] at91_i2c f0018000.i2c: AT91 i2c bus driver.
[    0.190000] cfg80211: Calling CRDA to update world regulatory domain
[    0.190000] Switching to clocksource tcb_clksrc
[    0.200000] NET: Registered protocol family 2
[    0.200000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.200000] TCP bind hash table entries: 4096 (order: 4, 98304 bytes)
[    0.200000] TCP: Hash tables configured (established 4096 bind 4096)
[    0.200000] TCP: reno registered
[    0.200000] UDP hash table entries: 256 (order: 2, 16384 bytes)
[    0.200000] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
[    0.200000] NET: Registered protocol family 1
[    0.200000] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.200000] msgmni has been set to 1005
[    0.200000] io scheduler noop registered (default)
[    0.200000] f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 22) is a ATMEL_SERIAL
[    0.200000] ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 35) is a ATMEL_SERIAL
[    0.200000] console [ttyS0] enabled
[    0.200000] brd: module loaded
[    0.200000] loop: module loaded
[    0.200000] atmel_nand: Use On Flash BBT
[    0.200000] atmel_nand 60000000.nand: No DMA support for NAND access.
[    0.200000] ONFI param page 0 valid
[    0.200000] ONFI flash detected
[    0.200000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64
[    0.200000] atmel_nand 60000000.nand: ONFI params, minimum required ECC: 4 bits in 512 bytes
[    0.200000] atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
[    0.200000] Bad block table found at page 131008, version 0x01
[    0.200000] Bad block table found at page 130944, version 0x01
[    0.200000] 8 cmdlinepart partitions found on MTD device atmel_nand
[    0.200000] Creating 8 MTD partitions on "atmel_nand":
(mtd parts removed)
[    0.200000] CAN device driver interface
[    0.200000] at91_can f000c000.can: device registered (reg_base=e08c6000, irq=19)
[    0.200000] at91_can f8010000.can: device registered (reg_base=e08c8000, irq=26)
[    0.200000] macb f0028000.ethernet (unregistered net_device): invalid hw address, using random
[    0.200000] libphy: MACB_mii_bus: probed
[    0.200000] macb f0028000.ethernet eth0: Cadence GEM at 0xf0028000 irq 23 (fe:bc:54:42:20:93)
[    0.200000] macb f0028000.ethernet eth0: attached PHY driver [Micrel KSZ9021 Gigabit PHY] (mii_bus:phy_addr=f0028000.etherne:01, irq=-1)
[    0.200000] libphy: MACB_mii_bus: probed
[    0.200000] macb f802c000.ethernet eth1: Cadence MACB at 0xf802c000 irq 29 (76:db:c9:81:54:98)
[    0.200000] macb f802c000.ethernet eth1: attached PHY driver [Micrel KSZ8031] (mii_bus:phy_addr=f802c000.etherne:00, irq=-1)
[    0.200000] PPP generic driver version 2.4.2
[    0.200000] PPP BSD Compression module registered
[    0.200000] PPP Deflate Compression module registered
[    0.200000] NET: Registered protocol family 24
[    0.200000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.200000] ehci-atmel: EHCI Atmel driver
[    0.200000] atmel-ehci 700000.ehci: EHCI Host Controller
[    0.200000] atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
[    0.200000] atmel-ehci 700000.ehci: irq 43, io mem 0x00700000
Boot hangs here (the ehci is not the problem, boot hangs even if I disable the USB completely)...


3.6.9-rt21 working kernel - bootlog
--------------------------------------------
## Booting kernel from Legacy Image at 22000000 ...
   Image Name:   Linux-3.6.9-rt21-custom
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2428382 Bytes = 2.3 MiB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.6.9-rt21-custom (gcc version 4.7.2 (GCC) ) #1 PREEMPT RT Mon Sep 2 15:09:34 EEST 2013
[    0.000000] CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Atmel SAMA5 (Device Tree)
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AT91: Detected soc type: sama5d3
[    0.000000] AT91: Detected soc subtype: sama5d35
[    0.000000] AT91: sram at 0x300000 of 0x20000 mapped at 0xfef58000
[    0.000000] Clocks: CPU 528 MHz, master 132 MHz, main 12.000 MHz
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 loglevel=7 rootfstype=ubifs ubi.mtd=4 root=rootfs mtdparts=(removed)
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 515008k/515008k available, 9280k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc042c8a8   (4243 kB)
[    0.000000]       .init : 0xc042d000 - 0xc0450544   ( 142 kB)
[    0.000000]       .data : 0xc0452000 - 0xc047de98   ( 176 kB)
[    0.000000]        .bss : 0xc047debc - 0xc048fb00   (  72 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at linux-yocto-rt/3.6.9-rt21+linux4sam_4.0-r1/linux/kernel/irq/manage.c:1230 __free_irq+0x9c/0x1c8()
[    0.000000] Trying to free already-free IRQ 1
[    0.000000] Modules linked in:
[    0.000000] [<c0012114>] (unwind_backtrace+0x0/0xf8) from [<c0019518>] (warn_slowpath_common+0x4c/0x64)
[    0.000000] [<c0019518>] (warn_slowpath_common+0x4c/0x64) from [<c00195c4>] (warn_slowpath_fmt+0x30/0x40)
[    0.000000] [<c00195c4>] (warn_slowpath_fmt+0x30/0x40) from [<c0051060>] (__free_irq+0x9c/0x1c8)
[    0.000000] [<c0051060>] (__free_irq+0x9c/0x1c8) from [<c00464b0>] (clockevents_set_mode+0x28/0x5c)
[    0.000000] [<c00464b0>] (clockevents_set_mode+0x28/0x5c) from [<c00464f4>] (clockevents_shutdown+0x10/0x20)
[    0.000000] [<c00464f4>] (clockevents_shutdown+0x10/0x20) from [<c0046814>] (clockevents_exchange_device+0x6c/0x7c)
[    0.000000] [<c0046814>] (clockevents_exchange_device+0x6c/0x7c) from [<c0046ba4>] (tick_notify+0x140/0x2fc)
[    0.000000] [<c0046ba4>] (tick_notify+0x140/0x2fc) from [<c0038fd0>] (notifier_call_chain+0x44/0x84)
[    0.000000] [<c0038fd0>] (notifier_call_chain+0x44/0x84) from [<c00390cc>] (raw_notifier_call_chain+0x18/0x20)
[    0.000000] [<c00390cc>] (raw_notifier_call_chain+0x18/0x20) from [<c00463f0>] (clockevents_register_device+0x74/0x10c)
[    0.000000] [<c00463f0>] (clockevents_register_device+0x74/0x10c) from [<c0431038>] (time_init+0x20/0x30)
[    0.000000] [<c0431038>] (time_init+0x20/0x30) from [<c042d65c>] (start_kernel+0x1a4/0x2dc)
[    0.000000] [<c042d65c>] (start_kernel+0x1a4/0x2dc) from [<20008040>] (0x20008040)
[    0.000000] ---[ end trace 0000000000000001 ]---
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[    0.000000] Console: colour dummy device 80x30
[    0.070000] Calibrating delay loop... 262.96 BogoMIPS (lpj=1314816)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.070000] CPU: Testing write buffer coherency: ok
[    0.070000] Setting up static identity map for 0x2031d910 - 0x2031d944
[    0.080000] devtmpfs: initialized
[    0.080000] pinctrl core: initialized pinctrl subsystem
[    0.080000] NET: Registered protocol family 16
[    0.080000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.080000] AT91: error -22 while looking for mb-rev property, let assume we are using the latest one
[    0.110000] gpio-at91 fffff200.gpio: at address fefff200
[    0.110000] gpio-at91 fffff400.gpio: at address fefff400
[    0.110000] gpio-at91 fffff600.gpio: at address fefff600
[    0.110000] gpio-at91 fffff800.gpio: at address fefff800
[    0.110000] gpio-at91 fffffa00.gpio: at address fefffa00
[    0.110000] pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver
[    0.120000] ------------[ cut here ]------------
[    0.120000] WARNING: at linux-yocto-rt/3.6.9-rt21+linux4sam_4.0-r1/linux/kernel/irq/manage.c:1230 __free_irq+0x9c/0x1c8()
[    0.120000] Trying to free already-free IRQ 1
[    0.120000] Modules linked in:
[    0.120000] [<c0012114>] (unwind_backtrace+0x0/0xf8) from [<c0019518>] (warn_slowpath_common+0x4c/0x64)
[    0.120000] [<c0019518>] (warn_slowpath_common+0x4c/0x64) from [<c00195c4>] (warn_slowpath_fmt+0x30/0x40)
[    0.120000] [<c00195c4>] (warn_slowpath_fmt+0x30/0x40) from [<c0051060>] (__free_irq+0x9c/0x1c8)
[    0.120000] [<c0051060>] (__free_irq+0x9c/0x1c8) from [<c00464b0>] (clockevents_set_mode+0x28/0x5c)
[    0.120000] [<c00464b0>] (clockevents_set_mode+0x28/0x5c) from [<c00467cc>] (clockevents_exchange_device+0x24/0x7c)
[    0.120000] [<c00467cc>] (clockevents_exchange_device+0x24/0x7c) from [<c0046ba4>] (tick_notify+0x140/0x2fc)
[    0.120000] [<c0046ba4>] (tick_notify+0x140/0x2fc) from [<c0038fd0>] (notifier_call_chain+0x44/0x84)
[    0.120000] [<c0038fd0>] (notifier_call_chain+0x44/0x84) from [<c00390cc>] (raw_notifier_call_chain+0x18/0x20)
[    0.120000] [<c00390cc>] (raw_notifier_call_chain+0x18/0x20) from [<c00463f0>] (clockevents_register_device+0x74/0x10c)
[    0.120000] [<c00463f0>] (clockevents_register_device+0x74/0x10c) from [<c04435f4>] (tcb_clksrc_init+0x290/0x2cc)
[    0.120000] [<c04435f4>] (tcb_clksrc_init+0x290/0x2cc) from [<c00086d0>] (do_one_initcall+0x10c/0x170)
[    0.120000] [<c00086d0>] (do_one_initcall+0x10c/0x170) from [<c042d87c>] (kernel_init+0xe8/0x1a4)
[    0.120000] [<c042d87c>] (kernel_init+0xe8/0x1a4) from [<c000ea30>] (kernel_thread_exit+0x0/0x8)
[    0.120000] ---[ end trace 0000000000000002 ]---
[    0.150000] bio: create slab <bio-0> at 0
[    0.150000] at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels
[    0.160000] at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels
[    0.160000] SCSI subsystem initialized
[    0.170000] usbcore: registered new interface driver usbfs
[    0.170000] usbcore: registered new interface driver hub
[    0.170000] usbcore: registered new device driver usb
[    0.170000] at91_i2c f0018000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
[    0.170000] at91_i2c f0018000.i2c: AT91 i2c bus driver.
[    0.180000] cfg80211: Calling CRDA to update world regulatory domain
[    0.180000] Switching to clocksource tcb_clksrc
[    0.230000] NET: Registered protocol family 2
[    0.230000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.230000] TCP bind hash table entries: 16384 (order: 6, 393216 bytes)
[    0.230000] TCP: Hash tables configured (established 16384 bind 16384)
[    0.230000] TCP: reno registered
[    0.230000] UDP hash table entries: 256 (order: 2, 16384 bytes)
[    0.230000] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
[    0.230000] NET: Registered protocol family 1
[    0.240000] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.240000] msgmni has been set to 1005
[    0.240000] io scheduler noop registered (default)
[    0.250000] f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 22) is a ATMEL_SERIAL
[    0.250000] ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 35) is a ATMEL_SERIAL
[    1.000000] console [ttyS0] enabled
[    1.020000] brd: module loaded
[    1.030000] loop: module loaded
[    1.040000] atmel_nand 60000000.nand: Using NFC
[    1.050000] atmel_nand: Use On Flash BBT
[    1.050000] atmel_nand 60000000.nand: Using dma0chan2 for DMA transfers.
[    1.060000] ONFI param page 0 valid
[    1.060000] ONFI flash detected
[    1.070000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), page size: 2048, OOB size: 64
[    1.080000] ONFI params, minimum required ECC: 4
[    1.080000] atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512
[    1.090000] atmel_nand 60000000.nand: Using NFC Sram
[    1.090000] Bad block table found at page 131008, version 0x01
[    1.100000] Bad block table found at page 130944, version 0x01
[    1.110000] 8 cmdlinepart partitions found on MTD device atmel_nand
[    1.110000] Creating 8 MTD partitions on "atmel_nand":
(mtd parts removed)
[    1.190000] UBI: attaching mtd4 to ubi0
[    1.190000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    1.200000] UBI: logical eraseblock size:    126976 bytes
[    1.200000] UBI: smallest flash I/O unit:    2048
[    1.210000] UBI: VID header offset:          2048 (aligned 2048)
[    1.210000] UBI: data offset:                4096
[    1.320000] UBI: max. sequence number:       2
[    1.330000] UBI: attached mtd4 to ubi0
[    1.340000] UBI: MTD device name:            "root"
[    1.340000] UBI: MTD device size:            25 MiB
[    1.350000] UBI: number of good PEBs:        200
[    1.350000] UBI: number of bad PEBs:         0
[    1.360000] UBI: number of corrupted PEBs:   0
[    1.360000] UBI: max. allowed volumes:       128
[    1.370000] UBI: wear-leveling threshold:    4096
[    1.370000] UBI: number of internal volumes: 1
[    1.380000] UBI: number of user volumes:     1
[    1.380000] UBI: available PEBs:             0
[    1.380000] UBI: total number of reserved PEBs: 200
[    1.390000] UBI: number of PEBs reserved for bad PEB handling: 4
[    1.400000] UBI: max/mean erase counter: 1/0
[    1.400000] UBI: image sequence number:  435869262
[    1.400000] UBI: background thread "ubi_bgt0d" started, PID 398
[    1.410000] atmel_spi f0004000.spi: Using dma0chan3 (tx) and  dma0chan4 (rx) for DMA transfers
[    1.410000] atmel_spi f0004000.spi: Atmel SPI Controller at 0xf0004000 (irq 18)
[    1.410000] atmel_spi f0004000.spi: master is unqueued, this is deprecated
[    1.410000] m25p80 spi32766.0: at25df321a (4096 Kbytes)
[    1.420000] macb f0028000.ethernet: (unregistered net_device): invalid hw address, using random
[    1.430000] libphy: MACB_mii_bus: probed
[    1.430000] macb f0028000.ethernet: eth0: Cadence GEM at 0xf0028000 irq 23 (86:e5:f2:bd:a1:7d)
[    1.430000] macb f0028000.ethernet: eth0: attached PHY driver [Micrel KSZ9021 Gigabit PHY] (mii_bus:phy_addr=f0028000.etherne:01, irq=-1)
[    1.450000] libphy: MACB_mii_bus: probed
[    1.450000] macb f802c000.ethernet: eth1: Cadence MACB at 0xf802c000 irq 29 (76:db:c9:81:54:98)
[    1.450000] macb f802c000.ethernet: eth1: attached PHY driver [Micrel KSZ8051] (mii_bus:phy_addr=f802c000.etherne:00, irq=-1)
[    1.450000] PPP generic driver version 2.4.2
[    1.450000] PPP BSD Compression module registered
[    1.450000] PPP Deflate Compression module registered
[    1.450000] NET: Registered protocol family 24
[    1.450000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.450000] atmel-ehci 700000.ehci: Atmel EHCI UHP HS
[    1.450000] atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
[    1.450000] atmel-ehci 700000.ehci: irq 43, io mem 0x00700000
[    1.470000] atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
[    1.470000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.470000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.470000] usb usb1: Product: Atmel EHCI UHP HS
[    1.470000] usb usb1: Manufacturer: Linux 3.6.9-rt21-custom ehci_hcd
[    1.470000] usb usb1: SerialNumber: 700000.ehci
[    1.480000] hub 1-0:1.0: USB hub found
[    1.480000] hub 1-0:1.0: 3 ports detected
[    1.480000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.480000] at91_ohci 600000.ohci: AT91 OHCI
[    1.480000] at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
[    1.480000] at91_ohci 600000.ohci: irq 43, io mem 0x00600000
[    1.540000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
[    1.540000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.540000] usb usb2: Product: AT91 OHCI
[    1.540000] usb usb2: Manufacturer: Linux 3.6.9-rt21-custom ohci_hcd
[    1.540000] usb usb2: SerialNumber: at91
[    1.550000] hub 2-0:1.0: USB hub found
[    1.550000] hub 2-0:1.0: 3 ports detected
[    1.550000] usbcore: registered new interface driver cdc_acm
[    1.550000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.550000] Initializing USB Mass Storage driver...
[    1.550000] usbcore: registered new interface driver usb-storage
[    1.550000] USB Mass Storage support registered.
[    1.550000] at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
[    1.550000] AT91 Real Time Clock driver.
[    1.550000] i2c /dev entries driver
[    1.560000] at91sam9_wdt: enabled (heartbeat=30 sec, nowayout=0)
[    1.560000] usbcore: registered new interface driver usbhid
[    1.560000] usbhid: USB HID core driver
[    1.560000] iio iio:device0: Resolution used: 12 bits
[    1.560000] TCP: cubic registered
[    1.560000] NET: Registered protocol family 10
[    1.580000] sit: IPv6 over IPv4 tunneling driver
[    1.580000] NET: Registered protocol family 17
[    1.580000] lib80211: common routines for IEEE802.11 drivers
[    1.580000] VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
[    1.580000] input: gpio_keys.4 as /devices/gpio_keys.4/input/input0
[    1.580000] at91_rtc fffffeb0.rtc: setting system clock to 2013-09-03 07:24:34 UTC (1378193074)
[    1.580000] atmel_mci f0000000.mmc: version: 0x505
[    1.580000] atmel_mci f0000000.mmc: using dma0chan5 for DMA transfers
[    1.650000] atmel_mci f0000000.mmc: Atmel MCI controller at 0xf0000000 irq 17, 1 slots
[    1.650000] atmel_mci f8000000.mmc: version: 0x505
[    1.650000] atmel_mci f8000000.mmc: using dma1chan0 for DMA transfers
[    1.700000] atmel_mci f8000000.mmc: Atmel MCI controller at 0xf8000000 irq 25, 1 slots
[    1.700000] atmel_aes f8038000.aes: version: 0x135
[    1.710000] atmel_aes f8038000.aes: Atmel AES
[    1.710000] atmel_tdes f803c000.tdes: version: 0x701
[    1.720000] atmel_tdes f803c000.tdes: Atmel DES/TDES
[    1.720000] atmel_sha f8034000.sha: version: 0x410
[    1.720000] atmel_sha f8034000.sha: Atmel SHA1/SHA256
[    1.950000] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    1.960000] UBIFS: mounted read-only
[    1.960000] UBIFS: file system size:   22982656 bytes (22444 KiB, 21 MiB, 181 LEBs)
[    1.970000] UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
[    1.980000] UBIFS: media format:       w4/r0 (latest is w4/r0)
[    1.980000] UBIFS: default compressor: lzo
[    1.990000] UBIFS: reserved for root:  0 bytes (0 KiB)
[    1.990000] VFS: Mounted root (ubifs filesystem) readonly on device 0:11.
[    2.000000] devtmpfs: mounted
[    2.010000] Freeing init memory: 140K

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

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

* Re: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
  2013-09-01 10:40 ` Michael Langfinger
  2013-09-03  9:09   ` Sami Pietikäinen
@ 2013-10-11 10:09   ` Sebastian Andrzej Siewior
  2013-10-14  7:24     ` Sami Pietikäinen
  1 sibling, 1 reply; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-10-11 10:09 UTC (permalink / raw)
  To: Michael Langfinger; +Cc: Sami Pietikäinen, linux-rt-users

* Michael Langfinger | 2013-09-01 12:40:07 [+0200]:

>Hello Sami,
Hi Michael,

>I attached the output of the boot process (with your patch applied)
>below. The first one is from kernel 3.10.9-rt5 with
>CONFIG_PREEMPT_RT_FULL set, the second one is from kernel 3.10.9-rt5
>with CONFIG_PREEMPT_RTB.
>
>If you need any further information, please let me know!

The problem does not look -RT specific.
>
>Kind regards,
>Michael Langfinger
>
>
>Starting linux kernel ..., machid: 0x1035
>
>Uncompressing Linux... done, booting the kernel.
>NR_IRQS:16 nr_irqs:16 16
>------------[ cut here ]------------
>WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x1a8()
>Trying to free already-free IRQ 1

here someone calls free_irq() on IRQ1 but it was not requested.

>Modules linked in:
>------------[ cut here ]------------
>WARNING: at kernel/irq/manage.c:1268 __free_irq+0x90/0x1a8()
>Trying to free already-free IRQ 1
The same thing here
>Modules linked in:
>genirq: Flags mismatch irq 16. 00002080 (at91_rtc) vs. 000152a0
>(at91_tick)
The the RTC comes with IRF_ONESHOT but the tick does not want this.

>at91_rtc fffffeb0.rtc: IRQ 16 already in use.
>at91_rtc: probe of fffffeb0.rtc failed with error -16
>genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0
>(at91_tick)
>atmel_serial: atmel_startup - Can't get irq
The same is true for your uart (ttyS0). Since it can't get the interrupt
it will unregister and your console will be soon gone.

>Waiting 1sec before mounting root device...
>genirq: Flags mismatch irq 16. 00002080 (ttyS0) vs. 000152a0
>(at91_tick)
>atmel_serial: atmel_startup - Can't get irq
>
>[ the last two lines are repeated several times, then the system
>hangs ]

I don't understand why uart tries over and over to request that
interrupt but it simply doesn't work.
I am a little confused why at91 is having everything (or more than one
device) is on irq 16. It should have only one device on each
interrupt since they have usually dedicated irq lines.

Sebastian
--
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

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

* RE: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
  2013-10-11 10:09   ` Sebastian Andrzej Siewior
@ 2013-10-14  7:24     ` Sami Pietikäinen
  2013-10-18 14:03       ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 11+ messages in thread
From: Sami Pietikäinen @ 2013-10-14  7:24 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, Michael Langfinger
  Cc: linux-rt-users@vger.kernel.org

Hello Sebastian

>The problem does not look -RT specific.

I would say that at least the "Trying to free already-free IRQ 1" warning is somehow -RT specific. When I tested the 3.6.9 kernel without the RT patch there were no warnings (using SAMA5D35). The same warning Michael is having appeared only after applying the patch. However, the other problems Michael is having might also be something else.

>I don't understand why uart tries over and over to request that interrupt but it simply doesn't work.
>I am a little confused why at91 is having everything (or more than one
>device) is on irq 16. It should have only one device on each interrupt since they have usually dedicated irq lines.

arm-at91-tclib-default-to-tclib-timer-for-rt.patch has the following comment:
"RT is not too happy about the shared timer interrupt in AT91
devices. Default to tclib timer for RT."

Snippet from SAMA5D35 datasheet:
"Usually, the Debug Unit interrupt line connects to the interrupt source 1 of the AIC, which may be shared with the real-time clock, the system timer interrupt lines and other system peripheral interrupts"

The debug unit also has UART which is probably Michael's ttyS0.

BR,
Sami


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

* Re: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
  2013-10-14  7:24     ` Sami Pietikäinen
@ 2013-10-18 14:03       ` Sebastian Andrzej Siewior
  2013-10-23 12:19         ` Sami Pietikäinen
  0 siblings, 1 reply; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-10-18 14:03 UTC (permalink / raw)
  To: Sami Pietikäinen; +Cc: Michael Langfinger, linux-rt-users@vger.kernel.org

* Sami Pietikäinen | 2013-10-14 07:24:20 [+0000]:

>Hello Sebastian
Hello Sami,

>>The problem does not look -RT specific.
>
>I would say that at least the "Trying to free already-free IRQ 1" warning is somehow -RT specific. When I tested the 3.6.9 kernel without the RT patch there were no warnings (using SAMA5D35). The same warning Michael is having appeared only after applying the patch. However, the other problems Michael is having might also be something else.
>
>>I don't understand why uart tries over and over to request that interrupt but it simply doesn't work.
>>I am a little confused why at91 is having everything (or more than one
>>device) is on irq 16. It should have only one device on each interrupt since they have usually dedicated irq lines.
>
>arm-at91-tclib-default-to-tclib-timer-for-rt.patch has the following comment:
>"RT is not too happy about the shared timer interrupt in AT91
>devices. Default to tclib timer for RT."
>
>Snippet from SAMA5D35 datasheet:
>"Usually, the Debug Unit interrupt line connects to the interrupt source 1 of the AIC, which may be shared with the real-time clock, the system timer interrupt lines and other system peripheral interrupts"
>
>The debug unit also has UART which is probably Michael's ttyS0.

Argh. I missed that detail. So that explains why UART and the timer
share the same interrupt number. Is that timer really disabled in your
config?

>
>BR,
>Sami

Sebastian
--
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

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

* RE: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
  2013-10-18 14:03       ` Sebastian Andrzej Siewior
@ 2013-10-23 12:19         ` Sami Pietikäinen
  2013-10-28 13:59           ` Sami Pietikäinen
  0 siblings, 1 reply; 11+ messages in thread
From: Sami Pietikäinen @ 2013-10-23 12:19 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Michael Langfinger, linux-rt-users@vger.kernel.org


>Argh. I missed that detail. So that explains why UART and the timer share the same interrupt number. Is that timer really disabled in your config?
>
>Sebastian

Here are couple of snippets from my .config file that might be meaningful for this issue:
CONFIG_TICK_ONESHOT=y
# CONFIG_NO_HZ is not set
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_ATMEL_TCLIB=y
CONFIG_ATMEL_TCB_CLKSRC=y
CONFIG_ATMEL_TCB_CLKSRC_BLOCK=1
# CONFIG_ATMEL_TCB_CLKSRC_USE_SLOW_CLOCK is not set
CONFIG_RTC_DRV_AT91RM9200=y

The kernel probably uses the peripheral interrupt timer during the early boot (and therefore also the shared irq)? 
At least there is  "[    0.180000] Switching to clocksource tcb_clksrc" print later during the boot.

I actually found a new clue about this issue. 

If I don't patch the at91sam926x_time.c (arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch), 
there are no boot warnings with the 3.6.9-rt21 kernel. I still need to test if this also helps with the problems 
with 3.10.x kernel (same warnings + boot hangs).

BR,
Sami Pietikäinen

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

* RE: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
  2013-10-23 12:19         ` Sami Pietikäinen
@ 2013-10-28 13:59           ` Sami Pietikäinen
  2013-11-08 22:17             ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 11+ messages in thread
From: Sami Pietikäinen @ 2013-10-28 13:59 UTC (permalink / raw)
  To: Sami Pietikäinen, Sebastian Andrzej Siewior
  Cc: Michael Langfinger, linux-rt-users@vger.kernel.org

It seems that there is an irq number mismatch in the "arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch".
The patch adds setup_irq() and remove_irq() calls which have different irq number than the base driver.

If I'm correct, the irq number should be NR_IRQS_LEGACY + AT91_ID_SYS instead of only AT91_ID_SYS.

I have attached a fixed patch for 3.6.9-rt21. I tested it with SAMA5D35, and it removed the 
"Trying to free already-free IRQ 1" boot warnings.

BR,
Sami Pietikäinen

Index: linux-stable/arch/arm/mach-at91/at91rm9200_time.c
===================================================================
--- linux-stable.orig/arch/arm/mach-at91/at91rm9200_time.c
+++ linux-stable/arch/arm/mach-at91/at91rm9200_time.c
@@ -130,6 +130,7 @@ clkevt32k_mode(enum clock_event_mode mod
 		break;
 	case CLOCK_EVT_MODE_SHUTDOWN:
 	case CLOCK_EVT_MODE_UNUSED:
+		remove_irq(NR_IRQS_LEGACY + AT91_ID_SYS, &at91rm9200_timer_irq);
 	case CLOCK_EVT_MODE_RESUME:
 		irqmask = 0;
 		break;
Index: linux-stable/arch/arm/mach-at91/at91sam926x_time.c
===================================================================
--- linux-stable.orig/arch/arm/mach-at91/at91sam926x_time.c
+++ linux-stable/arch/arm/mach-at91/at91sam926x_time.c
@@ -67,7 +67,7 @@ static struct clocksource pit_clk = {
 	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-
+static struct irqaction at91sam926x_pit_irq;
 /*
  * Clockevent device:  interrupts every 1/HZ (== pit_cycles * MCK/16)
  */
@@ -76,6 +76,8 @@ pit_clkevt_mode(enum clock_event_mode mo
 {
 	switch (mode) {
 	case CLOCK_EVT_MODE_PERIODIC:
+		/* Set up irq handler */
+		setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq);
 		/* update clocksource counter */
 		pit_cnt += pit_cycle * PIT_PICNT(pit_read(AT91_PIT_PIVR));
 		pit_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN
@@ -88,6 +90,7 @@ pit_clkevt_mode(enum clock_event_mode mo
 	case CLOCK_EVT_MODE_UNUSED:
 		/* disable irq, leaving the clocksource active */
 		pit_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN);
+		remove_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq);
 		break;
 	case CLOCK_EVT_MODE_RESUME:
 		break;



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

* Re: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1"
  2013-10-28 13:59           ` Sami Pietikäinen
@ 2013-11-08 22:17             ` Sebastian Andrzej Siewior
  2013-11-09 20:37               ` Michael Langfinger
  0 siblings, 1 reply; 11+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-11-08 22:17 UTC (permalink / raw)
  To: Sami Pietikäinen; +Cc: Michael Langfinger, linux-rt-users@vger.kernel.org

* Sami Pietikäinen | 2013-10-28 13:59:53 [+0000]:

>It seems that there is an irq number mismatch in the "arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch".
>The patch adds setup_irq() and remove_irq() calls which have different irq number than the base driver.
>
>If I'm correct, the irq number should be NR_IRQS_LEGACY + AT91_ID_SYS instead of only AT91_ID_SYS.
>
>I have attached a fixed patch for 3.6.9-rt21. I tested it with SAMA5D35, and it removed the 
>"Trying to free already-free IRQ 1" boot warnings.

Michael, any feedback? Does this solve your problem, too?

>BR,
>Sami Pietikäinen

Sebastian
--
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

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

* Re: 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free  already-free IRQ 1"
  2013-11-08 22:17             ` Sebastian Andrzej Siewior
@ 2013-11-09 20:37               ` Michael Langfinger
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Langfinger @ 2013-11-09 20:37 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Sami Pietikäinen, linux-rt-users

 Hello Sebastian,

 sorry, I had so many other things on my mind in the last few weeks that 
 I totally forgot to keep you updated about the matter.

 Yes, the patch from Sami solves my problem, I tested the patch with 
 kernel 3.10.17-rt12. The system boots just fine, no more warnings and 
 the serial console is back, too. Thanks a lot, Sami! The only remaining 
 problem for now seems to be that the system does not boot if I enable 
 the high resolution timer support (CONFIG_HIGH_RES_TIMERS - the same 
 problem that Sami described a while ago).

 Kind regards,
 Michael Langfinger

> * Sami Pietikäinen | 2013-10-28 13:59:53 [+0000]:
>
>>It seems that there is an irq number mismatch in the 
>> "arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch".
>>The patch adds setup_irq() and remove_irq() calls which have 
>> different irq number than the base driver.
>>
>>If I'm correct, the irq number should be NR_IRQS_LEGACY + AT91_ID_SYS 
>> instead of only AT91_ID_SYS.
>>
>>I have attached a fixed patch for 3.6.9-rt21. I tested it with 
>> SAMA5D35, and it removed the
>>"Trying to free already-free IRQ 1" boot warnings.
>
> Michael, any feedback? Does this solve your problem, too?
>
>>BR,
>>Sami Pietikäinen
>
> Sebastian
> --
> 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

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

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

end of thread, other threads:[~2013-11-09 20:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-30 11:18 3.10.9-rt5 with Atmel AT91SAM9G25 SoC triggers "Trying to free already-free IRQ 1" Sami Pietikäinen
2013-09-01 10:40 ` Michael Langfinger
2013-09-03  9:09   ` Sami Pietikäinen
2013-10-11 10:09   ` Sebastian Andrzej Siewior
2013-10-14  7:24     ` Sami Pietikäinen
2013-10-18 14:03       ` Sebastian Andrzej Siewior
2013-10-23 12:19         ` Sami Pietikäinen
2013-10-28 13:59           ` Sami Pietikäinen
2013-11-08 22:17             ` Sebastian Andrzej Siewior
2013-11-09 20:37               ` Michael Langfinger
  -- strict thread matches above, loose matches on Subject: below --
2013-08-29 21:54 Michael Langfinger

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