i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo

6 messages, 3 authors, 2016-12-13 · open the first message on its own page

i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo

From: Magnus Lilja <hidden>
Date: 2016-12-11 10:34:29

Hi,

I'm trying to get current modern Linux kernels to boot on the i.MX31 PDK 
board (a.k.a MX31_3DS).

One problem I've noticed is that I have to comment out the following 
code from mach-mx31_3ds.c, the reserve function is registered as 
mach_desc->reserve . If I leave this function as is the kernel stops 
very early in the boot (see end of the mail).

static void __init mx31_3ds_reserve(void)
{
	/* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
	mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE,
					 MX31_3DS_CAMERA_BUF_SIZE);
}

The commits that causes this problem (according to git bisect) is:
[1c2f87c22566cd057bc8cde10c37ae9da1a1bb76] ARM: 8025/1: Get rid of meminfo

(Yes, it's been a while since I last tried to boot a modern kernel on 
this board)

I'm using the imx_v6_v7_defconfig.

Kernel boot log using earlyprintk. (the arm_memblock_init NNN lines are 
my added printk's)

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-rc7-dirty (lilja at xubuntu-14-04) (gcc 
version 4. 8.3 20140320 (prerelease) (Sourcery CodeBench Lite 
2014.05-29) ) #150 SMP Sun Dec 11 11:12:32 CET 2016
[    0.000000] CPU: ARMv6-compatible processor [4107b364] revision 4 
(ARMv6TEJ), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing 
instruction cache
[    0.000000] Machine: Freescale MX31PDK (3DS)
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] arm_memblock_init 268

40 more lines

i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo

From: Fabio Estevam <festevam@gmail.com>
Date: 2016-12-11 12:36:14

Hi Magnus,

On Sun, Dec 11, 2016 at 8:34 AM, Magnus Lilja [off-list ref] wrote:
Hi,

I'm trying to get current modern Linux kernels to boot on the i.MX31 PDK
board (a.k.a MX31_3DS).

One problem I've noticed is that I have to comment out the following code
from mach-mx31_3ds.c, the reserve function is registered as
mach_desc->reserve . If I leave this function as is the kernel stops very
early in the boot (see end of the mail).

static void __init mx31_3ds_reserve(void)
{
        /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
        mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE,
                                         MX31_3DS_CAMERA_BUF_SIZE);
}
The mx31_3ds_reserve() was used for reserving the buffer for the old
mx3_camera driver.

The mx3_camera driver has been removed since c93cc61475ebbe6 ("[media]
staging/media: remove deprecated mx3 driver"), so I would suggest you
to send a patch that just removes mx31_3ds_reserve().

Thanks

i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo

From: Magnus Lilja <hidden>
Date: 2016-12-11 12:51:09

Fabio,

On 11 December 2016 at 13:36, Fabio Estevam [off-list ref] wrote:
Hi Magnus,

On Sun, Dec 11, 2016 at 8:34 AM, Magnus Lilja [off-list ref] wrote:
quoted
Hi,

I'm trying to get current modern Linux kernels to boot on the i.MX31 PDK
board (a.k.a MX31_3DS).

One problem I've noticed is that I have to comment out the following code
from mach-mx31_3ds.c, the reserve function is registered as
mach_desc->reserve . If I leave this function as is the kernel stops very
early in the boot (see end of the mail).

static void __init mx31_3ds_reserve(void)
{
        /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
        mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE,
                                         MX31_3DS_CAMERA_BUF_SIZE);
}
The mx31_3ds_reserve() was used for reserving the buffer for the old
mx3_camera driver.

The mx3_camera driver has been removed since c93cc61475ebbe6 ("[media]
staging/media: remove deprecated mx3 driver"), so I would suggest you
to send a patch that just removes mx31_3ds_reserve().
Thanks for the info! Will send a patch later!

Regards, Magnus

i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo

From: Fabio Estevam <festevam@gmail.com>
Date: 2016-12-11 12:59:08

Hi Magnus,

On Sun, Dec 11, 2016 at 10:51 AM, Magnus Lilja [off-list ref] wrote:
Thanks for the info! Will send a patch later!
Thinking more about it we see that commit c93cc61475ebbe6 ("[media]
staging/media: remove deprecated mx3 driver") only appeared in 4.8, so
it is OK to remove mx31_3ds_reserve() now, but it will not fix the
kernel boot in the previous kernels.

Commit 1c2f87c22 ("ARM: 8025/1: Get rid of meminfo") is from kernel 3.16 though.

So it seems we need a proper fix for kernels 3.16-4.8.

Regards,

Fabio Estevam

i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo

From: Magnus Lilja <hidden>
Date: 2016-12-11 13:21:35

Hi Fabio,

On 11 December 2016 at 13:59, Fabio Estevam [off-list ref] wrote:
Thinking more about it we see that commit c93cc61475ebbe6 ("[media]
staging/media: remove deprecated mx3 driver") only appeared in 4.8, so
it is OK to remove mx31_3ds_reserve() now, but it will not fix the
kernel boot in the previous kernels.

Commit 1c2f87c22 ("ARM: 8025/1: Get rid of meminfo") is from kernel 3.16 though.

So it seems we need a proper fix for kernels 3.16-4.8.
Yes, indeed. There are a couple long term stable kernels in that range
that needs to be fixed (and also might need other fixes as well to
boot mx31_3ds).

Regards, Magnus

i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo

From: Laura Abbott <hidden>
Date: 2016-12-13 14:50:16

On 12/11/2016 02:34 AM, Magnus Lilja wrote:
Hi,

I'm trying to get current modern Linux kernels to boot on the i.MX31 PDK board (a.k.a MX31_3DS).

One problem I've noticed is that I have to comment out the following code from mach-mx31_3ds.c, the reserve function is registered as mach_desc->reserve . If I leave this function as is the kernel stops very early in the boot (see end of the mail).

static void __init mx31_3ds_reserve(void)
{
    /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
    mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE,
                     MX31_3DS_CAMERA_BUF_SIZE);
}

The commits that causes this problem (according to git bisect) is:
[1c2f87c22566cd057bc8cde10c37ae9da1a1bb76] ARM: 8025/1: Get rid of meminfo

(Yes, it's been a while since I last tried to boot a modern kernel on this board)

I'm using the imx_v6_v7_defconfig.

Kernel boot log using earlyprintk. (the arm_memblock_init NNN lines are my added printk's)

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-rc7-dirty (lilja at xubuntu-14-04) (gcc version 4. 8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #150 SMP Sun Dec 11 11:12:32 CET 2016
[    0.000000] CPU: ARMv6-compatible processor [4107b364] revision 4 (ARMv6TEJ), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: Freescale MX31PDK (3DS)
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] arm_memblock_init 268
[    0.000000] arm_memblock_init 273
[    0.000000] arm_memblock_init 277
[    0.000000] cma: Reserved 16 MiB at 0x86800000
[    0.000000] arm_memblock_init 281
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] percpu: Embedded 14 pages/cpu @c64f0000 s26688 r8192 d22464 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 30464
[    0.000000] Kernel command line: console=ttymxc0,115200 earlyprintk
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)

23 more quoted lines

I found the bug, it's another issue with removal and the lowmem boundary.
Given this has been present for 2.5 years without a complaint, I'm going
to take a little bit more time to think about a fix.

Thanks,
Laura
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help