summaryrefslogtreecommitdiff
path: root/kern/panic.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-07-10 19:39:54 +0200
committerRichard Braun <rbraun@sceen.net>2018-07-10 19:39:54 +0200
commit7cab594590002ff3737629b76083a298616b665a (patch)
treec2134a28fa7f576485fae373bebcd2bdc1141fc3 /kern/panic.c
parent2670af26286799d9d46ab83c07fd991b942d7d49 (diff)
kern/panic: remove initialization operation
Maintaining correct dependencies for the panic function is too complicated. It may be used very early, but would depend on the console, which is normally available quite late during initialization. Instead, the behavior of panic is now "best effort", i.e. if called at a time where it works, good, otherwise, the behavior is undefined, but should result in a freeze or a reset most of the time.
Diffstat (limited to 'kern/panic.c')
-rw-r--r--kern/panic.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/kern/panic.c b/kern/panic.c
index bd1f6658..9e7d1d53 100644
--- a/kern/panic.c
+++ b/kern/panic.c
@@ -19,7 +19,6 @@
#include <stdio.h>
#include <kern/atomic.h>
-#include <kern/init.h>
#include <kern/panic.h>
#include <machine/cpu.h>
#include <machine/strace.h>
@@ -55,13 +54,3 @@ panic(const char *format, ...)
* Never reached.
*/
}
-
-static int __init
-panic_setup(void)
-{
- return 0;
-}
-
-INIT_OP_DEFINE(panic_setup,
- INIT_OP_DEP(cpu_setup, true),
- INIT_OP_DEP(printf_setup, true));