linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Leonard Crestez <leonard.crestez@nxp.com>
To: Jurgen Lambrecht <J.Lambrecht@TELEVIC.com>
Cc: Aisheng Dong <aisheng.dong@nxp.com>,
	Robin Gong <yibin.gong@nxp.com>, dl-linux-imx <linux-imx@nxp.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: FYI: imx-sdma firmware is not compatible with SLUB slab allocator
Date: Tue, 27 Aug 2019 15:04:44 +0000	[thread overview]
Message-ID: <VI1PR04MB7023FB06F79F31334905D34EEEA00@VI1PR04MB7023.eurprd04.prod.outlook.com> (raw)
In-Reply-To: 1e2fe2dc-f5ea-db73-59cf-c61ec558131a@televic.com

On 27.08.2019 16:35, Jurgen Lambrecht wrote:
> We are updating our kernel on our custom board with an iMX6UL from 3.14
> to 4.19, and when loading linux-firmware/imx/sdma/sdma-imx6q.bin v3.5
> the kernel hangs when booting, only "Starting kernel ..." is printed (by
> uBoot I think).

If you enable "earlycon" you should be able to see an useful error 
message from crashes in early boot.

Enabling earlycon is board-specific: if you have a correct 
/chosen/stdout-path reference in dts just adding "earlycon" to kernel 
cmdline should work otherwise you can specify 
earlycon=ec_imx6q,0x202000,115200 with the exact address depending on 
which uart is console on your board.

> When I remove the sdma bin (built-in the kernel via EXTRA_FIRMWARE),
> then it boots.
> 
> I found that the slab allocator (menu config -> General setup -> Choose
> SLAB allocator) is the culprit: when using imx_v6_v7_defconfig the
> kernel boots, but not with our config (based on a tiny config I think).
> And the config that makes the difference is the slab allocator: with
> SLUB or SLAB the kernel (with sdma bin) boots, but not with SLOB.
> 
> I don't know how to force selecting SLUB in Kconfig when selecting
> IMX_SDMA, but anyhow first this issue must be confirmed on other
> processors from the iMX family.

If there's an incompatibility between SLOB and sdma then it's sounds 
like a bug which should be fixed, not worked around via kconfig.

I tried to enable EXTRA_FIRMWARE on v4.19.68 and imx6ul-14x14-evk booted 
worked fine for me with these changes:
diff --git arch/arm/configs/imx_v6_v7_defconfig 
arch/arm/configs/imx_v6_v7_defconfig
index 7f524cee1357..cedd4d2e0e02 100644
--- arch/arm/configs/imx_v6_v7_defconfig
+++ arch/arm/configs/imx_v6_v7_defconfig
@@ -11,8 +11,8 @@ CONFIG_RELAY=y
  CONFIG_BLK_DEV_INITRD=y
  CONFIG_EXPERT=y
  CONFIG_PERF_EVENTS=y
-# CONFIG_SLUB_DEBUG is not set
  # CONFIG_COMPAT_BRK is not set
+CONFIG_SLOB=y
  CONFIG_ARCH_MULTI_V6=y
  CONFIG_ARCH_MXC=y
  CONFIG_MACH_MX31LILLY=y
@@ -90,6 +90,10 @@ CONFIG_RFKILL_INPUT=y
  CONFIG_DEVTMPFS=y
  CONFIG_DEVTMPFS_MOUNT=y
  # CONFIG_STANDALONE is not set
+CONFIG_EXTRA_FIRMWARE="imx/sdma/sdma-imx6q.bin"
+CONFIG_EXTRA_FIRMWARE_DIR="../linux-firmware"
+CONFIG_FW_LOADER_USER_HELPER=y
+CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
  CONFIG_CMA_SIZE_MBYTES=64
  CONFIG_IMX_WEIM=y
  CONFIG_CONNECTOR=y

Please try to get a stack dump with earlycon.

--
Regards,
Leonard

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-08-27 15:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 13:35 FYI: imx-sdma firmware is not compatible with SLUB slab allocator Jurgen Lambrecht
2019-08-27 15:04 ` Leonard Crestez [this message]
2019-08-28  9:26   ` Jurgen Lambrecht
2019-08-28 14:05     ` Robin Gong
2019-08-29  6:23       ` Jurgen Lambrecht
2019-09-03  5:57         ` Robin Gong
2019-09-03 14:32           ` Jurgen Lambrecht
2019-09-03 14:48             ` Leonard Crestez
2019-09-04 14:26               ` Jurgen Lambrecht
2019-09-12  6:33                 ` Uwe Kleine-König
2019-09-12  2:06             ` Robin Gong
2019-09-12  9:45               ` Jurgen Lambrecht
2019-09-12 12:12                 ` Jurgen Lambrecht
2019-09-12 14:19                   ` Robin Gong
2019-09-12 14:40                     ` Russell King - ARM Linux admin
2019-09-12 14:47                       ` Robin Gong

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=VI1PR04MB7023FB06F79F31334905D34EEEA00@VI1PR04MB7023.eurprd04.prod.outlook.com \
    --to=leonard.crestez@nxp.com \
    --cc=J.Lambrecht@TELEVIC.com \
    --cc=aisheng.dong@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=yibin.gong@nxp.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).