In arch/arm/kernel/process.c, arm_machine_restart () function,
Void arm_machine_restart (char mode, const char *cmd)
{
/ * Flush the console to make sure all the relevant messages make it
* out to the console drivers
Arm_machine_flush_console ();
/ * Disable interrupts first * /
Local_irq_disable ();
Local_fiq_disable ();
/ *
* Tell the MM system that we are going to reboot
* we may need it to insert some 1:1 mappings so that
* soft boot works
*
Setup_mm_for_reboot (mode);
/ * Clean and * / invalidate caches
Flush_cache_all ();
/ * Turn off caching * /
Cpu_proc_fin ();
/ * Push out any further dirty data, and ensure cache is empty
Flush_cache_all ();
/ *
* Now call the architecture specific reboot code
*
Arch_reset (mode, CMD);
/ *
* Whoops the architecture was unable to reboot
* Tell the user!
*
Mdelay (1000);
Printk ("Reboot failed - System halted\n");
While (1);
}
On the command line, enter the reboot command, but system is not reboot.
# reboot
SysRq: Emergency Remount R/O
EXT4-fs (mmcblk0p4): re-mounted. Opts: (null)
EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
Emergency Remount complete
Imx2-wdt imx2-wdt.0: Device shutdown: Expect reboot!
Restarting system
Last printk which gets into Klog is before cpu_proc_fin () function,
cpu_proc_fin() is call /arch/arm/mm/proc-v7.S
ENTRY(cpu_v7_proc_fin)
mrc p15, 0, r0, c1, c0, 0 @ ctrl register
bic r0, r0, #0x1000 @ ...i............
bic r0, r0, #0x0006 @ .............ca.
mcr p15, 0, r0, c1, c0, 0 @ disable caches
mov pc, lr
ENDPROC(cpu_v7_proc_fin)
Why hang before cpu_proc_fin () function?how to solve this problem?