cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
390 Views
Registered: ‎10-02-2018

Embedded linux system are not stable on ZynqMP

Hi, I 'm using petalinux on zcu102. I wrote kernel driver module. In there, I use function udelay(5) to wait to read register. Once insmod my module kernel, my system run successdull but sometimes, It be cashed. This is log file once crash. How do solve this problem?

Thanks and Brgs.

root@xilinx-zcu102-2017_4:~# [   30.145745] cprimodule: loading out-of-tree module taints kernel.
[   30.152169] CPRI module driver initializing...
[   30.156761] cprimodule b0001000.cpri_control: Device Tree Probing
[   30.162783] cprimodule_probe
[   30.165660] base_addr of cpri module: 0x8fbe000
[   30.170253] Create device for CPRI successfull
[   30.174624] source clock transceiver is not good
[   31.211795] source clock transceiver is good
[   31.215983] source clock transceiver is good
[   31.220237] recovery clock is good
[   31.223616] current speed is 10
[   31.226745] link is sync
[   31.229262] start
[   31.231167] cprimodule_probe done.
[   33.244521] Transciever Module driver Initializing...
[   33.249728] jesd204module a0012000.spi_hw: Device Tree Probing for HardSPI...
[   33.256790] hardspi_probe
[   33.259406] base_addr of hardspi: 0x932a000
[   33.263561] base_addr for axi_gpio_ad9375: 0x932c000
[   33.268506] base_addr for jesd204_support: 0x932e000
[   33.273458] base_addr for jesd204_merge: 0x9330000
[   33.278322] Create device for HardSPI successfull
[   33.282984] jesd204module a0012000.spi_hw: hardspi at 0xa0012000 mapped to 0x0932a000, irq=47
[   33.314794] reset done
[   33.317161] vcxoFrequency_Hz = 122880000
[   33.321067] refAFrequency_Hz = 15360000
[   33.324885] outputDeviceClock_Hz = 122880000
[   34.347805] SPI_VERSION:56
[   34.350436] SPI_VERSION:4
[   35.415793] Reset JESD core
[   35.418507] current swap is 1
[   35.421467] Init Trans core
[   35.427260] Freq refference clock per micro second: 60
[   36.632597]
[   36.632597] (uint32_t)(1 << (3 + device->rx->rxAgcCtrl->powerAgc->pmdMeasDuration) = 2048
[   36.646754] MCS successful
[   36.649379] CLKPLL locked
[   36.655731] random: crng init done
[   36.826125] mykDevice.rx->rxPllLoFrequency_Hz = 4990000000
[   56.423789] INFO: rcu_sched self-detected stall on CPU
[   56.428849]  1-...: (5248 ticks this GP) idle=50f/140000000000001/0 softirq=1346/1346 fqs=1885
[   56.431788] INFO: rcu_sched detected stalls on CPUs/tasks:
[   56.431794]  1-...: (5248 ticks this GP) idle=50f/140000000000001/0 softirq=1346/1346 fqs=1885
[   56.431798]  (detected by 2, t=5252 jiffies, g=64, c=63, q=48)
[   56.431800] Task dump for CPU 1:
[   56.431805] insmod          R  running task        0  2266   2262 0x0000000a
[   56.431807] Call trace:
[   56.431816] [<ffffff800808530c>] __switch_to+0x8c/0xa0
[   56.431819] [<ffffffc879c37930>] 0xffffffc879c37930
[   56.480149]   (t=5264 jiffies g=64 c=63 q=48)
[   56.484490] Task dump for CPU 1:
[   56.487702] insmod          R  running task        0  2266   2262 0x0000000a
[   56.494732] Call trace:
[   56.497168] [<ffffff8008088138>] dump_backtrace+0x0/0x198
[   56.502550] [<ffffff80080882e4>] show_stack+0x14/0x20
[   56.507585] [<ffffff80080c02bc>] sched_show_task+0x94/0xf0
[   56.513053] [<ffffff80080c2510>] dump_cpu_task+0x40/0x50
[   56.518350] [<ffffff800812c65c>] rcu_dump_cpu_stacks+0xb4/0xe8
[   56.524165] [<ffffff80080e7ba4>] rcu_check_callbacks+0x67c/0x860
[   56.530156] [<ffffff80080eaa74>] update_process_times+0x34/0x60
[   56.536058] [<ffffff80080f9620>] tick_sched_timer+0x60/0x1c0
[   56.541701] [<ffffff80080eb408>] __hrtimer_run_queues+0xf0/0x178
[   56.547690] [<ffffff80080eb718>] hrtimer_interrupt+0x98/0x1c8
[   56.553422] [<ffffff80086ae010>] arch_timer_handler_phys+0x30/0x40
[   56.559584] [<ffffff80080de180>] handle_percpu_devid_irq+0x78/0x128
[   56.565835] [<ffffff80080d8e7c>] generic_handle_irq+0x24/0x38
[   56.571563] [<ffffff80080d94f4>] __handle_domain_irq+0x5c/0xb8
[   56.577378] [<ffffff80080814cc>] gic_handle_irq+0x64/0xc0
[   56.582760] Exception stack(0xffffffc879c377e0 to 0xffffffc879c37910)
[   56.589185] 77e0: ffffff800932a008 ffffff800932a00c ffffff800932a008 ffffff80009b4aa0
[   56.597003] 7800: 0000000000000001 ffffff80009b4e30 ffffff80009b4e30 0000000000000000
[   56.604816] 7820: ffffffc879c379da 0000000000000000 000000000000017a ffffffc879c376f0
[   56.612629] 7840: 0000000000000179 ffffff8008d5786d ffffff8088d5785f 0000000000000006
[   56.620442] 7860: 000000000000001c 0000000000000022 0000000000000010 ffffffc87988bb00
[   56.628255] 7880: ffffff80009b4aa0 0000000000000007 ffffffc879c37a00 000000000000000a
[   56.636067] 78a0: ffffff800099b4d0 ffffffc87988bb00 ffffffc87ab2ccb0 0000000000000124
[   56.643880] 78c0: ffffff80090a4000 ffffffc879c37910 ffffff800098a9f4 ffffffc879c37910
[   56.651693] 78e0: ffffff800098a02c 0000000060000145 0000000000000007 ffffffc879c37930
[   56.659505] 7900: 0000008000000000 ffffff800098a03c
[   56.664360] [<ffffff80080827b0>] el1_irq+0xb0/0x140
[   56.669281] [<ffffff800098a02c>] spi_read+0xac/0x110 [hardspi]
[   56.675092] [<ffffff800098a9f4>] CMB_SPIReadByte+0x34/0x60 [hardspi]
[   56.681430] [<ffffff800098aae4>] CMB_SPIReadField+0x24/0x60 [hardspi]
[   56.687854] [<ffffff8000982498>] MYKONOS_sendArmCommand+0x48/0xb0 [hardspi]
[   56.694799] [<ffffff800098265c>] MYKONOS_setRfPllFrequency+0xcc/0x100 [hardspi]
[   56.702096] [<ffffff8000989930>] Transciever_Initialize+0x180/0x5b0 [hardspi]
[   56.709210] [<ffffff800098a774>] hardspi_probe+0x4c4/0x5d0 [hardspi]
[   56.715494] [<ffffff80084ec5d8>] platform_drv_probe+0x58/0xc0
[   56.721221] [<ffffff80084eaa7c>] driver_probe_device+0x1fc/0x2a8
[   56.727211] [<ffffff80084eabd4>] __driver_attach+0xac/0xb0
[   56.732679] [<ffffff80084e8acc>] bus_for_each_dev+0x64/0xa0
[   56.738235] [<ffffff80084ea268>] driver_attach+0x20/0x28
[   56.743530] [<ffffff80084e9db8>] bus_add_driver+0x110/0x230
[   56.749086] [<ffffff80084eb3b8>] driver_register+0x60/0xf8
[   56.754556] [<ffffff80084ec510>] __platform_driver_register+0x40/0x48
[   56.761034] [<ffffff80009c2094>] hardspi_init+0x94/0x1000 [hardspi]
[   56.767230] [<ffffff80080830b8>] do_one_initcall+0x38/0x128
[   56.772786] [<ffffff800812c6ec>] do_init_module+0x5c/0x1b4
[   56.778255] [<ffffff8008102db0>] load_module+0x1c08/0x20b0
[   56.783723] [<ffffff8008103340>] SyS_init_module+0xe8/0x188
[   56.789278] [<ffffff8008082ef0>] el0_svc_naked+0x24/0x28

 

0 Kudos
6 Replies
Highlighted
Moderator
Moderator
364 Views
Registered: ‎12-04-2016

Re: Embedded linux system are not stable on ZynqMP

Hi @sonminh 

Can you try disabling SMP and see if that helps?

 

Best Regards

Shabbir

0 Kudos
Highlighted
Adventurer
Adventurer
357 Views
Registered: ‎10-02-2018

Re: Embedded linux system are not stable on ZynqMP

Hi @shabbirk ,

Where SMP in kernel config?

May be use function udelay() in kernel driver case this problem. Once I replace udelay() by msleep(), I don't see this problem. But to reduce time configure. I want to use udelay() or ndelay(). And linux kernel no have usleep().

Thanks

0 Kudos
Highlighted
Moderator
Moderator
355 Views
Registered: ‎12-04-2016

Re: Embedded linux system are not stable on ZynqMP

Hi @sonminh 

You can do this after limiting CPU cores to 1. Try passing maxcpus=1 to kernel command line and see if that helps?

 

Best Regards

Shabbir

0 Kudos
Highlighted
Adventurer
Adventurer
307 Views
Registered: ‎10-02-2018

Re: Embedded linux system are not stable on ZynqMP

Why do you want to linit CPU core to 1. I 'm hesitate whether It make to reduce peformance of zynqMP

0 Kudos
Highlighted
Observer
Observer
299 Views
Registered: ‎09-05-2018

Re: Embedded linux system are not stable on ZynqMP


@sonminh wrote:

Hi @shabbirk ,

Where SMP in kernel config?

 



According to this link, SMP cannot be disabled in the kernel config. SMP is on by default on aarch64. 

0 Kudos
Highlighted
Moderator
Moderator
288 Views
Registered: ‎09-12-2007

Re: Embedded linux system are not stable on ZynqMP

Could it be an access issue related to the register you are reading? Is there any other IP that would read from this?

0 Kudos