This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

keystone_hwqueue module and firmware_class framework

Hello TI developers,

we've found the following problem in TI's ARM Linux SDK, which leads to kernel crash instead of the graceful error handling:

In keystone_hwqueue.c there is subsys_initcall(keystone_hwqueue_init), which causes request_firmware() in khwq_load_pdsp().

This is a problem because firmware_class is only initialized later by fs_initcall(firmware_class_init). While this works by
coincidence most of the times, the missing initialization of firmware class (missing INIT_LIST_HEAD(&fw_cache.head) for instance in
fw_cache_init()) does cause this crash when firmware is not found:

==========
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.14.36--sampleversion-fsm4_k2-00164-g71293870 (skierkow@ulegcpeag13.emea.nsn-net.net) (gcc version 4.9.2 20141006 (prerelease) (NSN LFS PS_LFS_SDK_4_6 ) ) #1 SMP Wed Apr 22 17:12:57 CEST 2015
[    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c7387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine model: Texas Instruments Keystone 2 SoC
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] switching to high address space at 0x840000000
[    0.000000] Switching to high address space at 0x840000000
[    0.000000] Reserved memblock 000000085fffbfec-000000085fffffff ("__uboot_log").
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 655360
[    0.000000] free_area_init_node: node 0, pgdat c07c2340, node_mem_map de7f6000
[    0.000000]   DMA zone: 1024 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 131072 pages, LIFO batch:31
[    0.000000]   HighMem zone: 5120 pages used for memmap
[    0.000000]   HighMem zone: 524288 pages, LIFO batch:31
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] PERCPU: Embedded 8 pages/cpu @de7c6000 s11392 r8192 d13184 u32768
[    0.000000] pcpu-alloc: s11392 r8192 d13184 u32768 alloc=8*4096
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 654336
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootwait=1 earlyprintk rdinit=/sbin/init rw root=/dev/ram0 initrd=0x842000000,37M systemd.unit=multi-user-k2-master.target loglevel=10 initcall_debug dyndbg="module keystone_hwqueue +p"
[    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: 2553976K/2621440K available (5187K kernel code, 429K rwdata, 2056K rodata, 299K init, 411K bss, 67464K reserved, 2097152K 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]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc071b038   (7245 kB)
[    0.000000]       .init : 0xc071c000 - 0xc0766c80   ( 300 kB)
[    0.000000]       .data : 0xc0768000 - 0xc07d36d8   ( 430 kB)
[    0.000000]        .bss : 0xc07d36d8 - 0xc083a598   ( 412 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000]  Offload RCU callbacks from all CPUs
[    0.000000]  Offload RCU callbacks from CPUs: 0.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NO_HZ: Full dynticks CPUs: 1-3.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] ipc irq: irqchip registered, range 512-539
[    0.000000] Main PLL clk (1203200000 Hz), parent (153600000 Hz),postdiv = 2, mult = 46, prediv = 2
[    0.000000] Generic PLL clk (-1222967296 Hz), parent (153600000 Hz),postdiv = 1, mult = 19, prediv = 0
[    0.000000] Architected cp15 timer(s) running at 200.53MHz (phys).
[    0.000006] sched_clock: 56 bits at 200MHz, resolution 4ns, wraps every 2741468397568ns
[    0.008151] Switching to timer-based delay loop
[    0.012868] keystone timer clock @200533333 MHz
[    0.017708] Calibrating delay loop (skipped), value calculated using timer frequency.. 401.06 BogoMIPS (lpj=2005333)
[    0.028412] pid_max: default: 32768 minimum: 301
[    0.033298] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.040057] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.058448] Initializing cgroup subsys devices
[    0.063030] Initializing cgroup subsys freezer
[    0.067591] Initializing cgroup subsys net_cls
[    0.072171] CPU: Testing write buffer coherency: ok
[    0.077377] missing device node for CPU 0
[    0.081502] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.087317] calling  trace_init_flags_sys_exit+0x0/0x18 @ 1
[    0.093019] initcall trace_init_flags_sys_exit+0x0/0x18 returned 0 after 0 usecs
[    0.100564] calling  trace_init_flags_sys_enter+0x0/0x18 @ 1
[    0.106350] initcall trace_init_flags_sys_enter+0x0/0x18 returned 0 after 0 usecs
[    0.113983] calling  init_static_idmap+0x0/0x258 @ 1
[    0.119073] Setting up static identity map for 0xc04f3850 - 0xc04f3884
[    0.125759] initcall init_static_idmap+0x0/0x258 returned 0 after 9765 usecs
[    0.132949] calling  spawn_ksoftirqd+0x0/0x28 @ 1
[    0.137847] initcall spawn_ksoftirqd+0x0/0x28 returned 0 after 0 usecs
[    0.144511] calling  init_workqueues+0x0/0x3c4 @ 1
[    0.149689] initcall init_workqueues+0x0/0x3c4 returned 0 after 0 usecs
[    0.156443] calling  migration_init+0x0/0x74 @ 1
[    0.161195] initcall migration_init+0x0/0x74 returned 0 after 0 usecs
[    0.167771] calling  check_cpu_stall_init+0x0/0x20 @ 1
[    0.173041] initcall check_cpu_stall_init+0x0/0x20 returned 0 after 0 usecs
[    0.180139] calling  rcu_scheduler_really_started+0x0/0x18 @ 1
[    0.186108] initcall rcu_scheduler_really_started+0x0/0x18 returned 0 after 0 usecs
[    0.193905] calling  rcu_spawn_gp_kthread+0x0/0x124 @ 1
[    0.199428] initcall rcu_spawn_gp_kthread+0x0/0x124 returned 0 after 0 usecs
[    0.206615] calling  cpu_stop_init+0x0/0x94 @ 1
[    0.211334] initcall cpu_stop_init+0x0/0x94 returned 0 after 0 usecs
[    0.217820] calling  tracer_alloc_buffers+0x0/0x204 @ 1
[    0.223234] initcall tracer_alloc_buffers+0x0/0x204 returned 0 after 0 usecs
[    0.230418] calling  init_events+0x0/0x74 @ 1
[    0.234909] initcall init_events+0x0/0x74 returned 0 after 0 usecs
[    0.241218] calling  init_trace_printk+0x0/0xc @ 1
[    0.246135] initcall init_trace_printk+0x0/0xc returned 0 after 0 usecs
[    0.252879] calling  event_trace_memsetup+0x0/0x60 @ 1
[    0.258161] initcall event_trace_memsetup+0x0/0x60 returned 0 after 0 usecs
[    0.265261] calling  hashlib_init+0x0/0x8 @ 1
[    0.269739] initcall hashlib_init+0x0/0x8 returned 0 after 0 usecs
[    0.276048] calling  dynamic_debug_init+0x0/0x2b0 @ 1
[    0.282759] initcall dynamic_debug_init+0x0/0x2b0 returned 0 after 0 usecs
[    0.289778] calling  rand_initialize+0x0/0x2c @ 1
[    0.294741] initcall rand_initialize+0x0/0x2c returned 0 after 0 usecs
[    0.301405] calling  dummy_timer_register+0x0/0x4c @ 1
[    0.306674] initcall dummy_timer_register+0x0/0x4c returned 0 after 0 usecs
[    0.313771] Brought up 1 CPUs
[    0.316849] SMP: Total of 1 processors activated (401.06 BogoMIPS).
[    0.323244] CPU: All CPU(s) started in SVC mode.
[    0.328447] devtmpfs: initialized
[    0.346446] calling  ipc_ns_init+0x0/0x40 @ 1
[    0.350942] initcall ipc_ns_init+0x0/0x40 returned 0 after 0 usecs
[    0.357255] calling  init_mmap_min_addr+0x0/0x20 @ 1
[    0.362349] initcall init_mmap_min_addr+0x0/0x20 returned 0 after 0 usecs
[    0.369275] calling  net_ns_init+0x0/0x114 @ 1
[    0.373984] initcall net_ns_init+0x0/0x114 returned 0 after 0 usecs
[    0.380431] calling  vfp_init+0x0/0x188 @ 1
[    0.384742] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.392551] initcall vfp_init+0x0/0x188 returned 0 after 0 usecs
[    0.398695] calling  ptrace_break_init+0x0/0x2c @ 1
[    0.403694] initcall ptrace_break_init+0x0/0x2c returned 0 after 0 usecs
[    0.410537] calling  v6_userpage_init+0x0/0x8 @ 1
[    0.415360] initcall v6_userpage_init+0x0/0x8 returned 0 after 0 usecs
[    0.422028] calling  wq_sysfs_init+0x0/0x10 @ 1
[    0.426751] initcall wq_sysfs_init+0x0/0x10 returned 0 after 0 usecs
[    0.433244] calling  ksysfs_init+0x0/0xa8 @ 1
[    0.437740] initcall ksysfs_init+0x0/0xa8 returned 0 after 0 usecs
[    0.444058] calling  pm_init+0x0/0x78 @ 1
[    0.448212] initcall pm_init+0x0/0x78 returned 0 after 0 usecs
[    0.454182] calling  init_jiffies_clocksource+0x0/0xc @ 1
[    0.459707] initcall init_jiffies_clocksource+0x0/0xc returned 0 after 0 usecs
[    0.467074] calling  cgroup_wq_init+0x0/0x78 @ 1
[    0.471836] initcall cgroup_wq_init+0x0/0x78 returned 0 after 0 usecs
[    0.478415] calling  event_trace_enable+0x0/0x170 @ 1
[    0.484229] initcall event_trace_enable+0x0/0x170 returned 0 after 0 usecs
[    0.491252] calling  init_zero_pfn+0x0/0x50 @ 1
[    0.495901] initcall init_zero_pfn+0x0/0x50 returned 0 after 0 usecs
[    0.502398] calling  fsnotify_init+0x0/0x24 @ 1
[    0.507054] initcall fsnotify_init+0x0/0x24 returned 0 after 0 usecs
[    0.513547] calling  filelock_init+0x0/0xa0 @ 1
[    0.518211] initcall filelock_init+0x0/0xa0 returned 0 after 0 usecs
[    0.524704] calling  init_script_binfmt+0x0/0x1c @ 1
[    0.529792] initcall init_script_binfmt+0x0/0x1c returned 0 after 0 usecs
[    0.536722] calling  init_elf_binfmt+0x0/0x1c @ 1
[    0.541544] initcall init_elf_binfmt+0x0/0x1c returned 0 after 0 usecs
[    0.548209] calling  debugfs_init+0x0/0x6c @ 1
[    0.552781] initcall debugfs_init+0x0/0x6c returned 0 after 0 usecs
[    0.559184] calling  prandom_init+0x0/0xf8 @ 1
[    0.563746] initcall prandom_init+0x0/0xf8 returned 0 after 0 usecs
[    0.570155] calling  virtio_init+0x0/0x24 @ 1
[    0.574661] initcall virtio_init+0x0/0x24 returned 0 after 0 usecs
[    0.580977] calling  sock_init+0x0/0xa4 @ 1
[    0.585394] initcall sock_init+0x0/0xa4 returned 0 after 0 usecs
[    0.591541] calling  net_inuse_init+0x0/0x24 @ 1
[    0.596286] initcall net_inuse_init+0x0/0x24 returned 0 after 0 usecs
[    0.602865] calling  netlink_proto_init+0x0/0x1c4 @ 1
[    0.608055] NET: Registered protocol family 16
[    0.612633] initcall netlink_proto_init+0x0/0x1c4 returned 0 after 0 usecs
[    0.619698] calling  atomic_pool_init+0x0/0x12c @ 1
[    0.624793] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.631812] initcall atomic_pool_init+0x0/0x12c returned 0 after 9765 usecs
[    0.638909] calling  keystone_init_misc+0x0/0x114 @ 1
[    0.644236] initcall keystone_init_misc+0x0/0x114 returned 0 after 0 usecs
[    0.651246] calling  bdi_class_init+0x0/0x5c @ 1
[    0.656058] initcall bdi_class_init+0x0/0x5c returned 0 after 0 usecs
[    0.662632] calling  mm_sysfs_init+0x0/0x38 @ 1
[    0.667299] initcall mm_sysfs_init+0x0/0x38 returned 0 after 0 usecs
[    0.673783] calling  kobject_uevent_init+0x0/0xc @ 1
[    0.678884] initcall kobject_uevent_init+0x0/0xc returned 0 after 0 usecs
[    0.685806] calling  gpiolib_sysfs_init+0x0/0xa0 @ 1
[    0.690921] initcall gpiolib_sysfs_init+0x0/0xa0 returned 0 after 0 usecs
[    0.697841] calling  gpio_keystone_init+0x0/0x10 @ 1
[    0.702960] initcall gpio_keystone_init+0x0/0x10 returned 0 after 0 usecs
[    0.709880] calling  pcibus_class_init+0x0/0x14 @ 1
[    0.714900] initcall pcibus_class_init+0x0/0x14 returned 0 after 0 usecs
[    0.721735] calling  pci_driver_init+0x0/0xc @ 1
[    0.726512] initcall pci_driver_init+0x0/0xc returned 0 after 0 usecs
[    0.733084] calling  tty_class_init+0x0/0x40 @ 1
[    0.737839] initcall tty_class_init+0x0/0x40 returned 0 after 0 usecs
[    0.744413] calling  spi_init+0x0/0xc4 @ 1
[    0.748682] initcall spi_init+0x0/0xc4 returned 0 after 0 usecs
[    0.754729] calling  rio_bus_init+0x0/0x34 @ 1
[    0.759359] initcall rio_bus_init+0x0/0x34 returned 0 after 0 usecs
[    0.765754] calling  i2c_init+0x0/0x7c @ 1
[    0.770022] initcall i2c_init+0x0/0x7c returned 0 after 0 usecs
[    0.776112] calling  gate_vma_init+0x0/0x2c @ 1
[    0.780767] initcall gate_vma_init+0x0/0x2c returned 0 after 0 usecs
[    0.787251] calling  customize_machine+0x0/0x40 @ 1
[    0.801804] initcall customize_machine+0x0/0x40 returned 0 after 0 usecs
[    0.808657] calling  arch_hw_breakpoint_init+0x0/0x234 @ 1
[    0.814274] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.822427] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.828391] initcall arch_hw_breakpoint_init+0x0/0x234 returned 0 after 9765 usecs
[    0.836108] calling  edma_init+0x0/0x14 @ 1
[    0.840531] initcall edma_init+0x0/0x14 returned -19 after 0 usecs
[    0.846849] calling  dma_bus_init+0x0/0xd0 @ 1
[    0.851436] initcall dma_bus_init+0x0/0xd0 returned 0 after 0 usecs
[    0.857842] calling  dma_channel_table_init+0x0/0xf8 @ 1
[    0.863330] initcall dma_channel_table_init+0x0/0xf8 returned 0 after 0 usecs
[    0.870649] calling  topology_init+0x0/0x70 @ 1
[    0.875372] initcall topology_init+0x0/0x70 returned 0 after 0 usecs
[    0.881869] calling  param_sysfs_init+0x0/0x1b0 @ 1
[    0.889063] initcall param_sysfs_init+0x0/0x1b0 returned 0 after 0 usecs
[    0.895912] calling  default_bdi_init+0x0/0x80 @ 1
[    0.901126] initcall default_bdi_init+0x0/0x80 returned 0 after 0 usecs
[    0.907893] calling  init_reserve_notifier+0x0/0x8 @ 1
[    0.913155] initcall init_reserve_notifier+0x0/0x8 returned 0 after 0 usecs
[    0.920263] calling  init_admin_reserve+0x0/0x30 @ 1
[    0.925350] initcall init_admin_reserve+0x0/0x30 returned 0 after 0 usecs
[    0.932278] calling  init_user_reserve+0x0/0x30 @ 1
[    0.937275] initcall init_user_reserve+0x0/0x30 returned 0 after 0 usecs
[    0.944118] calling  init_bio+0x0/0xcc @ 1
[    0.948369] bio: create slab <bio-0> at 0
[    0.952569] initcall init_bio+0x0/0xcc returned 0 after 0 usecs
[    0.958630] calling  crypto_wq_init+0x0/0x44 @ 1
[    0.963427] initcall crypto_wq_init+0x0/0x44 returned 0 after 0 usecs
[    0.970009] calling  cryptomgr_init+0x0/0xc @ 1
[    0.974659] initcall cryptomgr_init+0x0/0xc returned 0 after 0 usecs
[    0.981154] calling  blk_settings_init+0x0/0x38 @ 1
[    0.986154] initcall blk_settings_init+0x0/0x38 returned 0 after 0 usecs
[    0.992995] calling  blk_ioc_init+0x0/0x40 @ 1
[    0.997560] initcall blk_ioc_init+0x0/0x40 returned 0 after 0 usecs
[    1.003963] calling  blk_softirq_init+0x0/0x74 @ 1
[    1.008875] initcall blk_softirq_init+0x0/0x74 returned 0 after 0 usecs
[    1.015631] calling  blk_iopoll_setup+0x0/0x74 @ 1
[    1.020543] initcall blk_iopoll_setup+0x0/0x74 returned 0 after 0 usecs
[    1.027295] calling  blk_mq_init+0x0/0x10 @ 1
[    1.031768] initcall blk_mq_init+0x0/0x10 returned 0 after 0 usecs
[    1.038084] calling  genhd_device_init+0x0/0x80 @ 1
[    1.043206] initcall genhd_device_init+0x0/0x80 returned 0 after 0 usecs
[    1.050052] calling  gpiolib_debugfs_init+0x0/0x38 @ 1
[    1.055322] initcall gpiolib_debugfs_init+0x0/0x38 returned 0 after 0 usecs
[    1.062425] calling  pca953x_init+0x0/0x10 @ 1
[    1.067010] initcall pca953x_init+0x0/0x10 returned 0 after 0 usecs
[    1.073422] calling  pci_slot_init+0x0/0x54 @ 1
[    1.078077] initcall pci_slot_init+0x0/0x54 returned 0 after 0 usecs
[    1.084570] calling  keystone_pcie_rc_init+0x0/0xc68 @ 1
[    1.090046] keystone-pcie: keystone_pcie_rc_init - start
[    1.095492] keystone-pcie: keystone_pcie_rc_init - PRACH PCIe reset done
[    1.102353] keystone2_pcie_serdes_setup for domain 0
[    1.109528] keystone2_pcie_serdes_setup done domain 0, en_link_train = 1
[    1.116399] keystone-pcie: MEM 0x0000000050000000..0x000000005fffffff -> 0x0000000050000000
[    1.124999] keystone-pcie: IO 0x0000000024000000..0x0000000024003fff -> 0x0000000000000000
[    1.133420] keystone-pcie: too small PCI dma-range size in device tree PATCHED for WPRACH FPGA LAB testing to 0x80000000: CPU addr: 0x0000000080000000..0x00000000ffffffff -> PCI Addr: 0x0000000080000000 pci_space: 0x2000000
[    1.153605] keystone-pcie: pcie - number of legacy irqs = 4
[    1.159364] keystone-pcie: pcie - number of MSI host irqs = 8, msi_irqs = 32
[    1.276655] keystone-pcie: Doing PCI Setup...Done
[    1.281476] keystone-pcie: Starting PCI scan, nr 0...
[    1.286770] PCI host bridge to bus 0000:00
[    1.290985] pci_bus 0000:00: root bus resource [mem 0x50000000-0x5fffffff]
[    1.298007] pci_bus 0000:00: root bus resource [io  0x0000-0x3fff]
[    1.304319] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.312408] pci 0000:00:00.0: [104c:8888] type 01 class 0x060400
[    1.318773] PCI: bus0: Fast back to back transfers disabled
[    1.324482] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.332766] pci 0000:01:00.0: [13b8:e12f] type 00 class 0x118000
[    1.338928] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0001ffff]
[    1.345335] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    1.351747] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff]
[    1.358155] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x00000fff]
[    1.364568] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x0000ffff]
[    1.371215] PCI: bus1: Fast back to back transfers disabled
[    1.376928] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.383679] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    1.390438] keystone-pcie: Ending PCI scan...
[    1.394913] keystone-pcie: keystone_pcie_map_irq: slot 0, pin 1
[    1.400967] keystone-pcie: keystone_pcie_map_irq: legacy_irq 572
[    1.407104] keystone-pcie: keystone_pcie_map_irq: slot 0, pin 1
[    1.413153] keystone-pcie: keystone_pcie_map_irq: legacy_irq 572
[    1.419309] pci 0000:00:00.0: BAR 8: assigned [mem 0x50000000-0x500fffff]
[    1.426245] pci 0000:01:00.0: BAR 0: assigned [mem 0x50000000-0x5001ffff]
[    1.433178] pci 0000:01:00.0: BAR 1: assigned [mem 0x50020000-0x5002ffff]
[    1.440112] pci 0000:01:00.0: BAR 4: assigned [mem 0x50030000-0x5003ffff]
[    1.447039] pci 0000:01:00.0: BAR 2: assigned [mem 0x50040000-0x50043fff]
[    1.453972] pci 0000:01:00.0: BAR 3: assigned [mem 0x50044000-0x50044fff]
[    1.460902] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.465998] pci 0000:00:00.0:   bridge window [mem 0x50000000-0x500fffff]
[    1.472923] keystone-pcie: keystone_pcie_rc_init - end
[    1.478267] initcall keystone_pcie_rc_init+0x0/0xc68 returned 0 after 312500 usecs
[    1.485980] calling  edma_init+0x0/0x58 @ 1
[    1.490430] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
[    1.497803] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[    1.505005] initcall edma_init+0x0/0x58 returned 0 after 9765 usecs
[    1.511403] calling  misc_init+0x0/0xcc @ 1
[    1.515734] initcall misc_init+0x0/0xcc returned 0 after 0 usecs
[    1.521868] calling  init_scsi+0x0/0x7c @ 1
[    1.526386] SCSI subsystem initialized
[    1.530249] initcall init_scsi+0x0/0x7c returned 0 after 0 usecs
[    1.536392] calling  phy_init+0x0/0x3c @ 1
[    1.540694] initcall phy_init+0x0/0x3c returned 0 after 0 usecs
[    1.546749] calling  rio_core_init+0x0/0x84 @ 1
[    1.551393] SRIO: RapidIO subsystem core init
[    1.555929] initcall rio_core_init+0x0/0x84 returned 0 after 0 usecs
[    1.562421] calling  usb_init+0x0/0x17c @ 1
[    1.566819] usbcore: registered new interface driver usbfs
[    1.572474] usbcore: registered new interface driver hub
[    1.577978] usbcore: registered new device driver usb
[    1.583163] initcall usb_init+0x0/0x17c returned 0 after 19531 usecs
[    1.589650] calling  usb_phy_gen_xceiv_init+0x0/0x10 @ 1
[    1.595216] initcall usb_phy_gen_xceiv_init+0x0/0x10 returned 0 after 0 usecs
[    1.602490] calling  input_init+0x0/0x11c @ 1
[    1.607002] initcall input_init+0x0/0x11c returned 0 after 0 usecs
[    1.613312] calling  davinci_i2c_init_driver+0x0/0x10 @ 1
[    1.620348] initcall davinci_i2c_init_driver+0x0/0x10 returned 0 after 0 usecs
[    1.627713] calling  pps_init+0x0/0xb4 @ 1
[    1.631962] pps_core: LinuxPPS API ver. 1 registered
[    1.637044] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.646337] initcall pps_init+0x0/0xb4 returned 0 after 9765 usecs
[    1.652646] calling  ptp_init+0x0/0xa0 @ 1
[    1.656880] PTP clock support registered
[    1.660915] initcall ptp_init+0x0/0xa0 returned 0 after 0 usecs
[    1.666967] calling  watchdog_init+0x0/0x64 @ 1
[    1.671631] initcall watchdog_init+0x0/0x64 returned 0 after 0 usecs
[    1.678125] calling  keystone_hwqueue_init+0x0/0x10 @ 1
[    1.683572] keystone-hwqueue hwqueue.13: qmgr start queue 0, number of queues 8192
[    1.691391] keystone-hwqueue hwqueue.13: added qmgr start queue 0, num of queues 8192, reg_peek e0880000, reg_status e0846000, reg_config e0848000, reg_region e084a000, reg_push e08c0000, reg_pop e0900000
[    1.709787] keystone-hwqueue hwqueue.13: qmgr start queue 8192, number of queues 8192
[    1.717838] keystone-hwqueue hwqueue.13: added qmgr start queue 8192, num of queues 8192, reg_peek e0940000, reg_status e084c400, reg_config e084e000, reg_region e085a000, reg_push e0980000, reg_pop e09c0000
[    1.736502] keystone-hwqueue hwqueue.13: pdsp name pdsp6 fw name :keystone/qmss_pdsp_acc48_k2_le_1_0_0_8.fw
[    1.746458] keystone-hwqueue hwqueue.13: added pdsp pdsp6: command e0868000, iram e085c000, regs e085e600, intd e0860000, firmware keystone/qmss_pdsp_acc48_k2_le_1_0_0_8.fw
[    1.762062] Unable to handle kernel NULL pointer dereference at virtual address 00000028
[    1.770294] pgd = c0003000
[    1.773109] [00000028] *pgd=80000840004003, *pmd=00000000
[    1.778642] Internal error: Oops: 206 [#1] SMP ARM
[    1.783549] Modules linked in:
[    1.786713] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.36--sampleversion-fsm4_k2-00164-g71293870 #1
[    1.796262] task: de0a0000 ti: de0a4000 task.ti: de0a4000
[    1.801789] PC is at strcmp+0x0/0x34
[    1.805478] LR is at _request_firmware+0x120/0x674
[    1.810389] pc : [<c02bcde4>]    lr : [<c032833c>]    psr: 20000113
[    1.810389] sp : de0a5d40  ip : 00000000  fp : c06ca85c
[    1.822125] r10: 00000001  r9 : c7007ef4  r8 : c06ca73c
[    1.827469] r7 : de0a5df0  r6 : c0831f60  r5 : de1c9ac0  r4 : fffffffc
[    1.834128] r3 : 00000000  r2 : 00000000  r1 : c7007ef4  r0 : 00000028
[    1.840789] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    1.848235] Control: 30c5387d  Table: 40003000  DAC: 55555555
[    1.854104] Process swapper/0 (pid: 1, stack limit = 0xde0a4238)
[    1.860237] Stack: (0xde0a5d40 to 0xde0a6000)
[    1.864709] 5d40: c0638000 de7e0f24 de168810 c001b3cc c03f388c de179610 c0832b5c de7e1004
[    1.873031] 5d60: a0000113 de0a5df0 c7007ef4 de168810 de1c9890 de179674 c063807c de7e0f24
[    1.881353] 5d80: de17967c c03288bc de1c9890 c06ad9a4 de179610 c03fde04 e0868000 e085c000
[    1.889676] 5da0: e085e600 e0860000 c7007ef4 e09c0000 00000000 c02b68a4 00000000 de168810
[    1.897998] 5dc0: de17967c de7df788 de17967c de179664 de17966c de179674 de17963c c0159f88
[    1.906320] 5de0: 00000000 00004000 de169990 c015ab54 00002000 00002000 de169990 de1c8900
[    1.914642] 5e00: 00000000 de1c8870 de1c8900 de169990 c0681a90 00000001 00000000 de168810
[    1.922964] 5e20: c07ba408 de168844 00000000 53724e00 00000000 c06f5cf4 00000000 c0321494
[    1.931286] 5e40: de168810 c07ba408 de168844 c031fcfc 53724e00 c0321620 de168810 de168810
[    1.939607] 5e60: c07ba408 de168844 de0a5e80 c03200d8 00000000 c07ba408 c032004c c031e008
[    1.947929] 5e80: de09755c de15fc34 00000000 c07ba408 de1c7f00 00000000 c0791300 c031f3c8
[    1.956251] 5ea0: c06adf08 c074a9f8 c075be0c c07ba408 c074a9f8 c075be0c c07d3700 c03204bc
[    1.964573] 5ec0: 00000000 c074a9f8 c075be0c c00088d8 00000000 00000000 53724e00 00000000
[    1.972895] 5ee0: c06f5c00 c004243c 60000153 00000003 c06360b8 00000004 00000004 dfffbc10
[    1.981216] 5f00: c063fb30 c063fb18 c0777970 60000153 c077796c c0763ab8 00000004 c075be08
[    1.989538] 5f20: c0763b38 00000004 c075be0c c075be1c 00000064 c071cd84 00000004 00000004
[    1.997860] 5f40: c071c51c 043028f0 5003a244 d3e028bc 218ac0ab 0c104198 3a054199 9063002c
[    2.006182] 5f60: 11270b1b 90329ae8 316f0cb0 051501c6 41d25485 84b524b2 1143ac20 c080451e
[    2.014504] 5f80: 81211523 088d991c 00000000 c04e659c 00000000 00000000 00000000 00000000
[    2.022826] 5fa0: 00000000 c04e65a4 00000000 c000eea8 00000000 00000000 00000000 00000000
[    2.031147] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.039470] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 22126d8d 5195c978
[    2.047801] [<c02bcde4>] (strcmp) from [<c032833c>] (_request_firmware+0x120/0x674)
[    2.055604] [<c032833c>] (_request_firmware) from [<c03288bc>] (request_firmware+0x2c/0x40)
[    2.064106] [<c03288bc>] (request_firmware) from [<c03fde04>] (khwq_probe+0x638/0x18b8)
[    2.072260] [<c03fde04>] (khwq_probe) from [<c0321494>] (platform_drv_probe+0x18/0x4c)
[    2.080327] [<c0321494>] (platform_drv_probe) from [<c031fcfc>] (driver_probe_device+0xac/0x3b8)
[    2.089264] [<c031fcfc>] (driver_probe_device) from [<c03200d8>] (__driver_attach+0x8c/0x90)
[    2.097852] [<c03200d8>] (__driver_attach) from [<c031e008>] (bus_for_each_dev+0x6c/0xa0)
[    2.106177] [<c031e008>] (bus_for_each_dev) from [<c031f3c8>] (bus_add_driver+0x160/0x220)
[    2.114590] [<c031f3c8>] (bus_add_driver) from [<c03204bc>] (driver_register+0x78/0xf8)
[    2.122739] [<c03204bc>] (driver_register) from [<c00088d8>] (do_one_initcall+0x54/0x194)
[    2.131068] [<c00088d8>] (do_one_initcall) from [<c071cd84>] (kernel_init_freeable+0x1bc/0x288)
[    2.139920] [<c071cd84>] (kernel_init_freeable) from [<c04e65a4>] (kernel_init+0x8/0xe8)
[    2.148161] [<c04e65a4>] (kernel_init) from [<c000eea8>] (ret_from_fork+0x14/0x2c)
[    2.155872] Code: e3520000 e5e32001 1afffffb e12fff1e (e4d03001)
[    2.162124] ---[ end trace 9e751f1f0c89cd1b ]---
[    2.166876] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    2.166876]
==========

We need to fix this problem not only to provide meaningful error messages to user instead of kernel crashes, but also
to guarantee that hwqueue works not just by coincidence with uninitialized data structures.

Simple move to another initcall probably will not work as pktdma also must be initialized later after hwqueue and we
would simply run out of initcalls if every module will require its own initcall level. We need something more intelligent
maybe return -EPROBEDEFFER in probe() functions. But this is invasive change I would like to discuss possible solutions
with you.

  • Hi Alexander,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature. 

    Please provide DSP part number, MCSDK version and EVM or Custom board information. We will get back to you on the above query shortly. Thank you for your patience.

  • Hi Alex,

    Does the ARM SDK modified by you? or the ARM SDK "as is" giving problem? Which HW board you are using? Is it a custom board ? or TI EVM?

    Regards,

    Shankari

  • Hello Shankari,

    obviously, I would not contact you about our own changes, the problem is in TI's code.

    Other questions are not related to the topic at all.

    Hope, this helps.

    Alexander.

  • Hello Rajasekaran!

    Do you have a response from TI Engineering Team? In the meanwhile we had occurrences of this problem in our Continuous Integration and this issue is blocking the releasing process from time to time. This is a clear design flaw in the TI ARM SDK, so could we get a confirmation from Engineering Team some time soon? I've provided you with full technical analysis, this could be used directly by your Engineering Team.

    Regards,
    Alexander.
  • Hi Alexander,

    Alexander log said:
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 3.14.36--sampleversion-fsm4_k2-00164-g71293870 (skierkow@ulegcpeag13.emea.nsn-net.net) (gcc version 4.9.2 20141006 (prerelease) (NSN LFS PS_LFS_SDK_4_6 ) ) #1 SMP Wed Apr 22 17:12:57 CEST 2015
    [    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c7387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine model: Texas Instruments Keystone 2 SoC

    The following are our observations.

    1. The latest release of MCSDK version : 3_01_03_06 has the Linux version: 3.10 LTS. But your log shows the kernel version as 3.14. It seems to be you are not using the MCSDK "as is" ; instead trying to use the MCSDK with the kernel version : 3.14

    2. The file, keystone_hwqueue.c is the keystone specific file Which will work with kernel version 3.10 LTS ( recommended version as per the release notes of MCSDK )

    3. If customer is using the linux kernel version other than the one for which the MCSDK release has been done, it is their responsibility to put effort in bringing it up.

    4. Please use the MCSDK's linux kernel version: 3.10 LTS ( Do a git clone from TI repository) and do check whether the problem persists. Please do revert if the problem exists.  So that we will reproduce from our end.

    Note:

    When you do a git clone to the TI repository like below, you will get the latest linux. If needed to get the released tag of MCSDK, use the commands

    given below.

    $ git clone git://git.ti.com/keystone-linux/linux.git linux-keystone

    $ cd linux-keystone

    $ git reset --hard <Release tag> where release tag can be obtained from Release notes. For example tag is K2_LINUX_03.10.61_15.02 for the release.

    Release notes of MCSDK :

    Userguide of MCSDK:

    processors.wiki.ti.com/.../MCSDK_UG_Chapter_Exploring

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------