From: Damien Le Moal <Damien.LeMoal@wdc.com> To: Sean Anderson <seanga2@gmail.com>, "linux-riscv@lists.infradead.org" <linux-riscv@lists.infradead.org>, Palmer Dabbelt <palmer@dabbelt.com> Cc: Anup Patel <Anup.Patel@wdc.com>, Paul Walmsley <paul.walmsley@sifive.com> Subject: Re: [PATCH 00/10] Kendryte k210 SoC boards support Date: Mon, 2 Mar 2020 03:01:55 +0000 Message-ID: <BYAPR04MB581679CF61DF51E1588D7960E7E70@BYAPR04MB5816.namprd04.prod.outlook.com> (raw) In-Reply-To: <5be71201-962c-5db6-c330-f30a770c4034@gmail.com> On 2020/02/29 5:32, Sean Anderson wrote: > Hi, > > When booting from U-Boot I get an OOM. Perhaps this is related to the > second cpu not coming up? Unlikely. It looks like your user space needs 2MB per shell (order 9 allocation). Since you have only 5.5MB free, that may explain the allocation failure (if init is forking another shell especially). For the second core not coming up, an IPI needs to be sent to the non-boot core to wake it up. A Kendryte thing. U-boot should probably do it before jumping to the kernel. I thought I had that in the kernel though. Will check again. > > => go 80000000 > ## Starting application at 0x80000000 ... > [ 0.000000] Linux version 5.6.0-rc1-00054-gd32122774dab (sean@godwin) (gcc version 9.2.0 (GCC)) #12 SMP Fri Feb 28 14:34:45 EST 2020 > [ 0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '') > [ 0.000000] printk: bootconsole [sifive0] enabled > [ 0.000000] initrd not found or empty - disabling initrd > [ 0.000000] Zone ranges: > [ 0.000000] DMA32 [mem 0x0000000080000000-0x00000000807fffff] > [ 0.000000] Normal empty > [ 0.000000] Movable zone start for each node > [ 0.000000] Early memory node ranges > [ 0.000000] node 0: [mem 0x0000000080000000-0x00000000807fffff] > [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff] > [ 0.000000] elf_hwcap is 0x112d > [ 0.000000] percpu: max_distance=0x18000 too large for vmalloc space 0x0 > [ 0.000000] percpu: Embedded 12 pages/cpu s18272 r0 d30880 u49152 > [ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 2020 > [ 0.000000] Kernel command line: earlycon console=ttySIF0 > [ 0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear) > [ 0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear) > [ 0.000000] Sorting __ex_table... > [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off > [ 0.000000] Memory: 5528K/8192K available (918K kernel code, 106K rwdata, 166K rodata, 1129K init, 91K bss, 2664K reserved, 0K cma-reserved) > [ 0.000000] rcu: Hierarchical RCU implementation. > [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. > [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0 > [ 0.000000] plic: mapped 65 interrupts with 2 handlers for 4 contexts. > [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0] > [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns > [ 0.000015] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns > [ 0.008238] Console: colour dummy device 80x25 > [ 0.012477] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200) > [ 0.022684] pid_max: default: 4096 minimum: 301 > [ 0.027302] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear) > [ 0.034423] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear) > [ 0.044826] rcu: Hierarchical SRCU implementation. > [ 0.049623] smp: Bringing up secondary CPUs ... > [ 1.083970] CPU1: failed to come online > [ 1.087079] smp: Brought up 1 node, 1 CPU > [ 1.092006] devtmpfs: initialized > [ 1.098586] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns > [ 1.107609] futex hash table entries: 16 (order: -2, 1024 bytes, linear) > [ 1.115619] Kendryte K210 SoC sysctl > [ 1.129362] clocksource: Switched to clocksource riscv_clocksource > [ 1.385690] swapper/0: page allocation failure: order:9, mode:0x100cc2(GFP_HIGHUSER), nodemask=(null) > [ 1.394224] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc1-00054-gd32122774dab #12 > [ 1.402129] Call Trace: > [ 1.404565] [<000000008011c2f2>] 0x000000008011c2f2 > [ 1.409426] [<000000008011c436>] 0x000000008011c436 > [ 1.414287] [<00000000801ed86e>] 0x00000000801ed86e > [ 1.419150] [<00000000801740c0>] 0x00000000801740c0 > [ 1.424012] [<00000000801743d4>] 0x00000000801743d4 > [ 1.428874] [<00000000801746da>] 0x00000000801746da > [ 1.433736] [<00000000801ababe>] 0x00000000801ababe > [ 1.438598] [<00000000801abbf2>] 0x00000000801abbf2 > [ 1.443460] [<000000008018b06a>] 0x000000008018b06a > [ 1.448322] [<0000000080176de0>] 0x0000000080176de0 > [ 1.453184] [<0000000080176fd2>] 0x0000000080176fd2 > [ 1.458047] [<0000000080001b8a>] 0x0000000080001b8a > [ 1.462909] [<000000008000145a>] 0x000000008000145a > [ 1.467771] [<00000000800014b0>] 0x00000000800014b0 > [ 1.472633] [<000000008000e7cc>] 0x000000008000e7cc > [ 1.477495] [<000000008000e80c>] 0x000000008000e80c > [ 1.482357] [<0000000080001e44>] 0x0000000080001e44 > [ 1.487219] [<0000000080000a80>] 0x0000000080000a80 > [ 1.492081] [<0000000080000ce4>] 0x0000000080000ce4 > [ 1.496943] [<00000000801fd934>] 0x00000000801fd934 > [ 1.501805] [<000000008011b304>] 0x000000008011b304 > [ 1.506918] Mem-Info: > [ 1.508957] active_anon:0 inactive_anon:0 isolated_anon:0 > [ 1.508957] active_file:0 inactive_file:0 isolated_file:0 > [ 1.508957] unevictable:315 dirty:0 writeback:0 unstable:0 > [ 1.508957] slab_reclaimable:0 slab_unreclaimable:215 > [ 1.508957] mapped:0 shmem:0 pagetables:0 bounce:0 > [ 1.508957] free:795 free_pcp:0 free_cma:0 > [ 1.539593] Node 0 active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:1260kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0kB shmem:0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no > [ 1.560939] DMA32 free:3180kB min:296kB low:368kB high:440kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:1260kB writepending:0kB present:8192kB managed:5528kB mlocked:0kB kernel_stack:168kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB > [ 1.588696] lowmem_reserve[]: 0 0 0 > [ 1.592118] DMA32: 1*4kB (U) 1*8kB (M) 0*16kB 1*32kB (U) 1*64kB (U) 2*128kB (UM) 1*256kB (U) 1*512kB (M) 2*1024kB (UM) 0*2048kB 0*4096kB = 3180kB > [ 1.605162] 328 total pagecache pages > [ 1.608788] 2048 pages RAM > [ 1.611479] 0 pages HighMem/MovableOnly > [ 1.615299] 666 pages reserved > [ 1.743951] swapper/0 invoked oom-killer: gfp_mask=0x100cc2(GFP_HIGHUSER), order=0, oom_score_adj=0 > [ 1.752280] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc1-00054-gd32122774dab #12 > [ 1.760209] Call Trace: > [ 1.762645] [<000000008011c2f2>] 0x000000008011c2f2 > [ 1.767506] [<000000008011c436>] 0x000000008011c436 > [ 1.772368] [<00000000801ed86e>] 0x00000000801ed86e > [ 1.777230] [<00000000801634e2>] 0x00000000801634e2 > [ 1.782092] [<00000000801633c6>] 0x00000000801633c6 > [ 1.786954] [<000000008017451e>] 0x000000008017451e > [ 1.791816] [<00000000801746da>] 0x00000000801746da > [ 1.796678] [<0000000080161648>] 0x0000000080161648 > [ 1.801540] [<000000008016241e>] 0x000000008016241e > [ 1.806402] [<0000000080192fc6>] 0x0000000080192fc6 > [ 1.811264] [<00000000801624a6>] 0x00000000801624a6 > [ 1.816127] [<000000008016262c>] 0x000000008016262c > [ 1.820989] [<000000008016267e>] 0x000000008016267e > [ 1.825851] [<0000000080178178>] 0x0000000080178178 > [ 1.830713] [<00000000801781c0>] 0x00000000801781c0 > [ 1.835575] [<0000000080178b5c>] 0x0000000080178b5c > [ 1.840437] [<0000000080178c82>] 0x0000000080178c82 > [ 1.845299] [<0000000080001678>] 0x0000000080001678 > [ 1.850161] [<0000000080001724>] 0x0000000080001724 > [ 1.855023] [<000000008000145a>] 0x000000008000145a > [ 1.859885] [<00000000800014b0>] 0x00000000800014b0 > [ 1.864748] [<000000008000e7cc>] 0x000000008000e7cc > [ 1.869609] [<000000008000e80c>] 0x000000008000e80c > [ 1.874472] [<0000000080001e44>] 0x0000000080001e44 > [ 1.879334] [<0000000080000a80>] 0x0000000080000a80 > [ 1.884196] [<0000000080000ce4>] 0x0000000080000ce4 > [ 1.889058] [<00000000801fd934>] 0x00000000801fd934 > [ 1.893920] [<000000008011b304>] 0x000000008011b304 > [ 1.899086] Mem-Info: > [ 1.901072] active_anon:0 inactive_anon:0 isolated_anon:0 > [ 1.901072] active_file:0 inactive_file:0 isolated_file:0 > [ 1.901072] unevictable:705 dirty:0 writeback:0 unstable:0 > [ 1.901072] slab_reclaimable:0 slab_unreclaimable:215 > [ 1.901072] mapped:0 shmem:0 pagetables:0 bounce:0 > [ 1.901072] free:417 free_pcp:0 free_cma:0 > [ 1.931708] Node 0 active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:2820kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0kB shmem:0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no > [ 1.953051] DMA32 free:1668kB min:4392kB low:4464kB high:4536kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:2820kB writepending:0kB present:8192kB managed:5528kB mlocked:0kB kernel_stack:168kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB > [ 1.981067] lowmem_reserve[]: 0 0 0 > [ 1.984492] DMA32: 1*4kB (U) 0*8kB 0*16kB 0*32kB 0*64kB 1*128kB (U) 0*256kB 1*512kB (U) 1*1024kB (U) 0*2048kB 0*4096kB = 1668kB > [ 1.995970] 704 total pagecache pages > [ 1.999599] 2048 pages RAM > [ 2.002291] 0 pages HighMem/MovableOnly > [ 2.006110] 666 pages reserved > [ 2.009131] Tasks state (memory values in pages): > [ 2.013848] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name > [ 2.022450] Out of memory and no killable processes... > [ 2.027562] Kernel panic - not syncing: System is deadlocked on memory > [ 2.034062] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc1-00054-gd32122774dab #12 > [ 2.042036] Call Trace: > [ 2.044472] [<000000008011c2f2>] 0x000000008011c2f2 > [ 2.049333] [<000000008011c436>] 0x000000008011c436 > [ 2.054195] [<00000000801ed86e>] 0x00000000801ed86e > [ 2.059057] [<000000008011f4d8>] 0x000000008011f4d8 > [ 2.063919] [<00000000801633ea>] 0x00000000801633ea > [ 2.068782] [<000000008017451e>] 0x000000008017451e > [ 2.073644] [<00000000801746da>] 0x00000000801746da > [ 2.078506] [<0000000080161648>] 0x0000000080161648 > [ 2.083368] [<000000008016241e>] 0x000000008016241e > [ 2.088230] [<0000000080192fc6>] 0x0000000080192fc6 > [ 2.093092] [<00000000801624a6>] 0x00000000801624a6 > [ 2.097954] [<000000008016262c>] 0x000000008016262c > [ 2.102816] [<000000008016267e>] 0x000000008016267e > [ 2.107678] [<0000000080178178>] 0x0000000080178178 > [ 2.112541] [<00000000801781c0>] 0x00000000801781c0 > [ 2.117403] [<0000000080178b5c>] 0x0000000080178b5c > [ 2.122265] [<0000000080178c82>] 0x0000000080178c82 > [ 2.127127] [<0000000080001678>] 0x0000000080001678 > [ 2.131989] [<0000000080001724>] 0x0000000080001724 > [ 2.136851] [<000000008000145a>] 0x000000008000145a > [ 2.141713] [<00000000800014b0>] 0x00000000800014b0 > [ 2.146575] [<000000008000e7cc>] 0x000000008000e7cc > [ 2.151437] [<000000008000e80c>] 0x000000008000e80c > [ 2.156299] [<0000000080001e44>] 0x0000000080001e44 > [ 2.161162] [<0000000080000a80>] 0x0000000080000a80 > [ 2.166024] [<0000000080000ce4>] 0x0000000080000ce4 > [ 2.170886] [<00000000801fd934>] 0x00000000801fd934 > [ 2.175748] [<000000008011b304>] 0x000000008011b304 > [ 2.180624] ---[ end Kernel panic - not syncing: System is deadlocked on memory ]--- > > > > -- Damien Le Moal Western Digital Research
next prev parent reply index Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-12 10:34 Damien Le Moal 2020-02-12 10:34 ` [PATCH 01/10] riscv: Fix gitignore Damien Le Moal 2020-02-20 0:15 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 02/10] riscv: Force flat memory model with no-mmu Damien Le Moal 2020-02-14 20:18 ` Sean Anderson 2020-02-15 2:15 ` Damien Le Moal 2020-02-15 2:26 ` Sean Anderson 2020-02-15 2:40 ` Damien Le Moal 2020-03-02 3:48 ` Anup Patel 2020-03-04 18:38 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 03/10] riscv: Unaligned load/store handling for M_MODE Damien Le Moal 2020-03-02 3:57 ` Anup Patel 2020-03-04 19:28 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 04/10] riscv: Add BUILTIN_DTB support Damien Le Moal 2020-03-02 3:58 ` Anup Patel 2020-03-04 19:28 ` Palmer Dabbelt 2020-03-05 4:58 ` Anup Patel 2020-03-05 5:14 ` Damien Le Moal 2020-03-05 5:37 ` Anup Patel 2020-03-05 6:13 ` Damien Le Moal 2020-03-08 6:10 ` Anup Patel 2020-03-05 8:18 ` Atish Patra 2020-03-07 0:02 ` Sean Anderson 2020-03-07 1:51 ` Atish Patra 2020-03-07 2:08 ` Sean Anderson 2020-03-06 23:56 ` Sean Anderson 2020-02-12 10:34 ` [PATCH 05/10] riscv: Add SOC early init support Damien Le Moal 2020-03-04 19:28 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 06/10] riscv: Add Kendryte K210 SoC support Damien Le Moal 2020-02-14 20:31 ` Sean Anderson 2020-03-04 19:38 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 07/10] riscv: Select required drivers for Kendryte SOC Damien Le Moal 2020-03-02 3:59 ` Anup Patel 2020-03-04 19:44 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 08/10] riscv: Add Kendryte K210 device tree Damien Le Moal 2020-02-14 20:51 ` Sean Anderson 2020-02-15 2:34 ` Damien Le Moal 2020-02-15 2:48 ` Sean Anderson 2020-02-15 3:00 ` Damien Le Moal 2020-02-18 14:12 ` Carlos Eduardo de Paula 2020-02-18 14:18 ` Sean Anderson 2020-02-18 14:30 ` Carlos Eduardo de Paula 2020-02-18 17:48 ` Sean Anderson 2020-02-18 19:26 ` Carlos Eduardo de Paula 2020-02-19 9:06 ` Wladimir J. van der Laan 2020-02-19 22:28 ` Sean Anderson 2020-02-20 10:48 ` Wladimir J. van der Laan 2020-02-22 19:07 ` Wladimir J. van der Laan 2020-04-01 17:55 ` Drew Fustini 2020-04-02 2:24 ` Damien Le Moal 2020-02-19 8:50 ` Wladimir J. van der Laan 2020-02-27 19:43 ` Sean Anderson 2020-03-02 4:06 ` Anup Patel 2020-03-02 4:15 ` Damien Le Moal 2020-03-02 4:22 ` Anup Patel 2020-03-02 4:51 ` Damien Le Moal 2020-03-02 5:05 ` Anup Patel 2020-03-02 5:08 ` Damien Le Moal 2020-03-07 0:18 ` Sean Anderson 2020-03-07 4:11 ` Anup Patel 2020-03-04 19:44 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 09/10] riscv: Kendryte K210 default config Damien Le Moal 2020-03-02 4:07 ` Anup Patel 2020-03-04 19:44 ` Palmer Dabbelt 2020-02-12 10:34 ` [PATCH 10/10] riscv: create a loader.bin for the kendryte kflash.py tool Damien Le Moal 2020-03-02 4:08 ` Anup Patel 2020-03-04 19:44 ` Palmer Dabbelt 2020-02-14 15:05 ` [PATCH 00/10] Kendryte k210 SoC boards support Carlos Eduardo de Paula 2020-02-15 2:02 ` Damien Le Moal 2020-02-17 13:28 ` Carlos Eduardo de Paula 2020-02-26 21:31 ` Carlos Eduardo de Paula 2020-02-27 2:18 ` Damien Le Moal 2020-02-28 20:32 ` Sean Anderson 2020-03-02 3:01 ` Damien Le Moal [this message] 2020-03-02 3:53 ` Sean Anderson 2020-03-02 4:11 ` Damien Le Moal 2020-03-02 4:18 ` Sean Anderson 2020-03-02 4:54 ` Damien Le Moal 2020-03-02 4:56 ` Sean Anderson 2020-03-02 5:03 ` Damien Le Moal 2020-03-02 4:17 ` Anup Patel 2020-03-02 4:21 ` Sean Anderson 2020-03-02 4:48 ` Damien Le Moal 2020-03-02 4:51 ` Damien Le Moal 2020-03-02 5:02 ` Sean Anderson 2020-03-02 5:11 ` Damien Le Moal 2020-03-02 5:25 ` Sean Anderson 2020-03-02 5:43 ` Damien Le Moal 2020-03-04 19:44 ` Palmer Dabbelt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=BYAPR04MB581679CF61DF51E1588D7960E7E70@BYAPR04MB5816.namprd04.prod.outlook.com \ --to=damien.lemoal@wdc.com \ --cc=Anup.Patel@wdc.com \ --cc=linux-riscv@lists.infradead.org \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ --cc=seanga2@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-RISC-V Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \ linux-riscv@lists.infradead.org public-inbox-index linux-riscv Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv AGPL code for this site: git clone https://public-inbox.org/public-inbox.git