forked from M-Labs/artiq
runtime: Stop kernel CPU before restarting comms CPU on panic
Before, the system would enter a boot loop when a panic occurred while the kernel CPU was active (and panic_reset == 1), as kernel::start() for the startup kernel would panic.
This commit is contained in:
parent
95807234d9
commit
3f0cf6e683
@ -21,6 +21,8 @@ Highlights:
|
|||||||
be brought up Ctrl-P (Ctrl+Return to immediately submit the selected entry
|
be brought up Ctrl-P (Ctrl+Return to immediately submit the selected entry
|
||||||
with the default arguments).
|
with the default arguments).
|
||||||
* Experiment results are now always saved to HDF5, even if run() fails.
|
* Experiment results are now always saved to HDF5, even if run() fails.
|
||||||
|
* Core device: ``panic_reset 1`` now correctly resets the kernel CPU as well if
|
||||||
|
communication CPU panic occurs.
|
||||||
|
|
||||||
Breaking changes:
|
Breaking changes:
|
||||||
|
|
||||||
|
@ -323,7 +323,10 @@ pub fn panic_impl(info: &core::panic::PanicInfo) -> ! {
|
|||||||
|
|
||||||
if config::read_str("panic_reset", |r| r == Ok("1")) {
|
if config::read_str("panic_reset", |r| r == Ok("1")) {
|
||||||
println!("restarting...");
|
println!("restarting...");
|
||||||
unsafe { boot::reset() }
|
unsafe {
|
||||||
|
kernel::stop();
|
||||||
|
boot::reset();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
println!("halting.");
|
println!("halting.");
|
||||||
println!("use `artiq_coremgmt config write -s panic_reset 1` to restart instead");
|
println!("use `artiq_coremgmt config write -s panic_reset 1` to restart instead");
|
||||||
|
Loading…
Reference in New Issue
Block a user