1. 17 Sep, 2016 4 commits
    • Tejun Heo's avatar
      power, workqueue: remove keventd_up() usage · a81f80f3
      Tejun Heo authored
      Now that workqueue can handle work item queueing/cancelling from very
      early during boot, there is no need to gate cancel_delayed_work_sync()
      while !keventd_up().  Remove it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Qiao Zhou <qiaozhou@asrmicro.com>
      a81f80f3
    • Tejun Heo's avatar
      tty, workqueue: remove keventd_up() usage · 1bb08024
      Tejun Heo authored
      Now that workqueue can handle work item queueing from very early
      during boot, there is no need to delay schedule_work() while
      !keventd_up().  Remove it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Alan Cox <alan@linux.intel.com>
      1bb08024
    • Tejun Heo's avatar
      mce, workqueue: remove keventd_up() usage · a2c2727d
      Tejun Heo authored
      Now that workqueue can handle work item queueing from very early
      during boot, there is no need to gate schedule_work() with
      keventd_up().  Remove it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: linux-edac@vger.kernel.org
      a2c2727d
    • Tejun Heo's avatar
      workqueue: make workqueue available early during boot · 3347fa09
      Tejun Heo authored
      Workqueue is currently initialized in an early init call; however,
      there are cases where early boot code has to be split and reordered to
      come after workqueue initialization or the same code path which makes
      use of workqueues is used both before workqueue initailization and
      after.  The latter cases have to gate workqueue usages with
      keventd_up() tests, which is nasty and easy to get wrong.
      
      Workqueue usages have become widespread and it'd be a lot more
      convenient if it can be used very early from boot.  This patch splits
      workqueue initialization into two steps.  workqueue_init_early() which
      sets up the basic data structures so that workqueues can be created
      and work items queued, and workqueue_init() which actually brings up
      workqueues online and starts executing queued work items.  The former
      step can be done very early during boot once memory allocation,
      cpumasks and idr are initialized.  The latter right after kthreads
      become available.
      
      This allows work item queueing and canceling from very early boot
      which is what most of these use cases want.
      
      * As systemd_wq being initialized doesn't indicate that workqueue is
        fully online anymore, update keventd_up() to test wq_online instead.
        The follow-up patches will get rid of all its usages and the
        function itself.
      
      * Flushing doesn't make sense before workqueue is fully initialized.
        The flush functions trigger WARN and return immediately before fully
        online.
      
      * Work items are never in-flight before fully online.  Canceling can
        always succeed by skipping the flush step.
      
      * Some code paths can no longer assume to be called with irq enabled
        as irq is disabled during early boot.  Use irqsave/restore
        operations instead.
      
      v2: Watchdog init, which requires timer to be running, moved from
          workqueue_init_early() to workqueue_init().
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Link: http://lkml.kernel.org/r/CA+55aFx0vPuMuxn00rBSM192n-Du5uxy+4AvKa0SBSOVJeuCGg@mail.gmail.com
      3347fa09
  2. 16 Sep, 2016 1 commit
  3. 14 Sep, 2016 3 commits
    • Linus Torvalds's avatar
      Merge branch 'uaccess-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 77e5bdf9
      Linus Torvalds authored
      Pull uaccess fixes from Al Viro:
       "Fixes for broken uaccess primitives - mostly lack of proper zeroing
        in copy_from_user()/get_user()/__get_user(), but for several
        architectures there's more (broken clear_user() on frv and
        strncpy_from_user() on hexagon)"
      
      * 'uaccess-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (28 commits)
        avr32: fix copy_from_user()
        microblaze: fix __get_user()
        microblaze: fix copy_from_user()
        m32r: fix __get_user()
        blackfin: fix copy_from_user()
        sparc32: fix copy_from_user()
        sh: fix copy_from_user()
        sh64: failing __get_user() should zero
        score: fix copy_from_user() and friends
        score: fix __get_user/get_user
        s390: get_user() should zero on failure
        ppc32: fix copy_from_user()
        parisc: fix copy_from_user()
        openrisc: fix copy_from_user()
        nios2: fix __get_user()
        nios2: copy_from_user() should zero the tail of destination
        mn10300: copy_from_user() should zero on access_ok() failure...
        mn10300: failing __get_user() and get_user() should zero
        mips: copy_from_user() must zero the destination on access_ok() failure
        ARC: uaccess: get_user to zero out dest in cause of fault
        ...
      77e5bdf9
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.8b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · b8f26e88
      Linus Torvalds authored
      Pull xen regression fix from David Vrabel:
       "Fix SMP boot in arm guests"
      
      * tag 'for-linus-4.8b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        arm/xen: fix SMP guests boot
      b8f26e88
    • Vitaly Kuznetsov's avatar
      arm/xen: fix SMP guests boot · de75abbe
      Vitaly Kuznetsov authored
      Commit 88e957d6 ("xen: introduce xen_vcpu_id mapping") broke SMP
      ARM guests on Xen. When FIFO-based event channels are in use (this is
      the default), evtchn_fifo_alloc_control_block() is called on
      CPU_UP_PREPARE event and this happens before we set up xen_vcpu_id
      mapping in xen_starting_cpu. Temporary fix the issue by setting direct
      Linux CPU id <-> Xen vCPU id mapping for all possible CPUs at boot. We
      don't currently support kexec/kdump on Xen/ARM so these ids always
      match.
      
      In future, we have several ways to solve the issue, e.g.:
      
      - Eliminate all hypercalls from CPU_UP_PREPARE, do them from the
        starting CPU. This can probably be done for both x86 and ARM and, if
        done, will allow us to get Xen's idea of vCPU id from CPUID/MPIDR on
        the starting CPU directly, no messing with ACPI/device tree
        required.
      
      - Save vCPU id information from ACPI/device tree on ARM and use it to
        initialize xen_vcpu_id mapping. This is the same trick we currently
        do on x86.
      Reported-by: default avatarJulien Grall <julien.grall@arm.com>
      Tested-by: default avatarWei Chen <Wei.Chen@arm.com>
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Acked-by: default avatarStefano Stabellini <sstabellini@kernel.org>
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      de75abbe
  4. 13 Sep, 2016 32 commits