On 3.3 kernels vmalloc size needs to be increased

Bug #934034 reported by Philippe Langlais
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IglooCommunity
Fix Released
Critical
Unassigned

Bug Description

Since merge of io mapping into vmalloc area by N. Pitre, the vmalloc is too small for hwmem.
We get this error "kernel BUG at lib/ioremap.c:27!"

a temporary fix is:
Stop in u-boot with a key press then use the following commands:
setenv commonargs 'setenv bootargs console=${console} ip=dhcp vmalloc=300M'
saveenv
boot

The final solution for ubuntu kernel, is to set vmalloc size to 300M in default u-boot command line.

Related branches

Revision history for this message
Scott Bambrough (scottb) wrote : Re: [Bug 934034] [NEW] On 3.3 kernels vmalloc size needs to be increased by 16M

On 12-02-17 03:51 AM, Philippe Langlais wrote:
> Public bug reported:
>
> Since merge of io mapping into vmalloc area by N. Pitre, the vmalloc is too small for hwmem.
> We get this error "kernel BUG at lib/ioremap.c:27!"
>
> a temporary fix is:
> Stop in u-boot with a key press then use the following commands:
> setenv commonargs 'setenv bootargs console=${console} ip=dhcp vmalloc=272M'
> saveenv
> boot
>
> The final solution, is to set vmalloc size to 272M in default u-boot
> command line.
>
> ** Affects: igloocommunity
> Importance: Undecided
> Status: New
>

Would it not be better to provide this via device tree?

--
Scott Bambrough
Technical Director, Member Services
Linaro Ltd.

Revision history for this message
Anmar Oueja (anmar) wrote : Re: On 3.3 kernels vmalloc size needs to be increased by 16M

Philippe: What impact does this issue have? Does it affect MM functionality?

Changed in igloocommunity:
assignee: nobody → Lee Jones (lag)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Philippe Langlais (philang) wrote :

Without this change the 3.3 kernels won't boot.

For Android kernel 272M for vmalloc size is not enough too,
we have to set vmalloc size to 300M in u-boot.

Changed in igloocommunity:
importance: Medium → Critical
Changed in igloocommunity:
milestone: none → 2012.03
Lee Jones (lag)
Changed in igloocommunity:
assignee: Lee Jones (lag) → Mathieu Poirier (mathieu.poirier)
Changed in igloocommunity:
status: Confirmed → Fix Committed
Revision history for this message
Kalle Vahlman (kvahlman) wrote :

Startupfiles with updated u-boot-env.bin is now in PPA.

We will need a new u-boot uploaded as well I guess.

Revision history for this message
Sunil Kamath (sunil-kamath) wrote :

I have question to Mathieu and Kalle. Did you test this with ICS eMMC image?

I am using new startup files.
I can see this in http://www.igloocommunity.org/download/linaro/startupfiles/latest/ for 9th March.

But even after using this change in startup file, we have vmalloc issue in single ICS image.
Did you test it by any chance?

If so, so let us know your results.

In my image i get following content as printevn:

bootcmd=mmc rescan 0; mmc rescan 1; if run loadbootscript; then run bootscript; else if run mmcload; then run mmcboot; else if run emmcloadbootscript; then run bootscript; else if run emmcload; then run emmcboot; else echo No media to boot from; fi; fi; fi; fi;

commonargs=setenv bootargs console=${console} vmalloc=300M

I have pasted complete printend at the end.

But while booting, i see following trace:
[ 0.000000] Kernel command line: console=ttyAMA2,115200n8 rootwait ro earlyprintk mem=128M@0 mali.mali_mem=64M@128M hwmem=168M@192M mem=22M@360M mem_issw=1M@383M mem=640M@384M vmalloc=256M init=/init androidboot.console=ttyAMA2

and finally bootup stops with error:
/kernel/lib/ioremap.c:27!
Same as this issue.

Its reading from boot.scr?

Snowball $ printenv
bootcmd=mmc rescan 0; mmc rescan 1; if run loadbootscript; then run bootscript; else if run mmcload; then run mmcboot; else if run emmcloadbootscript; then run bootscript; else if run emmcload; then run emmcboot; else echo No media to boot from; fi; fi; fi; fi;
bootdelay=1
baudrate=115200
preboot=
verify=n
loadaddr=0x00100000
console=ttyAMA2,115200n8
loadbootscript=fat load mmc 1:1 ${loadaddr} /boot.scr
emmcloadbootscript=fat load mmc 0:2 ${loadaddr} /boot.scr
bootscript=echo Running bootscript from mmc ...; source ${loadaddr}
memargs256=mem=96M@0 mem_modem=32M@96M mem=32M@128M hwmem=22M@160M pmem_hwb=42M@182M mem_mali=32@224M
memargs512=mem=96M@0 mem_modem=32M@96M hwmem=32M@128M mem=64M@160M mem_mali=32M@224M pmem_hwb=128M@256M mem=128M@384M
memargs1024=mem=128M@0 mali.mali_mem=64M@128M hwmem=168M@192M mem=22M@360M mem_issw=1M@383M mem=640M@384M
memargs=setenv bootargs ${bootargs} ${memargs1024}
emmcload=fat load mmc 0:2 ${loadaddr} /uImage
mmcload=fat load mmc 1:1 ${loadaddr} /uImage
commonargs=setenv bootargs console=${console} vmalloc=300M
emmcargs=setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait
addcons=setenv bootargs ${bootargs} console=${console}
emmcboot=echo Booting from eMMC ...; run commonargs emmcargs memargs; bootm ${loadaddr}
mmcargs=setenv bootargs ${bootargs} root=/dev/mmcblk1p2 rootwait
mmcboot=echo Booting from external MMC ...; run commonargs mmcargs memargs; bootm ${loadaddr}
stdin=serial
stdout=serial
stderr=serial
board_id=1
startup_graphics=0
logo=0
crashkernel=crashkernel=1M@0x5600000
ethact=smc911x-0

Environment size: 1561/4092 bytes

Revision history for this message
Sunil Kamath (sunil-kamath) wrote :

i can see comment as need uboot will be uploaded. Is it uploaded already?
I guess i need to use new uboot while creating single ICS image. Please share link or details.

description: updated
summary: - On 3.3 kernels vmalloc size needs to be increased by 16M
+ On 3.3 kernels vmalloc size needs to be increased
Revision history for this message
Kalle Vahlman (kvahlman) wrote :

Sunil: I believe the wrong vmalloc= in your kernel commandline comes from the boot.scr which is created by linaro-android-media-create when building the image.

You will need to use a trunk version of linaro-image-tools, released versions will not work currently.

Revision history for this message
Sunil Kamath (sunil-kamath) wrote :

Not facing this after using LAMC with fix for the same. Now also tried even with latest builds.

Changed in igloocommunity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.