summaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorArd van Breemen <ard@telegraafnet.nl>2007-01-06 01:36:20 +0100
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 08:55:21 +0100
commita416aba637dcb4127595c02a59041cd278422f7e (patch)
treee99c948c07e42e6e387bc84260e456e55a0fbd60 /kernel/params.c
parent[PATCH] start_kernel: test if irq's got enabled early, barf, and disable them... (diff)
downloadlinux-a416aba637dcb4127595c02a59041cd278422f7e.tar.xz
linux-a416aba637dcb4127595c02a59041cd278422f7e.zip
[PATCH] kernelparams: detect if and which parameter parsing enabled irq's
The parsing of some kernel parameters seem to enable irq's at a stage that irq's are not supposed to be enabled (Particularly the ide kernel parameters). Having irq's enabled before the irq controller is initialized might lead to a kernel panic. This patch only detects this behaviour and warns about wich parameter caused it. [akpm@osdl.org: cleanups] Signed-off-by: Ard van Breemen <ard@telegraafnet.nl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/params.c')
-rw-r--r--kernel/params.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/params.c b/kernel/params.c
index f406655d6653..718945da8f58 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -143,9 +143,15 @@ int parse_args(const char *name,
while (*args) {
int ret;
+ int irq_was_disabled;
args = next_arg(args, &param, &val);
+ irq_was_disabled = irqs_disabled();
ret = parse_one(param, val, params, num, unknown);
+ if (irq_was_disabled && !irqs_disabled()) {
+ printk(KERN_WARNING "parse_args(): option '%s' enabled "
+ "irq's!\n", param);
+ }
switch (ret) {
case -ENOENT:
printk(KERN_ERR "%s: Unknown parameter `%s'\n",