From: Ard van Breemen Date: Sat, 6 Jan 2007 00:36:20 +0000 (-0800) Subject: [PATCH] kernelparams: detect if and which parameter parsing enabled irq's X-Git-Tag: v2.6.20-rc4~79 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a416aba637dcb4127595c02a59041cd278422f7e;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/params.c b/kernel/params.c index f406655d66..718945da8f 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, ¶m, &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",