mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[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>
This commit is contained in:
parent
c4a68306b9
commit
a416aba637
1 changed files with 6 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue