Linux hang at: Freeing unused kernel memory: 2048K

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux hang at: Freeing unused kernel memory: 2048K

Jump to solution
7,608 Views
ailtonlopes
Contributor III

Hi, im trying to run linux on top of an hypervisor and im using a custom bootloader (not u-boot) and when running the linux it hangs at that part, when running the same image using uboot it works fine so i think that its something that u-boot does that im not doing it in my bootloader but have no idea what can cause the kernel to hang there. Hhere is the full kernel output.

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.0 (andersen@andersenbond) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.18
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Freescale i.MX6 Quad SABRE Smart Device Board
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 64 MiB at 0x4c000000
[ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s35584 r8192 d21760 u65536
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260608
[ 0.000000] Kernel command line: init=/init root=/dev/ram0 console=ttymxc0,115200
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 956596K/1048576K available (5120K kernel code, 219K rwdata, 1740K rodata, 2048K init, 7)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (6112 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (2048 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 220 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) (7584 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Running RCU self tests
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU lockdep checking is enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] Switching to timer-based delay loop, resolution 333ns
[ 0.000010] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[ 0.000040] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[ 0.002032] Console: colour dummy device 80x30
[ 0.002067] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.002086] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.002101] ... MAX_LOCK_DEPTH: 48
[ 0.002115] ... MAX_LOCKDEP_KEYS: 8191
[ 0.002129] ... CLASSHASH_SIZE: 4096
[ 0.002143] ... MAX_LOCKDEP_ENTRIES: 32768
[ 0.002156] ... MAX_LOCKDEP_CHAINS: 65536
[ 0.002170] ... CHAINHASH_SIZE: 32768
[ 0.002182] memory used by lock dependency info: 4655 kB
[ 0.002196] per task-struct memory footprint: 1536 bytes
[ 0.002263] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=3)
[ 0.002302] pid_max: default: 32768 minimum: 301
[ 0.002683] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002729] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.004914] CPU: Testing write buffer coherency: ok
[ 0.006220] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.007993] Setting up static identity map for 0x10100000 - 0x10100078
[ 0.008622] Hierarchical SRCU implementation.
[ 0.011101] smp: Bringing up secondary CPUs ...
[ 0.013621] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.016530] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.018988] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.019401] smp: Brought up 1 node, 4 CPUs
[ 0.019601] SMP: Total of 4 processors activated (24.00 BogoMIPS).
[ 0.019618] CPU: All CPU(s) started in SVC mode.
[ 0.022379] devtmpfs: initialized
[ 0.054619] random: get_random_u32 called from bucket_table_alloc+0xf0/0x250 with crng_init=0
[ 0.054866] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.057478] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.057539] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.065484] pinctrl core: initialized pinctrl subsystem
[ 0.067605] NET: Registered protocol family 16
[ 0.085070] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.088194] cpuidle: using governor menu
[ 0.088384] CPU identified as i.MX6Q, silicon rev 1.2
[ 0.138351] No ATAGs?
[ 0.138910] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.138965] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.142338] imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
[ 0.198066] vgaarb: loaded
[ 0.199103] SCSI subsystem initialized
[ 0.202027] i2c i2c-0: IMX I2C adapter registered
[ 0.202069] i2c i2c-0: can't use DMA, using PIO instead.
[ 0.204204] i2c i2c-1: IMX I2C adapter registered
[ 0.204245] i2c i2c-1: can't use DMA, using PIO instead.
[ 0.205823] i2c i2c-2: IMX I2C adapter registered
[ 0.205864] i2c i2c-2: can't use DMA, using PIO instead.
[ 0.209038] clocksource: Switched to clocksource mxc_timer1
[ 0.209964] VFS: Disk quotas dquot_6.6.0
[ 0.210173] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.531436] hw perfevents: no interrupt-affinity property for /soc/pmu, guessing.
[ 0.532307] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[ 0.537350] Initialise system trusted keyrings
[ 0.538058] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[ 0.552303] fuse init (API version 7.26)
[ 0.554635] random: fast init done
[ 0.566657] Key type asymmetric registered
[ 0.566764] Asymmetric key parser 'x509' registered
[ 0.566949] bounce: pool size: 64 pages
[ 0.567072] io scheduler noop registered
[ 0.567097] io scheduler deadline registered
[ 0.567478] io scheduler cfq registered (default)
[ 0.567509] io scheduler mq-deadline registered
[ 0.567529] io scheduler kyber registered
[ 0.571261] OF: PCI: host bridge /soc/pcie@1ffc000 ranges:
[ 0.571338] OF: PCI: IO 0x01f80000..0x01f8ffff -> 0x00000000
[ 0.571484] OF: PCI: MEM 0x01000000..0x01efffff -> 0x01000000
[ 1.689981] imx6q-pcie 1ffc000.pcie: phy link never came up
[ 1.693771] imx6q-pcie 1ffc000.pcie: PCI host bridge to bus 0000:00
[ 1.693814] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.693842] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 1.693865] pci_bus 0000:00: root bus resource [mem 0x01000000-0x01efffff]
[ 1.695278] PCI: bus0: Fast back to back transfers disabled
[ 1.695624] PCI: bus1: Fast back to back transfers enabled
[ 1.695715] pci 0000:00:00.0: BAR 0: assigned [mem 0x01000000-0x010fffff]
[ 1.695755] pci 0000:00:00.0: BAR 6: assigned [mem 0x01100000-0x0110ffff pref]
[ 1.695784] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 1.697020] pcieport 0000:00:00.0: Signaling PME with IRQ 302
[ 1.697703] pcieport 0000:00:00.0: AER enabled with IRQ 302
[ 1.704812] imx-pgc-pd imx-pgc-power-domain.0: Linked as a consumer to 20dc000.gpc
[ 1.705480] imx-pgc-pd imx-pgc-power-domain.1: Linked as a consumer to 20dc000.gpc
[ 1.708252] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 26, base_baud = 5000000) is a IMX
[ 2.383903] console [ttymxc0] enabled
[ 2.404502] etnaviv gpu-subsystem: bound 134000.gpu (ops gpu_ops)
[ 2.410867] etnaviv gpu-subsystem: bound 130000.gpu (ops gpu_ops)
[ 2.417061] etnaviv gpu-subsystem: bound 2204000.gpu (ops gpu_ops)
[ 2.423369] etnaviv-gpu 134000.gpu: model: GC320, revision: 5007
[ 2.460086] etnaviv-gpu 130000.gpu: model: GC2000, revision: 5108
[ 2.496724] etnaviv-gpu 2204000.gpu: model: GC355, revision: 1215
[ 2.502953] etnaviv-gpu 2204000.gpu: Ignoring GPU with VG and FE2.0
[ 2.511709] [drm] Initialized etnaviv 1.1.0 20151214 for gpu-subsystem on minor 0
[ 2.521192] ------------[ cut here ]------------
[ 2.525866] WARNING: CPU: 0 PID: 1 at ./include/linux/reset.h:67 ipu_probe+0x1cc/0x274
[ 2.533880] Modules linked in:
[ 2.536979] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.15.0 #18
[ 2.543004] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 2.549547] Backtrace:
[ 2.552032] [<c010c828>] (dump_backtrace) from [<c010caf4>] (show_stack+0x18/0x1c)
[ 2.559623] r7:00000000 r6:60000013 r5:00000000 r4:c0a35794
[ 2.565308] [<c010cadc>] (show_stack) from [<c058a494>] (dump_stack+0xb4/0xec)
[ 2.572566] [<c058a3e0>] (dump_stack) from [<c0123598>] (__warn+0xcc/0xf8)
[ 2.579461] r10:00000048 r9:c0499838 r8:00000043 r7:00000009 r6:c07524d4 r5:00000000
[ 2.587307] r4:00000000 r3:c0a170f8
[ 2.590907] [<c01234cc>] (__warn) from [<c0123694>] (warn_slowpath_null+0x44/0x50)
[ 2.598496] r9:02400000 r8:ef7f2a78 r7:ec514e00 r6:c0499838 r5:00000043 r4:c07524d4
[ 2.606261] [<c0123650>] (warn_slowpath_null) from [<c0499838>] (ipu_probe+0x1cc/0x274)
[ 2.614281] r6:00000000 r5:ec1e5010 r4:ec50f710
[ 2.618930] [<c049966c>] (ipu_probe) from [<c04a9958>] (platform_drv_probe+0x58/0xb4)
[ 2.626779] r10:00000000 r9:00000000 r8:c0a2d7d0 r7:fffffdfb r6:c0a2d7d0 r5:fffffffe
[ 2.634622] r4:ec1e5010
[ 2.637179] [<c04a9900>] (platform_drv_probe) from [<c04a7e50>] (driver_probe_device+0x254/0x338)
[ 2.646068] r7:00000000 r6:c119bd4c r5:c119bd48 r4:ec1e5010
[ 2.651749] [<c04a7bfc>] (driver_probe_device) from [<c04a7fe8>] (__driver_attach+0xb4/0xb8)
[ 2.660205] r10:c0a2e238 r9:c04a9900 r8:c04a98b8 r7:00000000 r6:ec1e5044 r5:c0a2d7d0
[ 2.668050] r4:ec1e5010 r3:00000000
[ 2.671646] [<c04a7f34>] (__driver_attach) from [<c04a614c>] (bus_for_each_dev+0x54/0xa4)
[ 2.679841] r7:00000000 r6:c04a7f34 r5:c0a2d7d0 r4:00000000
[ 2.685520] [<c04a60f8>] (bus_for_each_dev) from [<c04a77b0>] (driver_attach+0x20/0x28)
[ 2.693540] r6:c0a2e238 r5:ec518180 r4:c0a2d7d0
[ 2.698177] [<c04a7790>] (driver_attach) from [<c04a72a8>] (bus_add_driver+0x178/0x20c)
[ 2.706201] [<c04a7130>] (bus_add_driver) from [<c04a8964>] (driver_register+0x80/0xfc)
[ 2.714223] r7:c064ef14 r6:00000000 r5:00000003 r4:c0a2d7d0
[ 2.719904] [<c04a88e4>] (driver_register) from [<c04a9a5c>] (__platform_register_drivers+0x5c/0xe4)
[ 2.729051] r5:00000003 r4:00000002
[ 2.732653] [<c04a9a00>] (__platform_register_drivers) from [<c083e240>] (imx_ipu_init+0x1c/0x24)
[ 2.741544] r10:c0800608 r9:c084b858 r8:00000007 r7:c07b1d2c r6:ffffe000 r5:c083e224
[ 2.749386] r4:00000000
[ 2.751944] [<c083e224>] (imx_ipu_init) from [<c0101bf4>] (do_one_initcall+0x44/0x170)
[ 2.759896] [<c0101bb0>] (do_one_initcall) from [<c0800e60>] (kernel_init_freeable+0x120/0x1e0)
[ 2.768613] r8:00000007 r7:c07b1d2c r6:c084b850 r5:c0858b88 r4:c0a36c80
[ 2.775341] [<c0800d40>] (kernel_init_freeable) from [<c059d904>] (kernel_init+0x10/0x118)
[ 2.783625] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c059d8f4
[ 2.791468] r4:00000000
[ 2.794032] [<c059d8f4>] (kernel_init) from [<c0108054>] (ret_from_fork+0x14/0x20)
[ 2.801617] r5:c059d8f4 r4:00000000
[ 2.805380] ---[ end trace 22d3f38891ba6363 ]---
[ 2.810103] imx-ipuv3 2400000.ipu: failed to reset: -524
[ 2.815810] imx-ipuv3: probe of 2400000.ipu failed with error -524
[ 2.822468] ------------[ cut here ]------------
[ 2.827128] WARNING: CPU: 0 PID: 1 at ./include/linux/reset.h:67 ipu_probe+0x1cc/0x274
[ 2.835138] Modules linked in:
[ 2.838239] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.15.0 #18
[ 2.845569] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 2.852112] Backtrace:
[ 2.854601] [<c010c828>] (dump_backtrace) from [<c010caf4>] (show_stack+0x18/0x1c)
[ 2.862194] r7:00000000 r6:60000013 r5:00000000 r4:c0a35794
[ 2.867880] [<c010cadc>] (show_stack) from [<c058a494>] (dump_stack+0xb4/0xec)
[ 2.875141] [<c058a3e0>] (dump_stack) from [<c0123598>] (__warn+0xcc/0xf8)
[ 2.882038] r10:0000004c r9:c0499838 r8:00000043 r7:00000009 r6:c07524d4 r5:00000000
[ 2.889882] r4:00000000 r3:c0a170f8
[ 2.893484] [<c01234cc>] (__warn) from [<c0123694>] (warn_slowpath_null+0x44/0x50)
[ 2.901075] r9:02800000 r8:ef7f45ec r7:ec514e80 r6:c0499838 r5:00000043 r4:c07524d4
[ 2.908841] [<c0123650>] (warn_slowpath_null) from [<c0499838>] (ipu_probe+0x1cc/0x274)
[ 2.916863] r6:00000000 r5:ec1e6010 r4:ec50f710
[ 2.921510] [<c049966c>] (ipu_probe) from [<c04a9958>] (platform_drv_probe+0x58/0xb4)
[ 2.929362] r10:00000000 r9:00000000 r8:c0a2d7d0 r7:fffffdfb r6:c0a2d7d0 r5:fffffffe
[ 2.937207] r4:ec1e6010
[ 2.939766] [<c04a9900>] (platform_drv_probe) from [<c04a7e50>] (driver_probe_device+0x254/0x338)
[ 2.948657] r7:00000000 r6:c119bd4c r5:c119bd48 r4:ec1e6010
[ 2.954340] [<c04a7bfc>] (driver_probe_device) from [<c04a7fe8>] (__driver_attach+0xb4/0xb8)
[ 2.962799] r10:c0a2e238 r9:c04a9900 r8:c04a98b8 r7:00000000 r6:ec1e6044 r5:c0a2d7d0
[ 2.970647] r4:ec1e6010 r3:00000000
[ 2.974244] [<c04a7f34>] (__driver_attach) from [<c04a614c>] (bus_for_each_dev+0x54/0xa4)
[ 2.982440] r7:00000000 r6:c04a7f34 r5:c0a2d7d0 r4:00000000
[ 2.988119] [<c04a60f8>] (bus_for_each_dev) from [<c04a77b0>] (driver_attach+0x20/0x28)
[ 2.996139] r6:c0a2e238 r5:ec518180 r4:c0a2d7d0
[ 3.000778] [<c04a7790>] (driver_attach) from [<c04a72a8>] (bus_add_driver+0x178/0x20c)
[ 3.008803] [<c04a7130>] (bus_add_driver) from [<c04a8964>] (driver_register+0x80/0xfc)
[ 3.016825] r7:c064ef14 r6:00000000 r5:00000003 r4:c0a2d7d0
[ 3.022508] [<c04a88e4>] (driver_register) from [<c04a9a5c>] (__platform_register_drivers+0x5c/0xe4)
[ 3.031656] r5:00000003 r4:00000002
[ 3.035260] [<c04a9a00>] (__platform_register_drivers) from [<c083e240>] (imx_ipu_init+0x1c/0x24)
[ 3.044152] r10:c0800608 r9:c084b858 r8:00000007 r7:c07b1d2c r6:ffffe000 r5:c083e224
[ 3.051996] r4:00000000
[ 3.054553] [<c083e224>] (imx_ipu_init) from [<c0101bf4>] (do_one_initcall+0x44/0x170)
[ 3.062503] [<c0101bb0>] (do_one_initcall) from [<c0800e60>] (kernel_init_freeable+0x120/0x1e0)
[ 3.071222] r8:00000007 r7:c07b1d2c r6:c084b850 r5:c0858b88 r4:c0a36c80
[ 3.077952] [<c0800d40>] (kernel_init_freeable) from [<c059d904>] (kernel_init+0x10/0x118)
[ 3.086236] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c059d8f4
[ 3.094081] r4:00000000
[ 3.096644] [<c059d8f4>] (kernel_init) from [<c0108054>] (ret_from_fork+0x14/0x20)
[ 3.104230] r5:c059d8f4 r4:00000000
[ 3.107916] ---[ end trace 22d3f38891ba6364 ]---
[ 3.112644] imx-ipuv3 2800000.ipu: failed to reset: -524
[ 3.118064] imx-ipuv3: probe of 2800000.ipu failed with error -524
[ 3.155025] brd: module loaded
[ 3.188594] loop: module loaded
[ 3.194090] i2c /dev entries driver
[ 3.203444] Registering SWP/SWPB emulation handler
[ 3.210521] Loading compiled-in X.509 certificates
[ 3.271645] input: gpio-keys as /devices/soc0/gpio-keys/input/input0
[ 3.287008] Freeing unused kernel memory: 2048K

I also anexed the .config file. 

Im running it on imx6quadSD and the linux is 4.15.
Id appreciate any input because im stuck here and all the answers found on google didnt work. 

Kind regards, 

Ailton Lopes 

0 Kudos
1 Solution
6,097 Views
ailtonlopes
Contributor III

The problem was that i had all the interrupts as non secure and but removing that it worked fine. 

View solution in original post

0 Kudos
4 Replies
6,098 Views
ailtonlopes
Contributor III

The problem was that i had all the interrupts as non secure and but removing that it worked fine. 

0 Kudos
6,097 Views
adrian_kuhlbrod
Contributor I

Hi Ailton,

I facing the same problem like you I think. Would you share some more Information about your solution? ...

"The problem was that i had all the interrupts as non secure and but removing that it worked fine."

regards

Adrian

0 Kudos
6,097 Views
jimmychan
NXP TechSupport
NXP TechSupport

our official BSP is not support hypervisor 

0 Kudos
6,097 Views
ailtonlopes
Contributor III

jimmychan but it is possible to run linux without the U-boot? because at the moment i only have linux running the only difference is that im not using the u-boot.

0 Kudos