Skip to contentSkip to conversation

linux-next: fix vector initialisation when !CONFIG_KGDB

PATCH Ben Dooks 2 participants 2 messages Jun 18, 2008 – Jun 19, 2008 Arm (32-bit)

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

It seems in the changes for adding CONFIG_KGDB that the ARM trap initialisation has been turned off if the configuration is not enabled. If CONFIG_KGDB is not set, the system locks up as soon as the kernel turns the IRQs on for the first time in init/main.c.

The fix is to remove the dependency on calling early_trap_init() on CONFIG_KGDB, so that the vectors are initialised before the init sequence enables the IRQs.

arch/arm/kernel/setup.c +0 -2
@@ -855,9 +855,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
-#if defined(CONFIG_KGDB)
 	early_trap_init();
-#endif
 }
 
#1 lore raw
Quoted 15 lines · Ben Dooks

It seems in the changes for adding CONFIG_KGDB that the ARM trap initialisation has been turned off if the configuration is not enabled. If CONFIG_KGDB is not set, the system locks up as soon as the kernel turns the IRQs on for the first time in init/main.c.

The fix is to remove the dependency on calling early_trap_init() on CONFIG_KGDB, so that the vectors are initialised before the init sequence enables the IRQs.

arch/arm/kernel/setup.c void __init setup_arch(char **cmdline_p) · line 861

Quoted 9 lines
arch/arm/kernel/setup.c +0 -2
@@ -855,9 +855,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
-#if defined(CONFIG_KGDB)
 	early_trap_init();
-#endif
 }
 
 

That is absolutely correct. Thanks for catching this.

I folded this into the general ARM kgdb patch as there is no sense in generating a patch bisecting failure. The change is in the kgdb-next branch which feeds into the linux-next, which means it should show up in the next day or so.

Thanks,
Jason.