diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:32 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:32 -0400 |
commit | 2c8c0e6b8d7700a990da8d24eff767f9ca223b96 (patch) | |
tree | b5477ee2558efff235c483d1619ce892db479d18 /arch/x86_64/kernel/traps.c | |
parent | 1a3f239ddf9208f2e52d36fef1c1c4518cbbbabe (diff) |
[PATCH] Convert x86-64 to early param
Instead of hackish manual parsing
Requires earlier i386 patchkit, but also fixes i386 early_printk again.
I removed some obsolete really early parameters which didn't do anything useful.
Also made a few parameters that needed it early (mostly oops printing setup)
Also removed one panic check that wasn't visible without
early console anyways (the early console is now initialized after that
panic)
This cleans up a lot of code.
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/traps.c')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 56d7ff0c894c..9ec2b1d5893d 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -1119,24 +1119,30 @@ void __init trap_init(void) | |||
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | 1121 | ||
1122 | /* Actual parsing is done early in setup.c. */ | 1122 | static int __init oops_setup(char *s) |
1123 | static int __init oops_dummy(char *s) | ||
1124 | { | 1123 | { |
1125 | panic_on_oops = 1; | 1124 | if (!s) |
1126 | return 1; | 1125 | return -EINVAL; |
1126 | if (!strcmp(s, "panic")) | ||
1127 | panic_on_oops = 1; | ||
1128 | return 0; | ||
1127 | } | 1129 | } |
1128 | __setup("oops=", oops_dummy); | 1130 | early_param("oops", oops_setup); |
1129 | 1131 | ||
1130 | static int __init kstack_setup(char *s) | 1132 | static int __init kstack_setup(char *s) |
1131 | { | 1133 | { |
1134 | if (!s) | ||
1135 | return -EINVAL; | ||
1132 | kstack_depth_to_print = simple_strtoul(s,NULL,0); | 1136 | kstack_depth_to_print = simple_strtoul(s,NULL,0); |
1133 | return 1; | 1137 | return 0; |
1134 | } | 1138 | } |
1135 | __setup("kstack=", kstack_setup); | 1139 | early_param("kstack", kstack_setup); |
1136 | 1140 | ||
1137 | #ifdef CONFIG_STACK_UNWIND | 1141 | #ifdef CONFIG_STACK_UNWIND |
1138 | static int __init call_trace_setup(char *s) | 1142 | static int __init call_trace_setup(char *s) |
1139 | { | 1143 | { |
1144 | if (!s) | ||
1145 | return -EINVAL; | ||
1140 | if (strcmp(s, "old") == 0) | 1146 | if (strcmp(s, "old") == 0) |
1141 | call_trace = -1; | 1147 | call_trace = -1; |
1142 | else if (strcmp(s, "both") == 0) | 1148 | else if (strcmp(s, "both") == 0) |
@@ -1145,7 +1151,7 @@ static int __init call_trace_setup(char *s) | |||
1145 | call_trace = 1; | 1151 | call_trace = 1; |
1146 | else if (strcmp(s, "new") == 0) | 1152 | else if (strcmp(s, "new") == 0) |
1147 | call_trace = 2; | 1153 | call_trace = 2; |
1148 | return 1; | 1154 | return 0; |
1149 | } | 1155 | } |
1150 | __setup("call_trace=", call_trace_setup); | 1156 | early_param("call_trace", call_trace_setup); |
1151 | #endif | 1157 | #endif |