]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] request_irq() use GFP_ATOMIC
authorJens Axboe <axboe@suse.de>
Mon, 30 Sep 2002 05:33:22 +0000 (22:33 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 30 Sep 2002 05:33:22 +0000 (22:33 -0700)
The might_sleep() thing caught ide, which calls request_irq() with a
lock held. It can be argued that this is a bad thing, however I think it
can also validly be argued that requesting an irq should not be a
blocking operation. This might even remove some driver bugs where usage
count is not incremented during init...

It can also be argued, that the very first irq requests cannot be
blocking for io anyways, for good reason :-)

arch/i386/kernel/irq.c

index c0745578d0e79e11b0a93ab25948098c6c6a9b57..e58629ba806a80d35621bf31f6da80a42de73a72 100644 (file)
@@ -455,7 +455,7 @@ int request_irq(unsigned int irq,
                return -EINVAL;
 
        action = (struct irqaction *)
-                       kmalloc(sizeof(struct irqaction), GFP_KERNEL);
+                       kmalloc(sizeof(struct irqaction), GFP_ATOMIC);
        if (!action)
                return -ENOMEM;