1. 30 3月, 2018 2 次提交
  2. 31 8月, 2017 1 次提交
  3. 13 7月, 2017 1 次提交
  4. 28 4月, 2017 2 次提交
  5. 13 4月, 2017 2 次提交
  6. 07 4月, 2017 1 次提交
    • B
      powerpc/smp: Remove migrate_irq() custom implementation · a978e139
      Benjamin Herrenschmidt 提交于
      Some powerpc platforms use this to move IRQs away from a CPU being
      unplugged. This function has several bugs such as not taking the right
      locks or failing to NULL check pointers.
      
      There's a new generic function doing exactly the same thing without all
      the bugs, so let's use it instead.
      
      mpe: The obvious place for the select of GENERIC_IRQ_MIGRATION is on
      HOTPLUG_CPU, but that doesn't work. On some configs PM_SLEEP_SMP will
      select HOTPLUG_CPU even though its dependencies are not met, which means
      the select of GENERIC_IRQ_MIGRATION doesn't happen. That leads to the
      build breaking. Fix it by moving the select of GENERIC_IRQ_MIGRATION to
      SMP.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a978e139
  7. 06 4月, 2017 1 次提交
  8. 30 11月, 2016 1 次提交
  9. 21 7月, 2016 1 次提交
  10. 05 3月, 2016 2 次提交
  11. 29 2月, 2016 2 次提交
  12. 10 4月, 2015 1 次提交
    • M
      powerpc: Drop return value of smp_ops->probe() · a7f4ee1f
      Michael Ellerman 提交于
      smp_ops->probe() is currently supposed to return the number of cpus in
      the system.
      
      The last actual usage of the value was removed in May 2007 in e147ec8f
      "[POWERPC] Simplify smp_space_timers". We still passed the value around
      until June 2010 when even that was finally removed in c1aa687d
      "powerpc: Clean up obsolete code relating to decrementer and timebase".
      
      So drop that requirement, probe() now returns void, and update all
      implementations.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a7f4ee1f
  13. 07 4月, 2015 1 次提交
  14. 28 1月, 2015 1 次提交
    • M
      powerpc: Remove some unused functions · 8aa989b8
      Michael Ellerman 提交于
      Remove slice_set_psize() which is not used.
      
      It was added in 3a8247cc "powerpc: Only demote individual slices
      rather than whole process" but was never used.
      
      Remove vsx_assist_exception() which is not used.
      
      It was added in ce48b210 "powerpc: Add VSX context save/restore,
      ptrace and signal support" but was never used.
      
      Remove generic_mach_cpu_die() which is not used.
      
      Its last caller was removed in 375f561a "powerpc/powernv: Always go
      into nap mode when CPU is offline".
      
      Remove mpc7448_hpc2_power_off() and mpc7448_hpc2_halt() which are
      unused.
      
      These were introduced in c5d56332 "[POWERPC] Add general support for
      mpc7448hpc2 (Taiga) platform" but were never used.
      
      This was partially found by using a static code analysis program called
      cppcheck.
      Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
      [mpe: Update changelog with details on when/why they are unused]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8aa989b8
  15. 28 5月, 2014 1 次提交
  16. 05 3月, 2014 2 次提交
  17. 21 11月, 2013 1 次提交
    • M
      powerpc: Make cpu_to_chip_id() available when SMP=n · 3eb906c6
      Michael Ellerman 提交于
      Up until now we have only used cpu_to_chip_id() in the topology code,
      which is only used on SMP builds. However my recent commit a4da0d50
      "Implement arch_get_random_long/int() for powernv" added a usage when
      SMP=n, breaking the build.
      
      Move cpu_to_chip_id() into prom.c so it is available for SMP=n builds.
      
      We would move the extern to prom.h, but that breaks the include in
      topology.h. Instead we leave it in smp.h, but move it out of the
      CONFIG_SMP #ifdef. We also need to include asm/smp.h in rng.c, because
      the linux version skips asm/smp.h on UP. What a mess.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3eb906c6
  18. 14 8月, 2013 2 次提交
  19. 01 8月, 2013 1 次提交
    • R
      powerpc: VPHN topology change updates all siblings · 3be7db6a
      Robert Jennings 提交于
      When an associativity level change is found for one thread, the
      siblings threads need to be updated as well.  This is done today
      for PRRN in stage_topology_update() but is missing for VPHN in
      update_cpu_associativity_changes_mask().  This patch will correctly
      update all thread siblings during a topology change.
      
      Without this patch a topology update can result in a CPU in
      init_sched_groups_power() getting stuck indefinitely in a loop.
      
      This loop is built in build_sched_groups(). As a result of the thread
      moving to a node separate from its siblings the struct sched_group will
      have its next pointer set to point to itself rather than the sched_group
      struct of the next thread.  This happens because we have a domain without
      the SD_OVERLAP flag, which is correct, and a topology that doesn't conform
      with reality (threads on the same core assigned to different numa nodes).
      When this list is traversed by init_sched_groups_power() it will reach
      the thread's sched_group structure and loop indefinitely; the cpu will
      be stuck at this point.
      
      The bug was exposed when VPHN was enabled in commit b7abef04 (v3.9).
      
      Cc: <stable@vger.kernel.org> [v3.9+]
      Reported-by: NJan Stancek <jstancek@redhat.com>
      Signed-off-by: NRobert Jennings <rcj@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3be7db6a
  20. 18 4月, 2013 1 次提交
    • P
      powerpc: Fix build errors with UP configs in HV-style KVM · 3cc33d50
      Paul Mackerras 提交于
      This fixes these errors when building UP with CONFIG_KVM_BOOK3S_64_HV=y:
      
      arch/powerpc/kvm/book3s_hv.c:1855:2: error: implicit declaration of function 'inhibit_secondary_onlining' [-Werror=implicit-function-declaration]
      arch/powerpc/kvm/book3s_hv.c:1862:2: error: implicit declaration of function 'uninhibit_secondary_onlining' [-Werror=implicit-function-declaration]
      cc1: all warnings being treated as errors
      
      and this error (with CONFIG_KVM_BOOK3S_64=m, or a vmlinux link error
      with CONFIG_KVM_BOOK3S_64=y):
      
      ERROR: "smp_send_reschedule" [arch/powerpc/kvm/kvm.ko] undefined!
      make[2]: *** [__modpost] Error 1
      
      The fix for the link error is suboptimal; ideally we want a self_ipi()
      function from irq.c, connected at least to the MPIC code, to initiate
      an IPI to this cpu.  The fix here at least lets the code build, and it
      will work, just with interrupts being delayed sometimes.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      3cc33d50
  21. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  22. 30 10月, 2012 1 次提交
    • P
      KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online · 512691d4
      Paul Mackerras 提交于
      When a Book3S HV KVM guest is running, we need the host to be in
      single-thread mode, that is, all of the cores (or at least all of
      the cores where the KVM guest could run) to be running only one
      active hardware thread.  This is because of the hardware restriction
      in POWER processors that all of the hardware threads in the core
      must be in the same logical partition.  Complying with this restriction
      is much easier if, from the host kernel's point of view, only one
      hardware thread is active.
      
      This adds two hooks in the SMP hotplug code to allow the KVM code to
      make sure that secondary threads (i.e. hardware threads other than
      thread 0) cannot come online while any KVM guest exists.  The KVM
      code still has to check that any core where it runs a guest has the
      secondary threads offline, but having done that check it can now be
      sure that they will not come online while the guest is running.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      512691d4
  23. 13 9月, 2012 2 次提交
  24. 28 3月, 2012 1 次提交
  25. 20 9月, 2011 1 次提交
  26. 29 6月, 2011 1 次提交
  27. 17 6月, 2011 1 次提交
  28. 26 5月, 2011 1 次提交
    • M
      powerpc/cell: Use common smp ipi actions · 7ef71d75
      Milton Miller 提交于
      The cell iic interrupt controller has enough software caused interrupts
      to use a unique interrupt for each of the 4 messages powerpc uses.
      This means each interrupt gets its own irq action/data combination.
      
      Use the seperate, optimized, arch common ipi action functions
      registered via the helper smp_request_message_ipi instead passing the
      message as action data to a single action that then demultipexes to
      the required acton via a switch statement.
      
      smp_request_message_ipi will register the action as IRQF_PER_CPU
      and IRQF_DISABLED, and WARN if the allocation fails for some reason,
      so no need to print on that failure.  It will return positive if
      the message will not be used by the kernel, in which case we can
      free the virq.
      
      In addition to elimiating inefficient code, this also corrects the
      error that a kernel built with kexec but without a debugger would
      not register the ipi for kdump to notify the other cpus of a crash.
      
      This also restores the debugger action to be static to kernel/smp.c.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      7ef71d75
  29. 19 5月, 2011 4 次提交
    • M
      powerpc: Add kconfig for muxed smp ipi support · 1ece355b
      Milton Miller 提交于
      Compile the new smp ipi mux and demux code only if a platform
      will make use of it.  The new config is selected as required.
      
      The new cause_ipi smp op is only available conditionally to point out
      configs where the select is required; this makes setting the op an
      immediate fail instead of a deferred unresolved symbol at link.
      
      This also creates a new config for power surge powermac upgrade support
      that can be disabled in expert mode but is default on.
      
      I also removed the depends / default y on CONFIG_XICS since it is selected
      by PSERIES.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1ece355b
    • M
      powerpc: Consolidate ipi message mux and demux · 23d72bfd
      Milton Miller 提交于
      Consolidate the mux and demux of ipi messages into smp.c and call
      a new smp_ops callback to actually trigger the ipi.
      
      The powerpc architecture code is optimised for having 4 distinct
      ipi triggers, which are mapped to 4 distinct messages (ipi many, ipi
      single, scheduler ipi, and enter debugger).  However, several interrupt
      controllers only provide a single software triggered interrupt that
      can be delivered to each cpu.  To resolve this limitation, each smp_ops
      implementation created a per-cpu variable that is manipulated with atomic
      bitops.  Since these lines will be contended they are optimialy marked as
      shared_aligned and take a full cache line for each cpu.  Distro kernels
      may have 2 or 3 of these in their config, each taking per-cpu space
      even though at most one will be in use.
      
      This consolidation removes smp_message_recv and replaces the single call
      actions cases with direct calls from the common message recognition loop.
      The complicated debugger ipi case with its muxed crash handling code is
      moved to debug_ipi_action which is now called from the demux code (instead
      of the multi-message action calling smp_message_recv).
      
      I put a call to reschedule_action to increase the likelyhood of correctly
      merging the anticipated scheduler_ipi() hook coming from the scheduler
      tree; that single required call can be inlined later.
      
      The actual message decode is a copy of the old pseries xics code with its
      memory barriers and cache line spacing, augmented with a per-cpu unsigned
      long based on the book-e doorbell code.  The optional data is set via a
      callback from the implementation and is passed to the new cause-ipi hook
      along with the logical cpu number.  While currently only the doorbell
      implemntation uses this data it should be almost zero cost to retrieve and
      pass it -- it adds a single register load for the argument from the same
      cache line to which we just completed a store and the register is dead
      on return from the call.  I extended the data element from unsigned int
      to unsigned long in case some other code wanted to associate a pointer.
      
      The doorbell check_self is replaced by a call to smp_muxed_ipi_resend,
      conditioned on the CPU_DBELL feature.  The ifdef guard could be relaxed
      to CONFIG_SMP but I left it with BOOKE for now.
      
      Also, the doorbell interrupt vector for book-e was not calling irq_enter
      and irq_exit, which throws off cpu accounting and causes code to not
      realize it is running in interrupt context.  Add the missing calls.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      23d72bfd
    • M
      powerpc: Move smp_ops_t from machdep.h to smp.h · 17f9c8a7
      Milton Miller 提交于
      I can't see any reason these functions are needed by machdep.h
      and they are all hidden by CONFIG_SMP with no UP alternative.
      
      Also move the declarations for the fallback timebase ops, which
      are used to fill in the smp ops.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      17f9c8a7
    • M
      powerpc: Remove call sites of MSG_ALL_BUT_SELF · e0476371
      Milton Miller 提交于
      The only user of MSG_ALL_BUT_SELF in the whole kernel tree is powerpc,
      and it only uses it to start the debugger. Both debuggers always call
      smp_send_debugger_break with MSG_ALL_BUT_SELF, and only mpic can do
      anything more optimal than a loop over all online cpus, but all message
      passing implementations have to code for this special delivery target.
      
      Convert smp_send_debugger_break to take void and loop calling the smp_ops
      message_pass function for each of the other cpus in the online cpumask.
      
      Use raw_smp_processor_id() because we are either entering the debugger
      or trying to start kdump and the additional warning it not useful were
      it to trigger.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e0476371