1. 30 Jan, 2015 27 commits
  2. 28 Jan, 2015 7 commits
  3. 27 Jan, 2015 2 commits
    • Pranith Kumar's avatar
      powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n · 6501ab5e
      Pranith Kumar authored
      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: default avatarPranith Kumar <bobby.prani@gmail.com>
      Reviewed-by: default avatarStewart Smith <stewart@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      6501ab5e
    • Cyril Bur's avatar
      powerpc/pseries: Fix endian problems with LE migration · 3df76a9d
      Cyril Bur authored
      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: default avatarCyril Bur <cyrilbur@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      3df76a9d
  4. 23 Jan, 2015 4 commits
    • Anton Blanchard's avatar
      selftests/powerpc: Add memcmp testcase · 521adf53
      Anton Blanchard authored
      Add a testcase for the new ppc64 memcmp.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      521adf53
    • Anton Blanchard's avatar
      powerpc: Add 64bit optimised memcmp · 15c2d45d
      Anton Blanchard authored
      I noticed ksm spending quite a lot of time in memcmp on a large
      KVM box. The current memcmp loop is very unoptimised - byte at a
      time compares with no loop unrolling. We can do much much better.
      
      Optimise the loop in a few ways:
      
      - Unroll the byte at a time loop
      
      - For large (at least 32 byte) comparisons that are also 8 byte
        aligned, use an unrolled modulo scheduled loop using 8 byte
        loads. This is similar to our glibc memcmp.
      
      A simple microbenchmark testing 10000000 iterations of an 8192 byte
      memcmp was used to measure the performance:
      
      baseline:	29.93 s
      
      modified:	 1.70 s
      
      Just over 17x faster.
      
      v2: Incorporated some suggestions from Segher:
      
      - Use andi. instead of rdlicl.
      
      - Convert bdnzt eq, to bdnz. It's just duplicating the earlier compare
        and was a relic from a previous version.
      
      - Don't use cr5, we have plans to use that CR field for fast local
        atomics.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      15c2d45d
    • Gavin Shan's avatar
      powerpc/powernv: Remove pnv_pci_probe_mode() · a113de37
      Gavin Shan authored
      The callback (ppc_md.pci_probe_mode()) is used to determine if the
      child PCI devices of the indicated PCI bus should be probed from
      device-tree or hardware. On PowerNV platform, we always expect
      probing PCI devices from hardware, which is PowerPC PCI core's
      default behaviour. Also, the callback had some delay implemented
      based on PHB's device node property "reset-clear-timestamp", which
      wasn't exported from skiboot. So we don't need this function and
      it's safe to remove it.
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      a113de37
    • Gavin Shan's avatar
      powerpc/eeh: Allow to set maximal frozen times · 1b28f170
      Gavin Shan authored
      When PE's frozen count hits maximal allowed frozen times, which is
      5 currently, it will be forced to be offline permanently. Once the
      PE is removed permanently, rebooting machine is required to bring
      the PE back. It's not convienent when testing EEH functionality.
      
      The patch exports the maximal allowed frozen times through debugfs
      entry (/sys/kernel/debug/powerpc/eeh_max_freezes).
      Requested-by: default avatarRyan Grimm <grimm@linux.vnet.ibm.com>
      Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      1b28f170