AnsweredAssumed Answered

Preemtp RT patch issue in Galcore for Kernel 3.10.9 for imx6q sabre SD with Yocto build

Question asked by Shitij Sah on Mar 24, 2014
Latest reply on Apr 15, 2014 by Bio_TICFSL

Hi,

Iam trying to run the patched kernel 3.10.9. While loading Galcore I get Kernel Oops. Seems to be a problem with gpu-viv (may be physical to virtual mapping), without preempt rt patch no such issues. Below is the log

 

**************************************************************************************************************************

Galcore version 4.6.9.6622

------------[ cut here ]------------

WARNING: at mm/vmalloc.c:1482 gckOS_FreeMemory+0x34/0x50()

Trying to vfree() bad address (f4f7dff9)

Modules linked in:

CPU: 2 PID: 1 Comm: swapper/0 Not tainted 3.10.9-rt5-1.0.0_alpha+dbf364b #14

[<80013c4c>] (unwind_backtrace+0x0/0xf4) from [<80011618>] (show_stack+0x10/0x14)

[<80011618>] (show_stack+0x10/0x14) from [<800248b8>] (warn_slowpath_common+0x54/0x6c)

[<800248b8>] (warn_slowpath_common+0x54/0x6c) from [<80024900>] (warn_slowpath_fmt+0x30/0x40)

[<80024900>] (warn_slowpath_fmt+0x30/0x40) from [<80445cf8>] (gckOS_FreeMemory+0x34/0x50)

[<80445cf8>] (gckOS_FreeMemory+0x34/0x50) from [<80445d40>] (gckOS_Free+0x2c/0x3c)

[<80445d40>] (gckOS_Free+0x2c/0x3c) from [<80446044>] (gckOS_AtomDestroy+0x10/0x20)

[<80446044>] (gckOS_AtomDestroy+0x10/0x20) from [<8044ac8c>] (gckKERNEL_Construct+0x2c4/0x390)

[<8044ac8c>] (gckKERNEL_Construct+0x2c4/0x390) from [<804436e4>] (gckGALDEVICE_Construct+0x1b0/0x980)

[<804436e4>] (gckGALDEVICE_Construct+0x1b0/0x980) from [<80444dc8>] (gpu_probe+0x2f8/0x718)

[<80444dc8>] (gpu_probe+0x2f8/0x718) from [<802f8ed4>] (platform_drv_probe+0x18/0x1c)

[<802f8ed4>] (platform_drv_probe+0x18/0x1c) from [<802f7c58>] (driver_probe_device+0x10c/0x228)

[<802f7c58>] (driver_probe_device+0x10c/0x228) from [<802f7e44>] (__driver_attach+0x8c/0x90)

[<802f7e44>] (__driver_attach+0x8c/0x90) from [<802f6168>] (bus_for_each_dev+0x60/0x94)

[<802f6168>] (bus_for_each_dev+0x60/0x94) from [<802f741c>] (bus_add_driver+0x1c0/0x24c)

[<802f741c>] (bus_add_driver+0x1c0/0x24c) from [<802f842c>] (driver_register+0x78/0x140)

[<802f842c>] (driver_register+0x78/0x140) from [<80008704>] (do_one_initcall+0x108/0x158)

[<80008704>] (do_one_initcall+0x108/0x158) from [<80bcfbe0>] (kernel_init_freeable+0x138/0x1d4)

[<80bcfbe0>] (kernel_init_freeable+0x138/0x1d4) from [<805ff5e8>] (kernel_init+0x8/0x158)

[<805ff5e8>] (kernel_init+0x8/0x158) from [<8000e1d8>] (ret_from_fork+0x14/0x3c)

---[ end trace 0000000000000001 ]---

Unable to handle kernel paging request at virtual address 22e79e09

pgd = 80004000

[22e79e09] *pgd=00000000

Internal error: Oops: 5 [#1] PREEMPT SMP ARM

Modules linked in:

CPU: 2 PID: 1 Comm: swapper/0 Tainted: G        W    3.10.9-rt5-1.0.0_alpha+dbf364b #14

task: ac078000 ti: ac05a000 task.ti: ac05a000

PC is at del_timer+0x8/0x58

LR is at try_to_grab_pending+0x140/0x230

pc : [<80031d88>]    lr : [<8003cd7c>]    psr: 20000113

sp : ac05bd34  ip : 81500844  fp : ac4a3c00

r10: ac05a000  r9 : 00000001  r8 : ac05bd64

r7 : 22e79df9  r6 : 80c10840  r5 : 80c1f518  r4 : 22e79e09

r3 : 00000000  r2 : 008f0000  r1 : 00000000  r0 : 22e79e09

Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Control: 10c53c7d  Table: 1000404a  DAC: 00000015

Process swapper/0 (pid: 1, stack limit = 0xac05a238)

Stack: (0xac05bd34 to 0xac05c000)

bd20:                                              81500840 80c1f518 8003cd7c

bd40: 22e79df9 00000000 00000000 00000000 ac214f00 00000000 ac213500 8003cf38

bd60: 80aec944 00000000 00000000 ffffffff 00000000 80449a8c 00000000 8044aca0

bd80: 0000002a ac448f80 00000000 ac4a3c00 ac4a3c0c 02208000 00000000 0000002b

bda0: 0000002a 00000029 00000000 804436e4 ac4a3c04 ac05a010 60000113 00000000

bdc0: 00000000 00000000 00000001 00000001 00000000 00000000 00000000 00000000

bde0: 80bf7ee8 80c04f0c 00000000 8060476c 80b4e504 80c54204 80cbbe9c ac186c10

be00: ac186c00 ac44c5d0 80cbbe9c 00000030 00000000 80444dc8 00134000 00004000

be20: 0000002b 02204000 00004000 40b00000 08000000 00000000 ffffffff ffffffff

be40: 00000000 00000000 00000030 00000000 ac186c10 00000001 ac05be64 00000000

be60: ac121c40 00000000 ac186c10 80cb8974 ac186c10 00000000 80c54218 80c66980

be80: 80bf7ee8 80c04f0c 00000000 802f8ed4 802f8ebc 802f7c58 00000000 ac186c10

bea0: 80c54218 ac186c44 00000000 802f7e44 00000000 80c54218 802f7db8 802f6168

bec0: ac00446c ac15cb48 80c54218 ac448e80 80c3ccd0 802f741c 80b4e450 80c54218

bee0: 00000006 80c54218 00000006 80c66980 80c66980 802f842c 80c0fbac 00000006

bf00: 80c66980 80c66980 80c66980 80008704 000000ec 800413b8 ac05a038 ac05a010

bf20: 80b3bde0 80b9d428 00000006 00000006 80040c24 80040c7c ac05bf4c 80c0fbac

bf40: 00000006 80c66980 80c66980 80bcf4dc 000000ec 80c04f0c 80c04f00 80bcfbe0

bf60: 00000006 00000006 80bcf4dc efff17e3 0ffe06d5 771d9d4b ac05bf9c 00000000

bf80: 805ff5e0 00000000 00000000 00000000 00000000 00000000 00000000 805ff5e8

bfa0: 00000000 00000000 805ff5e0 8000e1d8 00000000 00000000 00000000 00000000

bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 e7b19bb1 7f102db7

[<80031d88>] (del_timer+0x8/0x58) from [<00000000>] (  (null))

Code: eb175f87 eaffffd7 e92d4030 e1a04000 (e5900000)

---[ end trace 0000000000000002 ]---

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

 

CPU3: stopping

CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D W    3.10.9-rt5-1.0.0_alpha+dbf364b #14

[<80013c4c>] (unwind_backtrace+0x0/0xf4) from [<80011618>] (show_stack+0x10/0x14)

[<80011618>] (show_stack+0x10/0x14) from [<80012e28>] (handle_IPI+0x108/0x160)

[<80012e28>] (handle_IPI+0x108/0x160) from [<80008584>] (gic_handle_irq+0x58/0x5c)

[<80008584>] (gic_handle_irq+0x58/0x5c) from [<8000dd00>] (__irq_svc+0x40/0x84)

Exception stack(0xac0a7fa0 to 0xac0a7fe8)

7fa0: ffffffed 008f8000 80c1fe8c 00000000 ac0a6000 80c1f2a4 8060e26c 80c667f5

7fc0: 00000001 80c667f5 00000000 00000000 00000000 ac0a7fe8 8000eda0 8000ed90

7fe0: 60000113 ffffffff

[<8000dd00>] (__irq_svc+0x40/0x84) from [<8000ed90>] (arch_cpu_idle+0x40/0x54)

[<8000ed90>] (arch_cpu_idle+0x40/0x54) from [<8005b344>] (cpu_startup_entry+0xfc/0x160)

[<8005b344>] (cpu_startup_entry+0xfc/0x160) from [<10601184>] (0x10601184)

CPU1: stopping

CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D W    3.10.9-rt5-1.0.0_alpha+dbf364b #14

[<80013c4c>] (unwind_backtrace+0x0/0xf4) from [<80011618>] (show_stack+0x10/0x14)

[<80011618>] (show_stack+0x10/0x14) from [<80012e28>] (handle_IPI+0x108/0x160)

[<80012e28>] (handle_IPI+0x108/0x160) from [<80008584>] (gic_handle_irq+0x58/0x5c)

[<80008584>] (gic_handle_irq+0x58/0x5c) from [<8000dd00>] (__irq_svc+0x40/0x84)

Exception stack(0xac0a3fa0 to 0xac0a3fe8)

3fa0: ffffffed 008e8000 80c1fe8c 00000000 ac0a2000 80c1f2a4 8060e26c 80c667f5

3fc0: 00000001 80c667f5 00000000 00000000 00000000 ac0a3fe8 8000eda0 8000ed90

3fe0: 60000113 ffffffff

[<8000dd00>] (__irq_svc+0x40/0x84) from [<8000ed90>] (arch_cpu_idle+0x40/0x54)

[<8000ed90>] (arch_cpu_idle+0x40/0x54) from [<8005b344>] (cpu_startup_entry+0xfc/0x160)

[<8005b344>] (cpu_startup_entry+0xfc/0x160) from [<10601184>] (0x10601184)

CPU0: stopping

CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D W    3.10.9-rt5-1.0.0_alpha+dbf364b #14

[<80013c4c>] (unwind_backtrace+0x0/0xf4) from [<80011618>] (show_stack+0x10/0x14)

[<80011618>] (show_stack+0x10/0x14) from [<80012e28>] (handle_IPI+0x108/0x160)

[<80012e28>] (handle_IPI+0x108/0x160) from [<80008584>] (gic_handle_irq+0x58/0x5c)

[<80008584>] (gic_handle_irq+0x58/0x5c) from [<8000dd00>] (__irq_svc+0x40/0x84)

Exception stack(0x80c15f70 to 0x80c15fb8)

5f60:                                     ffffffed 008e0000 80c1fe8c 00000000

5f80: 80c14000 80c1f2a4 8060e26c 80c667f5 00000001 80c667f5 00000000 00000000

5fa0: 00000000 80c15fb8 8000eda0 8000ed90 60000113 ffffffff

[<8000dd00>] (__irq_svc+0x40/0x84) from [<8000ed90>] (arch_cpu_idle+0x40/0x54)

[<8000ed90>] (arch_cpu_idle+0x40/0x54) from [<8005b344>] (cpu_startup_entry+0xfc/0x160)

[<8005b344>] (cpu_startup_entry+0xfc/0x160) from [<80bcfa9c>] (start_kernel+0x324/0x330)

[<80bcfa9c>] (start_kernel+0x324/0x330) from [<10008074>] (0x10008074)

 

****************************************************************************************************************************

 

Steps to patch the kernel

1. Followed the steps as mentioned in http://git.freescale.com/git/cgit.cgi/imx/meta-fsl-bsp-release.git/tree/imx/README?h=dora_3.10.9-1.0.0 to build

2. Patched the kernel at (build/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.9-r0) with 3.10.9-rt5

3. Configured the kernel to enable Fully Preemptible Kernel

     a) bitbake -c menuconfig linux-imx

     b) bitbake -f -c compile linux-imx

     c) bitbake -c deploy linux-imx

4) While building I had an issue with gc_hal_kernel_os.c. Followed the post http://patches.openembedded.org/patch/65803/  to fix the issue without changing the NR_CPUS

 

How to fix the above issue?

 

Thanks,

Shitij

Outcomes