Commit d9c135e0 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Tim Gardner

UBUNTU: SAUCE: isapnp_init: make isa PNP scans occur async

The results of scanning for devices is to trigger udev events therefore
we can push this processing async.

This reduces kernel initialisation time (the time from bootloader to
starting userspace) by several 10ths of a second x86 32bit systems.
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent e434ec02
......@@ -41,6 +41,7 @@
#include <linux/init.h>
#include <linux/isapnp.h>
#include <linux/mutex.h>
#include <linux/async.h>
#include <asm/io.h>
#include "../base.h"
......@@ -990,7 +991,7 @@ struct pnp_protocol isapnp_protocol = {
.disable = isapnp_disable_resources,
};
static int __init isapnp_init(void)
static int __init real_isapnp_init(void)
{
int cards;
struct pnp_card *card;
......@@ -1084,6 +1085,16 @@ static int __init isapnp_init(void)
return 0;
}
static void __init async_isapnp_init(void *unused, async_cookie_t cookie)
{
(void)real_isapnp_init();
}
static int __init isapnp_init(void)
{
async_schedule(async_isapnp_init, NULL);
return 0;
}
device_initcall(isapnp_init);
/* format is: noisapnp */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment