Merge branch 'for-3.9-async' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 06:10:26 +0000 (22:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Feb 2013 06:10:26 +0000 (22:10 -0800)
Pull async changes from Tejun Heo:
 "These are followups for the earlier deadlock issue involving async
  ending up waiting for itself through block requesting module[1].  The
  following changes are made by these commits.

   - Instead of requesting default elevator on each request_queue init,
     block now requests it once early during boot.

   - Kmod triggers warning if invoked from an async worker.

   - Async synchronization implementation has been reimplemented.  It's
     a lot simpler now."

* 'for-3.9-async' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  async: initialise list heads to fix crash
  async: replace list of active domains with global list of pending items
  async: keep pending tasks on async_domain and remove async_pending
  async: use ULLONG_MAX for infinity cookie value
  async: bring sanity to the use of words domain and running
  async, kmod: warn on synchronous request_module() from async workers
  block: don't request module during elevator init
  init, block: try to load default elevator module early during boot

1  2 
init/main.c

diff --combined init/main.c
@@@ -70,6 -70,8 +70,8 @@@
  #include <linux/perf_event.h>
  #include <linux/file.h>
  #include <linux/ptrace.h>
+ #include <linux/blkdev.h>
+ #include <linux/elevator.h>
  
  #include <asm/io.h>
  #include <asm/bugs.h>
@@@ -604,7 -606,7 +606,7 @@@ asmlinkage void __init start_kernel(voi
        pidmap_init();
        anon_vma_init();
  #ifdef CONFIG_X86
 -      if (efi_enabled)
 +      if (efi_enabled(EFI_RUNTIME_SERVICES))
                efi_enter_virtual_mode();
  #endif
        thread_info_cache_init();
        acpi_early_init(); /* before LAPIC and SMP init */
        sfi_init_late();
  
 -      if (efi_enabled) {
 +      if (efi_enabled(EFI_RUNTIME_SERVICES)) {
                efi_late_init();
                efi_free_boot_services();
        }
@@@ -794,6 -796,17 +796,17 @@@ static void __init do_pre_smp_initcalls
                do_one_initcall(*fn);
  }
  
+ /*
+  * This function requests modules which should be loaded by default and is
+  * called twice right after initrd is mounted and right before init is
+  * exec'd.  If such modules are on either initrd or rootfs, they will be
+  * loaded before control is passed to userland.
+  */
+ void __init load_default_modules(void)
+ {
+       load_default_elevator_module();
+ }
  static int run_init_process(const char *init_filename)
  {
        argv_init[0] = init_filename;
@@@ -900,4 -913,7 +913,7 @@@ static noinline void __init kernel_init
         * we're essentially up and running. Get rid of the
         * initmem segments and start the user-mode stuff..
         */
+       /* rootfs is available now, try loading default modules */
+       load_default_modules();
  }