1. 12 1月, 2018 1 次提交
  2. 04 10月, 2017 1 次提交
    • C
      powerpc/xive: Clear XIVE internal structures when a CPU is removed · cc569398
      Cédric Le Goater 提交于
      Commit eac1e731 ("powerpc/xive: guest exploitation of the XIVE
      interrupt controller") introduced support for the XIVE exploitation
      mode of the P9 interrupt controller on the pseries platform.
      
      At that time, support for CPU removal was not complete on PowerVM and
      CPU hot unplug remained untested. It appears that some cleanups of the
      XIVE internal structures are required before releasing the CPU,
      without which the kernel crashes in a RTAS call doing the CPU
      isolation.
      
      These changes fix the crash by deconfiguring the IPI interrupt source
      and clearing the event queues of the CPU when it is removed.
      
      Fixes: eac1e731 ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      cc569398
  3. 02 9月, 2017 6 次提交
  4. 24 8月, 2017 1 次提交
    • C
      powerpc/xive: Fix the size of the cpumask used in xive_find_target_in_mask() · a9dadc1c
      Cédric Le Goater 提交于
      When called from xive_irq_startup(), the size of the cpumask can be
      larger than nr_cpu_ids. This can result in a WARN_ON such as:
      
        WARNING: CPU: 10 PID: 1 at ../arch/powerpc/sysdev/xive/common.c:476 xive_find_target_in_mask+0x110/0x2f0
        ...
        NIP [c00000000008a310] xive_find_target_in_mask+0x110/0x2f0
        LR [c00000000008a2e4] xive_find_target_in_mask+0xe4/0x2f0
        Call Trace:
          xive_find_target_in_mask+0x74/0x2f0 (unreliable)
          xive_pick_irq_target.isra.1+0x200/0x230
          xive_irq_startup+0x60/0x180
          irq_startup+0x70/0xd0
          __setup_irq+0x7bc/0x880
          request_threaded_irq+0x14c/0x2c0
          request_event_sources_irqs+0x100/0x180
          __machine_initcall_pseries_init_ras_IRQ+0x104/0x134
          do_one_initcall+0x68/0x1d0
          kernel_init_freeable+0x290/0x374
          kernel_init+0x24/0x170
          ret_from_kernel_thread+0x5c/0x74
      
      This happens because we're being called with our affinity mask set to
      irq_default_affinity. That in turn was populated using
      cpumask_setall(), which sets NR_CPUs worth of bits, not nr_cpu_ids
      worth. Finally cpumask_weight() will return > nr_cpu_ids when passed a
      mask which has > nr_cpu_ids bits set.
      
      Fix it by limiting the value returned by cpumask_weight().
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      [mpe: Add change log details on actual cause]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a9dadc1c
  5. 15 8月, 2017 1 次提交
  6. 10 8月, 2017 2 次提交
  7. 15 6月, 2017 1 次提交
  8. 05 6月, 2017 1 次提交
  9. 27 4月, 2017 1 次提交
  10. 13 4月, 2017 1 次提交
    • N
      powerpc: Change the doorbell IPI calling convention · b866cc21
      Nicholas Piggin 提交于
      Change the doorbell callers to know about their msgsnd addressing,
      rather than have them set a per-cpu target data tag at boot that gets
      sent to the cause_ipi functions. The data is only used for doorbell IPI
      functions, no other IPI types, so it makes sense to keep that detail
      local to doorbell.
      
      Have the platform code understand doorbell IPIs, rather than the
      interrupt controller code understand them. Platform code can look at
      capabilities it has available and decide which to use.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b866cc21
  11. 10 4月, 2017 1 次提交
    • B
      powerpc/xive: Native exploitation of the XIVE interrupt controller · 243e2511
      Benjamin Herrenschmidt 提交于
      The XIVE interrupt controller is the new interrupt controller
      found in POWER9. It supports advanced virtualization capabilities
      among other things.
      
      Currently we use a set of firmware calls that simulate the old
      "XICS" interrupt controller but this is fairly inefficient.
      
      This adds the framework for using XIVE along with a native
      backend which OPAL for configuration. Later, a backend allowing
      the use in a KVM or PowerVM guest will also be provided.
      
      This disables some fast path for interrupts in KVM when XIVE is
      enabled as these rely on the firmware emulation code which is no
      longer available when the XIVE is used natively by Linux.
      
      A latter patch will make KVM also directly exploit the XIVE, thus
      recovering the lost performance (and more).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [mpe: Fixup pr_xxx("XIVE:"...), don't split pr_xxx() strings,
       tweak Kconfig so XIVE_NATIVE selects XIVE and depends on POWERNV,
       fix build errors when SMP=n, fold in fixes from Ben:
         Don't call cpu_online() on an invalid CPU number
         Fix irq target selection returning out of bounds cpu#
         Extra sanity checks on cpu numbers
       ]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      243e2511