1. 28 Jul, 2014 1 commit
    • Michael Ellerman's avatar
      powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() · 8e83e905
      Michael Ellerman authored
      A lot of the code in platforms/pseries is using non-machine initcalls.
      That means if a kernel built with pseries support runs on another
      platform, for example powernv, the initcalls will still run.
      Most of these cases are OK, though sometimes only due to luck. Some were
      having more effect:
       * hcall_inst_init
        - Checking FW_FEATURE_LPAR which is set on ps3 & celleb.
       * mobility_sysfs_init
        - created sysfs files unconditionally
        - but no effect due to ENOSYS from rtas_ibm_suspend_me()
       * apo_pm_init
        - created sysfs, allows write
        - nothing checks the value written to though
       * alloc_dispatch_log_kmem_cache
        - creating kmem_cache on non-pseries machines
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  2. 13 Dec, 2013 1 commit
  3. 24 May, 2013 2 commits
  4. 05 May, 2013 1 commit
  5. 23 Nov, 2012 1 commit
  6. 09 Sep, 2012 1 commit
    • Gavin Shan's avatar
      powerpc/eeh: Trace error based on PE from beginning · 66523d9f
      Gavin Shan authored
      There're 2 conditions to trigger EEH error detection: invalid value
      returned from reading I/O or config space. On each case, the function
      eeh_dn_check_failure will be called to initialize EEH event and put
      it into the poll for further processing.
      The patch changes the function for a little bit so that the EEH error
      will be traced based on PE instead of EEH device any more. Also, the
      function eeh_find_device_pe() has been removed since the eeh device
      is tracing the PE by struct eeh_dev::pe.
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  7. 07 Sep, 2012 1 commit
  8. 09 Mar, 2012 1 commit
  9. 29 Mar, 2011 1 commit
  10. 11 Mar, 2011 1 commit
  11. 05 Nov, 2009 1 commit
  12. 11 Mar, 2009 1 commit
  13. 23 Feb, 2009 2 commits
    • Michael Ellerman's avatar
      powerpc/pseries: Implement a quota system for MSIs · 448e2ca0
      Michael Ellerman authored
      There are hardware limitations on the number of available MSIs,
      which firmware expresses using a property named "ibm,pe-total-#msi".
      This property tells us how many MSIs are available for devices below
      the point in the PCI tree where we find the property.
      For old firmwares which don't have the property, we assume there are
      8 MSIs available per "partitionable endpoint" (PE). The PE can be
      found using existing EEH code, which uses the methods described in
      PAPR. For our purposes we want the parent of the node that's
      identified using this method.
      When a driver requests n MSIs for a device, we first establish where
      the "ibm,pe-total-#msi" property above that device is, or we find the
      PE if the property is not found. In both cases we call this node
      the "pe_dn".
      We then count all non-bridge devices below the pe_dn, to establish
      how many devices in total may need MSIs. The quota is then simply the
      total available divided by the number of devices, if the request is
      less than or equal to the quota, the request is fine and we're done.
      If the request is greater than the quota, we try to determine if there
      are any "spare" MSIs which we can give to this device. Spare MSIs are
      found by looking for other devices which can never use their full
      quota, because their "req#msi(-x)" property is less than the quota.
      If we find any spare, we divide the spares by the number of devices
      that could request more than their quota. This ensures the spare
      MSIs are spread evenly amongst all over-quota requestors.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Michael Ellerman's avatar
      powerpc/pseries: Return req#msi(-x) if request is larger · d523cc37
      Michael Ellerman authored
      If a driver asks for more MSIs than the devices "req#msi(-x)" property,
      we currently return -ENOSPC. This doesn't give the driver any chance to
      make a new request with a number that might work.
      So if "req#msi(-x)" is less than the request, return its value. To be
      100% safe, make sure we return an error if req_msi == 0.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  14. 11 Feb, 2009 4 commits
  15. 08 Nov, 2007 1 commit
  16. 02 Oct, 2007 2 commits
  17. 08 May, 2007 1 commit
    • Michael Ellerman's avatar
      [POWERPC] RTAS MSI implementation · 85f2bf9f
      Michael Ellerman authored
      Implement MSI support via RTAS (RTAS = run-time firmware on pSeries
      machines).  For now we assumes that if the required RTAS tokens for
      MSI are present, then we want to use the RTAS MSI routines.
      When RTAS is managing MSIs for us, it will/may enable MSI on devices that
      support it by default. This is contrary to the Linux model where a device
      is in LSI mode until the driver requests MSIs.
      To remedy this we add a pci_irq_fixup call, which disables MSI if they've
      been assigned by firmware and the device also supports LSI. Devices that
      don't support LSI at all will be left as is, drivers are still expected
      to call pci_enable_msi() before using the device.
      At the moment there is no pci_irq_fixup on pSeries, so we can just set it
      unconditionally. If other platforms use the RTAS MSI backend they'll need
      to check that still holds.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>