20 Sep, 2016

9 commits

  • Install the callbacks via the state machine and let the core invoke
    the callbacks on the already online CPUs.
    Since the online target runs always on the target CPU we can drop
    smp_call_function_single(). The functions is invoked with interrupts off to
    keep the old calling convention. If the maintainer things that this function
    can be called with interrupts enabled then it can be removed :)

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Robert Richter
    Cc: Peter Zijlstra
    Cc: oprofile-list@lists.sf.net
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160906170457.32393-10-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Jens Axboe
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160906170457.32393-9-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Jens Axboe
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160906170457.32393-8-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.
    CPU_UP_CANCELED_FROZEN() is not preserved: It is only there to free memory in an
    error case because it is assumed if the CPU does show up on resume it won't be
    seen ever again. As per Borislav:
    |IOW, you don't need mc_cpu_dead().

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160907164523.46a2xnffha4bv63g@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: linux-sh@vger.kernel.org
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160906170457.32393-6-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine and let the core invoke
    the callbacks on the already online CPUs.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Fenghua Yu
    Cc: Tony Luck
    Cc: linux-ia64@vger.kernel.org
    Cc: Peter Zijlstra
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160906170457.32393-5-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Tony Lindgren
    Cc: Peter Zijlstra
    Cc: rt@linutronix.de
    Cc: linux-omap@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/20160906170457.32393-4-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine so the old notifier based
    cpuhotplug infrastructure can be removed.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: linux-sh@vger.kernel.org
    Cc: Peter Zijlstra
    Cc: Magnus Damm
    Cc: Simon Horman
    Cc: rt@linutronix.de
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/20160906170457.32393-3-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Will Deacon
    Cc: Peter Zijlstra
    Cc: Catalin Marinas
    Cc: rt@linutronix.de
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/20160906170457.32393-2-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     

07 Sep, 2016

16 commits

  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: rt@linutronix.de
    Cc: Michael Ellerman
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20160818125731.27256-17-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.
    I assume here that the powermac has two CPUs and so only one can go up
    or down at a time. The variable smp_core99_host_open is here to ensure
    that we do not try to open or close the i2c host twice if something goes
    wrong and we invoke the prepare or online callback twice due to
    rollback.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: rt@linutronix.de
    Cc: Michael Ellerman
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20160818125731.27256-16-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine. The online & down callbacks are
    invoked on the target CPU so we can avoid using smp_call_function_single().
    local_irq_disable() is used because smp_call_function_single() used to invoke
    the function with interrupts disabled.

    Signed-off-by: Sebastian Andrzej Siewior
    Reviewed-by: Paolo Bonzini
    Cc: kvm@vger.kernel.org
    Cc: Peter Zijlstra
    Cc: Gleb Natapov
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160818125731.27256-15-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine and let the core invoke
    the callbacks on the already online CPUs.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: James Hogan
    Cc: Peter Zijlstra
    Cc: Ralf Baechle
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160818125731.27256-14-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: linux-pm@vger.kernel.org
    Cc: Peter Zijlstra
    Cc: Daniel Lezcano
    Cc: "Rafael J. Wysocki"
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160824091444.brdr5zpbxjvh6n3f@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    v1…v2: - Use only CPUHP_CPUIDLE_DEAD (requested by Daniel Lezcano)

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: linux-pm@vger.kernel.org
    Cc: Peter Zijlstra
    Cc: Daniel Lezcano
    Cc: "Rafael J. Wysocki"
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160824091259.ozyslcopxvbfdqzy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: linux-pm@vger.kernel.org
    Cc: Peter Zijlstra
    Cc: Daniel Lezcano
    Cc: "Rafael J. Wysocki"
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160818125731.27256-11-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine and let the core invoke
    the callbacks on the already online CPUs.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Neil Brown
    Cc: linux-raid@vger.kernel.org
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160818125731.27256-10-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine and let the core invoke
    the callbacks on the already online CPUs.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Thomas Petazzoni
    Cc: Peter Zijlstra
    Cc: netdev@vger.kernel.org
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160818125731.27256-9-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160818125731.27256-7-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine and let the core invoke
    the callbacks on the already online CPUs.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Jens Axboe
    Cc: linux-mm@kvack.org
    Cc: rt@linutronix.de
    Cc: Tejun Heo
    Link: http://lkml.kernel.org/r/20160818125731.27256-6-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Pekka Enberg
    Cc: linux-mm@kvack.org
    Cc: rt@linutronix.de
    Cc: David Rientjes
    Cc: Christoph Lameter
    Cc: Joonsoo Kim
    Link: http://lkml.kernel.org/r/20160818125731.27256-5-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Sebastian Andrzej Siewior
    Reviewed-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Pekka Enberg
    Cc: linux-mm@kvack.org
    Cc: rt@linutronix.de
    Cc: David Rientjes
    Cc: Joonsoo Kim
    Cc: Andrew Morton
    Cc: Christoph Lameter
    Link: http://lkml.kernel.org/r/20160823125319.abeapfjapf2kfezp@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Install the callbacks via the state machine. They are installed at run time but
    relay_prepare_cpu() does not need to be invoked by the boot CPU because
    relay_open() was not yet invoked and there are no pools that need to be created.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Sebastian Andrzej Siewior
    Reviewed-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: rt@linutronix.de
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20160818125731.27256-3-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Richard Weinberger
     
  • relay essentially needs to maintain a per CPU array of channel buffer
    pointers but it manually creates that array. Instead its better to use
    the per CPU constructs, provided by the kernel, to allocate & access the
    array of pointer to channel buffers.

    Signed-off-by: Akash Goel
    Reviewed-by: Chris Wilson
    Link: http://lkml.kernel.org/r/1470909140-25919-1-git-send-email-akash.goel@intel.com
    Signed-off-by: Andrew Morton
    Signed-off-by: Thomas Gleixner

    Akash Goel
     
  • All users are converted to state machine, remove CPU_STARTING and the
    corresponding CPU_DYING.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160818125731.27256-2-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

06 Sep, 2016

1 commit


05 Sep, 2016

1 commit

  • Some compilers are unhappy with the anon union in the state array. Replace
    it with a named union.

    While at it align the state array initializers proper and add the missing
    name tags.

    Fixes: cf392d10b69e "cpu/hotplug: Add multi instance support"
    Reported-by: Ingo Molnar
    Reported-by: Fenguang Wu
    Signed-off-by: Thomas Gleixner
    Cc: rt@linutronix.de

    Thomas Gleixner
     

03 Sep, 2016

7 commits

  • When cpu_hotplug_enable() is called unbalanced w/o a preceeding
    cpu_hotplug_disable() the code emits a warning, but happily decrements the
    disabled counter. This causes the next operations to malfunction.

    Prevent the decrement and just emit a warning.

    Signed-off-by: Lianwei Wang
    Cc: peterz@infradead.org
    Cc: linux-pm@vger.kernel.org
    Cc: oleg@redhat.com
    Link: http://lkml.kernel.org/r/1465541008-12476-1-git-send-email-lianwei.wang@gmail.com
    Signed-off-by: Thomas Gleixner

    Lianwei Wang
     
  • Install the callbacks via the state machine.

    The driver supports multiple instances and therefore the new
    cpuhp_state_add_instance_nocalls() infrastrucure is used. The driver
    currently uses get_online_cpus() to avoid missing a CPU hotplug event while
    invoking virtnet_set_affinity(). This could be avoided by using
    cpuhp_state_add_instance() variant which holds the hotplug lock and invokes
    callback during registration. This is more or less a 1:1 conversion of the
    current code.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Mark Rutland
    Cc: "Michael S. Tsirkin"
    Cc: Peter Zijlstra
    Cc: netdev@vger.kernel.org
    Cc: Will Deacon
    Cc: virtualization@lists.linux-foundation.org
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/1471024183-12666-7-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Signed-off-by: Sebastian Andrzej Siewior
    Cc: Mark Rutland
    Cc: Pawel Moll
    Cc: Arnd Bergmann
    Cc: Suzuki K Poulose
    Cc: Peter Zijlstra
    Cc: Will Deacon
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/1471024183-12666-6-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Signed-off-by: Sebastian Andrzej Siewior
    Cc: Mark Rutland
    Cc: Suzuki K Poulose
    Cc: Peter Zijlstra
    Cc: Will Deacon
    Cc: rt@linutronix.de
    Cc: Olof Johansson
    Link: http://lkml.kernel.org/r/1471024183-12666-5-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Mark Rutland
    Cc: Will Deacon
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160817171420.sdwk2qivxunzryz4@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     
  • This patch adds the ability for a given state to have multiple
    instances. Until now all states have a single instance and the startup /
    teardown callback use global variables.
    A few drivers need to perform a the same callbacks on multiple
    "instances". Currently we have three drivers in tree which all have a
    global list which they iterate over. With multi instance they support
    don't need their private list and the functionality has been moved into
    core code. Plus we hold the hotplug lock in core so no cpus comes/goes
    while instances are registered and we do rollback in error case :)

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Mark Rutland
    Cc: Peter Zijlstra
    Cc: Will Deacon
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/1471024183-12666-3-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • This is preparation for the following patch.
    This rework here changes the arguments of cpuhp_invoke_callback(). It
    passes now `state' and whether `startup' or `teardown' callback should
    be invoked. The callback then is looked up by the function.

    The following is a clanup of callers:
    - cpuhp_issue_call() has one argument less
    - struct cpuhp_cpu_state (which is used by the hotplug thread) gets also
    its callback removed. The decision if it is a single callback
    invocation moved to the `single' variable. Also a `bringup' variable
    has been added to distinguish between startup and teardown callback.
    - take_cpu_down() needs to start one step earlier. We always get here
    via CPUHP_TEARDOWN_CPU callback. Before that change cpuhp_ap_states +
    CPUHP_TEARDOWN_CPU pointed to an empty entry because TEARDOWN is saved
    in bp_states for this reason. Now that we use cpuhp_get_step() to
    lookup the state we must explicitly skip it in order not to invoke it
    twice.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Mark Rutland
    Cc: Peter Zijlstra
    Cc: Will Deacon
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/1471024183-12666-2-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

02 Sep, 2016

1 commit


29 Aug, 2016

5 commits

  • Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "A bunch of fixes covering i915, amdgpu, one tegra and some core DRM
    ones. Nothing too strange at this point"

    * tag 'drm-fixes-for-4.8-rc4' of git://people.freedesktop.org/~airlied/linux: (21 commits)
    drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates.
    drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION
    drm/amdgpu: skip TV/CV in display parsing
    drm/amdgpu: avoid a possible array overflow
    drm/amdgpu: fix lru size grouping v2
    drm/tegra: dsi: Enhance runtime power management
    drm/i915: Fix botched merge that downgrades CSR versions.
    drm/i915/skl: Ensure pipes with changed wms get added to the state
    drm/i915/gen9: Only copy WM results for changed pipes to skl_hw
    drm/i915/skl: Add support for the SAGV, fix underrun hangs
    drm/i915/gen6+: Interpret mailbox error flags
    drm/i915: Reattach comment, complete type specification
    drm/i915: Unconditionally flush any chipset buffers before execbuf
    drm/i915/gen9: Drop invalid WARN() during data rate calculation
    drm/i915/gen9: Initialize intel_state->active_crtcs during WM sanitization (v2)
    drm: Reject page_flip for !DRIVER_MODESET
    drm/amdgpu: fix timeout value check in amd_sched_job_recovery
    drm/amdgpu: fix sdma_v2_4_ring_test_ib
    drm/amdgpu: fix amdgpu_move_blit on 32bit systems
    drm/radeon: fix radeon_move_blit on 32bit systems
    ...

    Linus Torvalds
     
  • Due to assigning the 'replaced' value instead of or'ing it,
    if drm_atomic_crtc_set_property() gets called multiple times,
    the last call will define the color_mgmt_changed flag, so
    a non-updating call to a property can reset the flag and
    prevent actual hw state updates required by preceding
    property updates.

    Signed-off-by: Mario Kleiner
    Cc: Daniel Vetter
    Cc: # v4.6+
    Reviewed-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Mario Kleiner
     
  • Pull perf fixes from Thomas Gleixner:
    "A few fixes from the perf departement

    - prevent a imbalanced preemption disable in the events teardown code
    - prevent out of bound acces in perf userspace
    - make perf tools compile with UCLIBC again
    - a fix for the userspace unwinder utility"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/core: Use this_cpu_ptr() when stopping AUX events
    perf evsel: Do not access outside hw cache name arrays
    tools lib: Reinstate strlcpy() header guard with __UCLIBC__
    perf unwind: Use addr_location::addr instead of ip for entries

    Linus Torvalds
     
  • Pull x86 fix from Thomas Gleixner:
    "A single bugfix to prevent irq remapping when the ioapic is disabled"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/apic: Do not init irq remapping if ioapic is disabled

    Linus Torvalds