Atsushi Nemoto wrote:
Hmm. The puts() in arch/mips/jmr3927/common/puts.c looks usable even
on kernel entry. You can verify if it can really be used on
start_kernel(), then start tracking down the problem.
puts() has helped, but I wish that I had something to dump the stack. Is
kgdb easy to set up?
In main.c, init_IRQ() eventually uses kmalloc:
arch_init_irq() -> txx9_irq_init() -> ioremap() -> __get_vm_area_node()
malloc_sizes is not yet initialized, though, which means that cs_cachep
is zero for all entries. My system reboots when it reaches
cpu_cache_get() in mm/slab.c where cachep is zero.
It seems to me that kmem_cache_init() ought to be run before any
kmallocs. kmem_cache_init() seems to require mem_init(). After I moved
mem_init and kmem_cache_init before init_IRQ(), it gets down to
pidhash_init() before rebooting, which I am looking into now.
What ought to be done to fix the init_IRQ()/kmalloc problem?