1. 24 3月, 2015 2 次提交
  2. 17 3月, 2015 10 次提交
  3. 04 3月, 2015 1 次提交
  4. 04 2月, 2015 1 次提交
  5. 02 2月, 2015 1 次提交
    • R
      cxl: Fix device_node reference counting · 6f963ec2
      Ryan Grimm 提交于
      When unbinding and rebinding the driver on a system with a card in PHB0, this
      error condition is reached after a few attempts:
      
      ERROR: Bad of_node_put() on /pciex@3fffe40000000
      CPU: 0 PID: 3040 Comm: bash Not tainted 3.18.0-rc3-12545-g3627ffe #152
      Call Trace:
      [c000000721acb5c0] [c00000000086ef94] .dump_stack+0x84/0xb0 (unreliable)
      [c000000721acb640] [c00000000073a0a8] .of_node_release+0xd8/0xe0
      [c000000721acb6d0] [c00000000044bc44] .kobject_release+0x74/0xe0
      [c000000721acb760] [c0000000007394fc] .of_node_put+0x1c/0x30
      [c000000721acb7d0] [c000000000545cd8] .cxl_probe+0x1a98/0x1d50
      [c000000721acb900] [c0000000004845a0] .local_pci_probe+0x40/0xc0
      [c000000721acb980] [c000000000484998] .pci_device_probe+0x128/0x170
      [c000000721acba30] [c00000000052400c] .driver_probe_device+0xac/0x2a0
      [c000000721acbad0] [c000000000522468] .bind_store+0x108/0x160
      [c000000721acbb70] [c000000000521448] .drv_attr_store+0x38/0x60
      [c000000721acbbe0] [c000000000293840] .sysfs_kf_write+0x60/0xa0
      [c000000721acbc50] [c000000000292500] .kernfs_fop_write+0x140/0x1d0
      [c000000721acbcf0] [c000000000208648] .vfs_write+0xd8/0x260
      [c000000721acbd90] [c000000000208b18] .SyS_write+0x58/0x100
      [c000000721acbe30] [c000000000009258] syscall_exit+0x0/0x98
      
      We are missing a call to of_node_get(). pnv_pci_to_phb_node() should
      call of_node_get() otherwise np's reference count isn't incremented and
      it might go away. Rename pnv_pci_to_phb_node() to pnv_pci_get_phb_node()
      so it's clear it calls of_node_get().
      Signed-off-by: NRyan Grimm <grimm@linux.vnet.ibm.com>
      Acked-by: NIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      6f963ec2
  6. 31 1月, 2015 1 次提交
  7. 30 1月, 2015 2 次提交
  8. 28 1月, 2015 4 次提交
  9. 27 1月, 2015 2 次提交
    • P
      powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n · 6501ab5e
      Pranith Kumar 提交于
      When CONFIG_PRINTK=n, log_buf_addr_get() returns NULL and log_buf_len_get()
      return 0. Check for these return values and skip registering the dump buffer.
      Signed-off-by: NPranith Kumar <bobby.prani@gmail.com>
      Reviewed-by: NStewart Smith <stewart@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      6501ab5e
    • C
      powerpc/pseries: Fix endian problems with LE migration · 3df76a9d
      Cyril Bur 提交于
      RTAS events require arguments be passed in big endian while hypercalls
      have their arguments passed in registers and the values should therefore
      be in CPU endian.
      
      The "ibm,suspend_me" 'RTAS' call makes a sequence of hypercalls to setup
      one true RTAS call. This means that "ibm,suspend_me" is handled
      specially in the ppc_rtas() syscall.
      
      The ppc_rtas() syscall has its arguments in big endian and can therefore
      pass these arguments directly to the RTAS call. "ibm,suspend_me" is
      handled specially from within ppc_rtas() (by calling rtas_ibm_suspend_me())
      which has left an endian bug on little endian systems due to the
      requirement of hypercalls. The return value from rtas_ibm_suspend_me()
      gets returned in cpu endian, and is left unconverted, also a bug on
      little endian systems.
      
      rtas_ibm_suspend_me() does not actually make use of the rtas_args that
      it is passed. This patch removes the convoluted use of the rtas_args
      struct to pass params to rtas_ibm_suspend_me() in favour of passing what
      it needs as actual arguments. This patch also ensures the two callers of
      rtas_ibm_suspend_me() pass function parameters in cpu endian and in the
      case of ppc_rtas(), converts the return value.
      
      migrate_store() (the other caller of rtas_ibm_suspend_me()) is from a
      sysfs file which deals with everything in cpu endian so this function
      only underwent cleanup.
      
      This patch has been tested with KVM both LE and BE and on PowerVM both
      LE and BE. Under QEMU/KVM the migration happens without touching these
      code pathes.
      
      For PowerVM there is no obvious regression on BE and the LE code path
      now provides the correct parameters to the hypervisor.
      Signed-off-by: NCyril Bur <cyrilbur@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      3df76a9d
  10. 23 1月, 2015 7 次提交
  11. 22 1月, 2015 5 次提交
    • R
      cxl: Enable CAPP recovery · 1212aa1c
      Ryan Grimm 提交于
      Turning snoops on is the last step in CAPP recovery. Sapphire is expected to
      have reinitialized the PHB and done the previous recovery steps.
      
      Add mode argument to opal call to do this. Driver can turn snoops off although
      it does not currently.
      Signed-off-by: NRyan Grimm <grimm@linux.vnet.ibm.com>
      Acked-by: NIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1212aa1c
    • G
      powerpc/ps3: Write highmem info to repository · 5ae74630
      Geoff Levand 提交于
      Add calls to the ps3_mm_set_repository_highmem() routine when the ps3
      r1 highmem region is either created or destroyed.
      Signed-off-by: NGeoff Levand <geoff@infradead.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5ae74630
    • G
      powerpc/ps3: Add ps3_mm_set_repository_highmem · d4b18bd6
      Geoff Levand 提交于
      Add the new routine ps3_mm_set_repository_highmem() that saves highmem info to
      the LV1 hypervisor registry so that the info will be available to second stage
      OS's loaded by petitboot/kexec. FreeBSD and some Linux derivatives use
      this feature.
      
      Also, move the existing ps3_mm_get_repository_highmem() routine up in
      the source file.
      
      This implementation of ps3_mm_set_repository_highmem() assumes the repository
      will have a single highmem region entry (at index 0).
      Signed-off-by: NGeoff Levand <geoff@infradead.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d4b18bd6
    • G
      powerpc/ps3: Add empty repository highmem routines · c02d3506
      Geoff Levand 提交于
      To avoid the need for preprocessor conditionals in C source files add a set of
      empty inline repository highmem write routines to platform.h that are used when
      CONFIG_PS3_REPOSITORY_WRITE is not defined.
      Signed-off-by: NGeoff Levand <geoff@infradead.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c02d3506
    • S
      powerpc/powernv: Restore LPCR with LPCR_PECE1 cleared · 0eb13208
      Shreyas B. Prabhu 提交于
      LPCR_PECE1 bit controls whether decrementer interrupts are allowed to
      cause exit from power-saving mode. While waking up from winkle, restoring
      LPCR with LPCR_PECE1 set (i.e Decrementer interrupts allowed) can cause
      issue in the following scenario:
      
      - All the threads in a core are offlined. The core enters deep winkle.
      - Spurious interrupt wakes up a thread in the core. Here LPCR is restored
        with LPCR_PECE1 bit set.
      - Since it was a spurious interrupt on a offline thread, the thread clears
        the interrupt and goes back to winkle.
      - Here before the thread executes winkle and puts the core into deep winkle,
        if a decrementer interrupt occurs on any of the sibling threads in the core
        that thread wakes up.
      - Since in offline loop we are flushing interrupt only in case of external
        interrupt, the decrementer interrupt does not get flushed. So at this stage
        the thread is stuck in this is loop of waking up at 0x100 due to decrementer
        interrupt, not flushing the interrupt as only external interrupts get flushed,
        entering winkle, waking up at 0x100 again.
      
      Fix this by programming PORE to restore LPCR with LPCR_PECE1 bit
      cleared when waking up from winkle.
      Signed-off-by: NShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      0eb13208
  12. 21 1月, 2015 1 次提交
  13. 12 1月, 2015 1 次提交
    • A
      powernv: Fix OPAL tracepoint code · bfe5fda8
      Anton Blanchard 提交于
      Patch c49f6353 ("powernv: Add OPAL tracepoints") has a spurious
      store to the stack:
      
      	ld      r12,opal_tracepoint_refcount@toc(r2);           \
      	std     r12,32(r1);                                     \
      
      The store was originally used to save the current tracepoint status
      so the entry and the exit tracepoints were always balanced. In the
      end I just created a separate path when tracepoints are enabled.
      
      The offset on the stack used for this store is not valid for ABIv2
      and it causes strange issues. I noticed it because OPAL console input
      was broken.
      
      Fixes: c49f6353 ("powernv: Add OPAL tracepoints")
      Cc: <stable@vger.kernel.org> # v3.17+
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      bfe5fda8
  14. 29 12月, 2014 2 次提交