kmalloc before kmem_cache_init
From: Dave Hylands <hidden>
Date: 2012-01-29 09:33:37
Hi Sukanto, On Sat, Jan 28, 2012 at 11:25 PM, Sukanto Ghosh [off-list ref] wrote:
Hi Dave,
If you look into start_kernel() the call to parse_early_param()
precedes mm_init().
parse_early_param() eventually calls do_early_param().
do_early_param() parses for "earlycon" in kernel commandline and then calls the
setup_function associated with earlycon.
I have in my commandline: earlycon=uart8250,mmio32,0x10000000,9600
Call flow starting from drivers/tty/serial/8250_early.c will lead to kmalloc
early_param("early_con", setup_early_serial8250_console)
? setup_early_serial8250_console()
? ? ? early_serial8250_setup()
? ? ? ? ? parse_options()
? ? ? ? ? ? ? ioremap_nocache()
? ? ? ? ? ? ? ? ?... arch-specific-ioremap
? ? ? ? ? ? ? ? ? ? ? ?-- some form of arch specific __ioremap_caller
? ? ? ? ? ? ? ? ? ? ? ? ? ?--- get_vm_area_caller()
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?__get_vm_area_node
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? kzalloc_node
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? kmalloc_node
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?kmallocIt looks like CONFIG_FIX_EARLYCON_MEM defaults to y (on x86 anyways), so this would cause the path that doesn't call ioremam_nocache to be taken. I'm guessing that if you specify earycon, then you also need to ensure that CONFIG_FIX_EARLYCON is set. You didn't mention which architecture you were using. ARM has an early_printk which is sort of like an early console. -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com