1. 23 Feb, 2009 4 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>
      448e2ca0
    • 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>
      d523cc37
    • Kumar Gala's avatar
      powerpc: Add support for using doorbells for SMP IPI · 620165f9
      Kumar Gala authored
      The e500mc supports the new msgsnd/doorbell mechanisms that were added in
      the Power ISA 2.05 architecture.  We use the normal level doorbell for
      doing SMP IPIs at this point.
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      620165f9
    • Arnd Bergmann's avatar
      powerpc/cell: Fix dependency in cpufreq · 6ed8d128
      Arnd Bergmann authored
      cbe_cpufreq has a partial dependency on cbe_cpufreq_pmi, which cannot
      be easily expressed in Kconfig. This fixes it by introducing an
      extra Kconfig symbol CBE_CPUFREQ_PMI_ENABLE. To make the dependency
      clearer, turn PPC_PMI into an automatic symbol.
      Reported-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6ed8d128
  2. 22 Feb, 2009 19 commits
  3. 18 Feb, 2009 5 commits
  4. 17 Feb, 2009 12 commits