linux kernel - Cannot reserve 512MB or more of CMA -


i'm trying reserve 512mb of cma memory on arm64 box 64gb of memory, , i'll "cma: failed reserve 512mib" error message during linux boot. reserving 384mb works fine. please let me know if need further info. i'd appreciate help.

[esl_start_os]:[644l] start jump linux kernel     booting linux on physical cpu 0x10000     initializing cgroup subsys cpuset     initializing cgroup subsys cpu     initializing cgroup subsys cpuacct     linux version 4.1.0+ (s00327669@salem-linux) (gcc version 4.9.3 20141031 (prerelease) (linaro gcc 2014.11) ) #4 smp mon oct 5 12:00:57 edt 2015     cpu: aarch64 processor [411fd071] revision 1     detected pipt i-cache on cpu0     alternatives: enabling workaround arm erratum 832075     earlycon: serial console @ mmio32 0x60300000 (options '')     bootconsole [uart0] enabled     efi: getting efi parameters fdt:     efi: uefi not found.     cma: failed reserve 512 mib     percpu: embedded 16 pages/cpu @ffffffd7bfa00000 s27648 r8192 d29696 u65536     built 1 zonelists in zone order, mobility grouping on.  total pages: 16514064     kernel command line: rdinit=/init console=ttys0,115200 earlycon=uart8250,mmio32,0x60300000 cma=512m                                                                                                      log_buf_len individual max cpu contribution: 4096 bytes     log_buf_len total cpu_extra contributions: 126976 bytes     log_buf_len min size: 16384 bytes     log_buf_len: 262144 bytes     log buf free: 14220(86%)     pid hash table entries: 4096 (order: 3, 32768 bytes)     dentry cache hash table entries: 8388608 (order: 14, 67108864 bytes)     inode-cache hash table entries: 4194304 (order: 13, 33554432 bytes)     software io tlb [mem 0x3bbff000-0x3fbff000] (64mb) mapped @ [ffffffc03bbff000-ffffffc03fbfefff]     memory: 65469716k/67104768k available (6109k kernel code, 537k rwdata, 2516k rodata, 436k init, 226k bss, 1635052k reserved, 0k cma-reserved)     virtual kernel memory layout:         vmalloc : 0xffffff8000000000 - 0xffffffbdbfff0000   (   246 gb)         vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000   (     8 gb maximum)                   0xffffffbdc0000000 - 0xffffffbe20000000   (  1536 mb actual)         fixed   : 0xffffffbffabfd000 - 0xffffffbffac00000   (    12 kb)         pci i/o : 0xffffffbffae00000 - 0xffffffbffbe00000   (    16 mb)         modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 mb)         memory  : 0xffffffc000000000 - 0xffffffd800000000   ( 98304 mb)           .init : 0xffffffc0008ef000 - 0xffffffc00095c000   (   436 kb)           .text : 0xffffffc000080000 - 0xffffffc0008ee7c4   (  8634 kb)           .data : 0xffffffc000965000 - 0xffffffc0009eb400   (   537 kb)     slub: hwalign=64, order=0-3, minobjects=0, cpus=32, nodes=1     hierarchical rcu implementation.             additional per-cpu info printed stalls.     nr_irqs:64 nr_irqs:64 0     its: /interrupt-controller@6d000000/interrupt-controller@6c000000     its: allocated 65536 devices @17b9480000 (psz 4k, shr 2)     its: allocated 512 virtual cpus @17b9418000 (psz 4k, shr 2)     its: allocated 512 interrupt collections @17b9419000 (psz 4k, shr 2)     its: /interrupt-controller@6d000000/interrupt-controller@4c000000     its: allocated 65536 devices @17b9500000 (psz 4k, shr 2)     its: allocated 512 virtual cpus @17b9432000 (psz 4k, shr 2)     its: allocated 512 interrupt collections @17b9433000 (psz 4k, shr 2)     its: /interrupt-controller@6d000000/interrupt-controller@c6000000     its: allocated 65536 devices @17b9580000 (psz 4k, shr 2)     its: allocated 512 virtual cpus @17b943d000 (psz 4k, shr 2)     its: allocated 512 interrupt collections @17b943e000 (psz 4k, shr 2)     its: /interrupt-controller@6d000000/interrupt-controller@a3000000     its: allocated 65536 devices @17b9600000 (psz 4k, shr 2)     its: allocated 512 virtual cpus @17b9467000 (psz 4k, shr 2)     its: allocated 512 interrupt collections @17b9468000 (psz 4k, shr 2)     its: /interrupt-controller@6d000000/interrupt-controller@b7000000     its: allocated 65536 devices @17b9700000 (psz 4k, shr 2)     its: allocated 512 virtual cpus @17b9681000 (psz 4k, shr 2)     its: allocated 512 interrupt collections @17b9682000 (psz 4k, shr 2)     gic: using lpi property table @0x00000017b96a0000     its: allocated 1792 chunks lpis     cpu0: found redistributor 10000 region 1:0x000000004d100000     cpu0: using lpi pending table @0x00000017b96b0000     mbigen: /peripherals/interrupt-controller@4c030000     mbigen: /peripherals/interrupt-controller@6c030000     mbigen: /peripherals/interrupt-controller@c6030000     mbigen: /peripherals/interrupt-controller@a3030000     mbigen: /peripherals/interrupt-controller@b7030000     architected cp15 timer(s) running @ 50.00mhz (phys).     clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb8812736b, max_idle_ns: 440795202655 ns     sched_clock: 56 bits @ 50mhz, resolution 20ns, wraps every 4398046511100ns     console: colour dummy device 80x25     calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 bogomips (lpj=200000)     pid_max: default: 32768 minimum: 301     security framework initialized     mount-cache hash table entries: 131072 (order: 8, 1048576 bytes)     mountpoint-cache hash table entries: 131072 (order: 8, 1048576 bytes)     initializing cgroup subsys memory     initializing cgroup subsys devices     initializing cgroup subsys freezer     initializing cgroup subsys hugetlb     hw perfevents: enabled arm/armv8-pmuv3 pmu driver, 7 counters available     efi services not available.     cpu1: booted secondary processor     detected pipt i-cache on cpu1     cpu1: found redistributor 10001 region 1:0x000000004d130000     cpu1: using lpi pending table @0x00000017b8ee0000     cpu2: booted secondary processor     detected pipt i-cache on cpu2     cpu2: found redistributor 10002 region 1:0x000000004d160000     cpu2: using lpi pending table @0x00000017b8f10000     cpu3: booted secondary processor     detected pipt i-cache on cpu3     cpu3: found redistributor 10003 region 1:0x000000004d190000     cpu3: using lpi pending table @0x00000017b8f40000     cpu4: booted secondary processor     detected pipt i-cache on cpu4     cpu4: found redistributor 10100 region 1:0x000000004d1c0000     cpu4: using lpi pending table @0x00000017b8f80000     cpu5: booted secondary processor     detected pipt i-cache on cpu5     cpu5: found redistributor 10101 region 1:0x000000004d1f0000     cpu5: using lpi pending table @0x00000017b8fa0000     cpu6: booted secondary processor     detected pipt i-cache on cpu6     cpu6: found redistributor 10102 region 1:0x000000004d220000     cpu6: using lpi pending table @0x00000017b8fd0000     cpu7: booted secondary processor     detected pipt i-cache on cpu7     cpu7: found redistributor 10103 region 1:0x000000004d250000     cpu7: using lpi pending table @0x00000017b8800000     cpu8: booted secondary processor     detected pipt i-cache on cpu8     cpu8: found redistributor 10200 region 1:0x000000004d280000     cpu8: using lpi pending table @0x00000017b8840000     cpu9: booted secondary processor     detected pipt i-cache on cpu9     cpu9: found redistributor 10201 region 1:0x000000004d2b0000     cpu9: using lpi pending table @0x00000017b8870000     cpu10: booted secondary processor     detected pipt i-cache on cpu10     cpu10: found redistributor 10202 region 1:0x000000004d2e0000     cpu10: using lpi pending table @0x00000017b88b0000     cpu11: booted secondary processor     detected pipt i-cache on cpu11     cpu11: found redistributor 10203 region 1:0x000000004d310000     cpu11: using lpi pending table @0x00000017b88e0000     cpu12: booted secondary processor     detected pipt i-cache on cpu12     cpu12: found redistributor 10300 region 1:0x000000004d340000     cpu12: using lpi pending table @0x00000017b8910000     cpu13: booted secondary processor     detected pipt i-cache on cpu13     cpu13: found redistributor 10301 region 1:0x000000004d370000     cpu13: using lpi pending table @0x00000017b8940000     cpu14: booted secondary processor     detected pipt i-cache on cpu14     cpu14: found redistributor 10302 region 1:0x000000004d3a0000     cpu14: using lpi pending table @0x00000017b8970000     cpu15: booted secondary processor     detected pipt i-cache on cpu15     cpu15: found redistributor 10303 region 1:0x000000004d3d0000     cpu15: using lpi pending table @0x00000017b89a0000     cpu16: booted secondary processor     detected pipt i-cache on cpu16     cpu16: found redistributor 20000 region 0:0x000000006d100000     cpu16: using lpi pending table @0x00000017b89e0000     cpu17: booted secondary processor     detected pipt i-cache on cpu17     cpu17: found redistributor 20001 region 0:0x000000006d130000     cpu17: using lpi pending table @0x00000017b8a10000     cpu18: booted secondary processor     detected pipt i-cache on cpu18     cpu18: found redistributor 20002 region 0:0x000000006d160000     cpu18: using lpi pending table @0x00000017b8a40000     cpu19: booted secondary processor     detected pipt i-cache on cpu19     cpu19: found redistributor 20003 region 0:0x000000006d190000     cpu19: using lpi pending table @0x00000017b8a80000     cpu20: booted secondary processor     detected pipt i-cache on cpu20     cpu20: found redistributor 20100 region 0:0x000000006d1c0000     cpu20: using lpi pending table @0x00000017b8aa0000     cpu21: booted secondary processor     detected pipt i-cache on cpu21     cpu21: found redistributor 20101 region 0:0x000000006d1f0000     cpu21: using lpi pending table @0x00000017b8ad0000     cpu22: booted secondary processor     detected pipt i-cache on cpu22     cpu22: found redistributor 20102 region 0:0x000000006d220000     cpu22: using lpi pending table @0x00000017b8b10000     cpu23: booted secondary processor     detected pipt i-cache on cpu23     cpu23: found redistributor 20103 region 0:0x000000006d250000     cpu23: using lpi pending table @0x00000017b8b40000     cpu24: booted secondary processor     detected pipt i-cache on cpu24     cpu24: found redistributor 20200 region 0:0x000000006d280000     cpu24: using lpi pending table @0x00000017b8b70000     cpu25: booted secondary processor     detected pipt i-cache on cpu25     cpu25: found redistributor 20201 region 0:0x000000006d2b0000     cpu25: using lpi pending table @0x00000017b8bb0000     cpu26: booted secondary processor     detected pipt i-cache on cpu26     cpu26: found redistributor 20202 region 0:0x000000006d2e0000     cpu26: using lpi pending table @0x00000017b8be0000     cpu27: booted secondary processor     detected pipt i-cache on cpu27     cpu27: found redistributor 20203 region 0:0x000000006d310000     cpu27: using lpi pending table @0x00000017b8400000     cpu28: booted secondary processor     detected pipt i-cache on cpu28     cpu28: found redistributor 20300 region 0:0x000000006d340000     cpu28: using lpi pending table @0x00000017b8450000     cpu29: booted secondary processor     detected pipt i-cache on cpu29     cpu29: found redistributor 20301 region 0:0x000000006d370000     cpu29: using lpi pending table @0x00000017b8470000     cpu30: booted secondary processor     detected pipt i-cache on cpu30     cpu30: found redistributor 20302 region 0:0x000000006d3a0000     cpu30: using lpi pending table @0x00000017b84b0000     cpu31: booted secondary processor     detected pipt i-cache on cpu31     cpu31: found redistributor 20303 region 0:0x000000006d3d0000     cpu31: using lpi pending table @0x00000017b84e0000     brought 32 cpus     smp: total of 32 processors activated.     cpu: cpu(s) started @ el2     alternatives: patching kernel code     devtmpfs: initialized     dmi not present or invalid.     clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns     atomic64_test: passed     pinctrl core: initialized pinctrl subsystem     net: registered protocol family 16     cpuidle: using governor ladder     cpuidle: using governor menu     vdso: 2 pages (1 code @ ffffffc00096d000, 1 data @ ffffffc00096c000)     hw-breakpoint: found 6 breakpoint , 4 watchpoint registers.     dma: preallocated 256 kib pool atomic allocations     serial: amba pl011 uart driver     hisi-smmu 40040000.smmu_pa: registered 0 master devices     hisi-smmu 40040000.smmu_pa: probing hardware configuration...     hisi-smmu 40040000.smmu_pa:     nested translation     hisi-smmu 40040000.smmu_pa:     coherent table walk     hisi-smmu 40040000.smmu_pa:     39-bit va, 39-bit ipa, 48-bit pa     hisi-smmu 60040000.smmu_pc: registered 0 master devices     hisi-smmu 60040000.smmu_pc: probing hardware configuration...     hisi-smmu 60040000.smmu_pc:     nested translation     hisi-smmu 60040000.smmu_pc:     coherent table walk     hisi-smmu 60040000.smmu_pc:     39-bit va, 39-bit ipa, 48-bit pa     hisi-smmu c0040000.smmu_dsa: registered 0 master devices     hisi-smmu c0040000.smmu_dsa: probing hardware configuration...     hisi-smmu c0040000.smmu_dsa:    nested translation     hisi-smmu c0040000.smmu_dsa:    coherent table walk     hisi-smmu c0040000.smmu_dsa:    39-bit va, 39-bit ipa, 48-bit pa     warning: mbigen device id exist.old:0x2,new:0x20     hisi-smmu a0040000.smmu_m3: registered 0 master devices     hisi-smmu a0040000.smmu_m3: probing hardware configuration...     hisi-smmu a0040000.smmu_m3:     nested translation     hisi-smmu a0040000.smmu_m3:     coherent table walk     hisi-smmu a0040000.smmu_m3:     39-bit va, 39-bit ipa, 48-bit pa     hisi-smmu b0040000.smmu_pcie: registered 0 master devices     hisi-smmu b0040000.smmu_pcie: probing hardware configuration...     hisi-smmu b0040000.smmu_pcie:   nested translation     hisi-smmu b0040000.smmu_pcie:   coherent table walk     hisi-smmu b0040000.smmu_pcie:   39-bit va, 39-bit ipa, 48-bit pa     vgaarb: loaded     scsi subsystem initialized     usbcore: registered new interface driver usbfs     usbcore: registered new interface driver hub     usbcore: registered new device driver usb     warning: mbigen device id exist.old:0x1,new:0x10     warning: mbigen device id exist.old:0x3,new:0x30     warning: mbigen device id exist.old:0x3,new:0x30     switched clocksource arch_sys_counter     net: registered protocol family 2     tcp established hash table entries: 524288 (order: 10, 4194304 bytes)     tcp bind hash table entries: 65536 (order: 8, 1048576 bytes)     tcp: hash tables configured (established 524288 bind 65536)     udp hash table entries: 32768 (order: 8, 1048576 bytes)     udp-lite hash table entries: 32768 (order: 8, 1048576 bytes)     net: registered protocol family 1     rpc: registered named unix socket transport module.     rpc: registered udp transport module.     rpc: registered tcp transport module.     rpc: registered tcp nfsv4.1 backchannel transport module.     unpacking initramfs...     freeing initrd memory: 409600k (ffffffc007000000 - ffffffc020000000)     futex hash table entries: 8192 (order: 7, 524288 bytes)     audit: initializing netlink subsys (disabled)     audit: type=2000 audit(5.048:1): initialized     hugetlb registered 2 mb page size, pre-allocated 0 pages     vfs: disk quotas dquot_6.6.0     vfs: dquot-cache hash table entries: 512 (order 0, 4096 bytes)     nfs: registering id_resolver key type     key type id_resolver registered     key type id_legacy registered     fuse init (api version 7.23)     9p: installing v9fs 9p2000 file system support     bounce: pool size: 64 pages     block layer scsi generic (bsg) driver version 0.4 loaded (major 252)     io scheduler noop registered     io scheduler cfq registered (default)     hisi-pcie b0080000.pcie: link     pci host bridge /pcie@0xb0080000 ranges:       mem 0xb4100000..0xb4ffffff -> 0xb4100000     hisi-pcie b0080000.pcie: pci host bridge bus 0000:10     pci_bus 0000:10: root bus resource [bus 10-1f]     pci_bus 0000:10: root bus resource [mem 0xb4100000-0xb4ffffff]     pci 0000:10:00.0: iommu not supported pci     pci 0000:10:00.0: of_irq_parse_pci() failed rc=-22     pci 0000:10:00.0: primary bus hard wired 0     pci 0000:10:00.0: bridge configuration invalid ([bus 01-01]), reconfiguring     pci 0000:11:00.0: iommu not supported pci     pci 0000:11:00.0: of_irq_parse_pci() failed rc=-22     pci 0000:10:00.0: bar 0: no space [mem size 0x10000000]     pci 0000:10:00.0: bar 0: failed assign [mem size 0x10000000]     pci 0000:10:00.0: bar 8: assigned [mem 0xb4200000-0xb43fffff]     pci 0000:11:00.0: bar 0: assigned [mem 0xb4200000-0xb43fffff]     pci 0000:10:00.0: pci bridge [bus 11]     pci 0000:10:00.0:   bridge window [mem 0xb4200000-0xb43fffff]     serial: 8250/16550 driver, 4 ports, irq sharing disabled     console [ttys0] disabled     60300000.uart: ttys0 @ mmio 0x60300000 (irq = 12, base_baud = 12500000) 16550a     console [ttys0] enabled     console [ttys0] enabled     bootconsole [uart0] disabled     bootconsole [uart0] disabled     msm_serial: driver initialized     unable detect cache hierarcy dt cpu 0     loop: module loaded     at24 1-0052: 16384 byte 24c128 eeprom, writable, 64 bytes/write     loading iscsi transport class v2.0-870.     rdac: device handler registered     hp_sw: device handler registered     emc: device handler registered     alua: device handler registered 

with config_zone_dma enabled, default on arm64, cma restricted physical memory devices 32-bit addressing capabilities can access. therefore if there isn't enough free ram below 4gb boundary find contiguous 512mb block (with sufficient alignment) it's going fail, regardless of how ram exists @ higher addresses. that's going depend on exact physical memory map of machine, kernel loaded, reservations bootloader has made, etc.

by way of comparison, happily boot 1 of dev boards cma=1024m - 1 has 2gb of ram below 4gb, kernel loaded near bottom , small firmware reservation near top, , evidently managed find big enough space between two. same kernel zone_dma disabled happily allocated 4gb of cma (which can have come out of upper 6gb block), didn't closely @ how badly broken peripherals possibility of being given unreachable dma addresses.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -