lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1207041402010.17304@pobox.suse.cz>
Date:	Wed, 4 Jul 2012 14:03:07 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] floppy: Run floppy initialization asynchronous

On Mon, 2 Jul 2012, Andi Kleen wrote:

> From: Andi Kleen <ak@...ux.intel.com>
> 
> floppy_init is quite slow, 3s on my test system to determine
> that there is no floppy. Run it asynchronous to the other
> init calls to improve boot time.
> 
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
>  drivers/block/floppy.c |   21 ++++++++++++++++++++-
>  1 files changed, 20 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
> index cce7df3..8b5769b 100644
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -191,6 +191,7 @@ static int print_unex = 1;
>  #include <linux/mutex.h>
>  #include <linux/io.h>
>  #include <linux/uaccess.h>
> +#include <linux/async.h>
>  
>  /*
>   * PS/2 floppies have much slower step rates than regular floppies.
> @@ -4122,7 +4123,7 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data)
>  	return get_disk(disks[drive]);
>  }
>  
> -static int __init floppy_init(void)
> +static int __init do_floppy_init(void)
>  {
>  	int i, unit, drive;
>  	int err, dr;
> @@ -4337,6 +4338,24 @@ out_put_disk:
>  	return err;
>  }
>  
> +#ifndef MODULE
> +static __init void floppy_async_init(void *data, async_cookie_t cookie)
> +{
> +	do_floppy_init();
> +}
> +#endif
> +
> +static int __init floppy_init(void)
> +{
> +#ifdef MODULE
> +	return do_floppy_init(void);

This isn't really a valid C.

I have fixed that and applied.

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ