1. 02 12月, 2014 1 次提交
  2. 05 11月, 2014 2 次提交
  3. 03 11月, 2014 1 次提交
    • A
      powerpc: Convert power off logic to pm_power_off · 9178ba29
      Alexander Graf 提交于
      The generic Linux framework to power off the machine is a function pointer
      called pm_power_off. The trick about this pointer is that device drivers can
      potentially implement it rather than board files.
      
      Today on powerpc we set pm_power_off to invoke our generic full machine power
      off logic which then calls ppc_md.power_off to invoke machine specific power
      off.
      
      However, when we want to add a power off GPIO via the "gpio-poweroff" driver,
      this card house falls apart. That driver only registers itself if pm_power_off
      is NULL to ensure it doesn't override board specific logic. However, since we
      always set pm_power_off to the generic power off logic (which will just not
      power off the machine if no ppc_md.power_off call is implemented), we can't
      implement power off via the generic GPIO power off driver.
      
      To fix this up, let's get rid of the ppc_md.power_off logic and just always use
      pm_power_off as was intended. Then individual drivers such as the GPIO power off
      driver can implement power off logic via that function pointer.
      
      With this patch set applied and a few patches on top of QEMU that implement a
      power off GPIO on the virt e500 machine, I can successfully turn off my virtual
      machine after halt.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      [mpe: Squash into one patch and update changelog based on cover letter]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      9178ba29
  4. 02 10月, 2014 2 次提交
  5. 13 8月, 2014 1 次提交
  6. 05 8月, 2014 1 次提交
  7. 28 7月, 2014 1 次提交
  8. 05 6月, 2014 1 次提交
  9. 28 4月, 2014 2 次提交
    • G
      powerpc: powernv: Framework to show the correct clock in /proc/cpuinfo · 2299d03a
      Gautham R. Shenoy 提交于
      Currently, the code in setup-common.c for powerpc assumes that all
      clock rates are same in a smp system. This value is cached in the
      variable named ppc_proc_freq and is the value that is reported in
      /proc/cpuinfo.
      
      However on the PowerNV platform, the clock rate is same only across
      the threads of the same core. Hence the value that is reported in
      /proc/cpuinfo is incorrect on PowerNV platforms. We need a better way
      to query and report the correct value of the processor clock in
      /proc/cpuinfo.
      
      The patch achieves this by creating a machdep_call named
      get_proc_freq() which is expected to returns the frequency in Hz. The
      code in show_cpuinfo() can invoke this method to display the correct
      clock rate on platforms that have implemented this method. On the
      other powerpc platforms it can use the value cached in ppc_proc_freq.
      Signed-off-by: NGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      2299d03a
    • G
      powerpc/pci: Mask linkDown on resetting PCI bus · d92a208d
      Gavin Shan 提交于
      The problem was initially reported by Wendy who tried pass through
      IPR adapter, which was connected to PHB root port directly, to KVM
      based guest. When doing that, pci_reset_bridge_secondary_bus() was
      called by VFIO driver and linkDown was detected by the root port.
      That caused all PEs to be frozen.
      
      The patch fixes the issue by routing the reset for the secondary bus
      of root port to underly firmware. For that, one more weak function
      pci_reset_secondary_bus() is introduced so that the individual platforms
      can override that and do specific reset for bridge's secondary bus.
      Reported-by: NWendy Xiong <wenxiong@linux.vnet.ibm.com>
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d92a208d
  10. 07 3月, 2014 2 次提交
    • N
      powerpc/pseries: Use remove_memory() to remove memory · 9ac8cde9
      Nathan Fontenot 提交于
      The memory remove code for powerpc/pseries should call remove_memory()
      so that we are holding the hotplug_memory lock during memory remove
      operations.
      
      This patch updates the memory node remove handler to call remove_memory()
      and adds a ppc_md.remove_memory() entry to handle pseries specific work
      that is called from arch_remove_memory().
      
      During memory remove in pseries_remove_memblock() we have to stay with
      removing memory one section at a time. This is needed because of how memory
      resources are handled. During memory add for pseries (via the probe file in
      sysfs) we add memory one section at a time which gives us a memory resource
      for each section. Future patches will aim to address this so will not have
      to remove memory one section at a time.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9ac8cde9
    • M
      powerpc/book3s: Recover from MC in sapphire on SCOM read via MMIO. · 55672ecf
      Mahesh Salgaonkar 提交于
      Detect and recover from machine check when inside opal on a special
      scom load instructions. On specific SCOM read via MMIO we may get a machine
      check exception with SRR0 pointing inside opal. To recover from MC
      in this scenario, get a recovery instruction address and return to it from
      MC.
      
      OPAL will export the machine check recoverable ranges through
      device tree node mcheck-recoverable-ranges under ibm,opal:
      
      # hexdump /proc/device-tree/ibm,opal/mcheck-recoverable-ranges
      0000000 0000 0000 3000 2804 0000 000c 0000 0000
      0000010 3000 2814 0000 0000 3000 27f0 0000 000c
      0000020 0000 0000 3000 2814 xxxx xxxx xxxx xxxx
      0000030 llll llll yyyy yyyy yyyy yyyy
      ...
      ...
      #
      
      where:
      	xxxx xxxx xxxx xxxx = Starting instruction address
      	llll llll           = Length of the address range.
      	yyyy yyyy yyyy yyyy = recovery address
      
      Each recoverable address range entry is (start address, len,
      recovery address), 2 cells each for start and recovery address, 1 cell for
      len, totalling 5 cells per entry. During kernel boot time, build up the
      recovery table with the list of recovery ranges from device-tree node which
      will be used during machine check exception to recover from MMIO SCOM UE.
      Signed-off-by: NMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      55672ecf
  11. 11 10月, 2013 2 次提交
  12. 21 6月, 2013 2 次提交
  13. 06 5月, 2013 1 次提交
  14. 30 4月, 2013 1 次提交
  15. 10 1月, 2013 1 次提交
  16. 18 12月, 2012 1 次提交
  17. 15 11月, 2012 1 次提交
  18. 17 9月, 2012 1 次提交
  19. 12 9月, 2012 1 次提交
  20. 10 9月, 2012 1 次提交
  21. 28 3月, 2012 1 次提交
  22. 25 11月, 2011 1 次提交
  23. 01 11月, 2011 1 次提交
    • P
      powerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULE · 93087948
      Paul Gortmaker 提交于
      Fix failures in powerpc associated with the previously allowed
      implicit module.h presence that now lead to things like this:
      
      arch/powerpc/mm/mmu_context_hash32.c:76:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
      arch/powerpc/mm/tlb_hash32.c:48:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
      arch/powerpc/kernel/pci_32.c:51:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
      arch/powerpc/kernel/iomap.c:36:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
      arch/powerpc/platforms/44x/canyonlands.c:126:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
      arch/powerpc/kvm/44x.c:168:59: error: 'THIS_MODULE' undeclared (first use in this function)
      
      [with several contibutions from Stephen Rothwell <sfr@canb.auug.org.au>]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      93087948
  24. 01 9月, 2011 1 次提交
    • M
      powerpc: Override dma_get_required_mask by platform hook and ops · 6a5c7be5
      Milton Miller 提交于
      The hook dma_get_required_mask is supposed to return the mask required
      by the platform to operate efficently.  The generic version of
      dma_get_required_mask in driver/base/platform.c returns a mask based
      only on max_pfn.  However, this is likely too big for iommu systems
      and could be too small for platforms that require a dma offset or have
      a secondary window at a high offset.
      
      Override the default, provide a hook in ppc_md used by pseries lpar and
      cell, and provide the default answer based on memblock_end_of_DRAM(),
      with hooks for get_dma_offset, and provide an implementation for iommu
      that looks at the defined table size.  Coverting from the end address
      to the required bit mask is based on the generic implementation.
      
      The need for this was discovered when the qla2xxx driver switched to
      64 bit dma then reverted to 32 bit when dma_get_required_mask said
      32 bits was sufficient.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NNishanth Aravamudan <nacc@us.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-kernel@vger.kernel.org
      Cc: benh@kernel.crashing.org
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6a5c7be5
  25. 19 5月, 2011 2 次提交
  26. 20 4月, 2011 2 次提交
  27. 01 4月, 2011 3 次提交
  28. 02 3月, 2011 1 次提交
  29. 21 1月, 2011 2 次提交