1. 11 Apr, 2015 11 commits
  2. 10 Apr, 2015 6 commits
  3. 07 Apr, 2015 7 commits
  4. 01 Apr, 2015 7 commits
  5. 31 Mar, 2015 6 commits
  6. 28 Mar, 2015 3 commits
    • Michael Ellerman's avatar
      selftests/powerpc: Add a test of the switch_endian() syscall · 4cd968ef
      Michael Ellerman authored
      This adds a test of the switch_endian() syscall we added in the previous
      commit.
      
      We test it by calling the endian switch syscall, and then executing some
      code in the other endian to check everything went as expected. That code
      checks registers we expect to be maintained are. If the endian switch
      failed to happen that code sequence will be illegal and cause the test
      to abort.
      
      We then switch back to the original endian, do the same checks and
      finally write a success message and exit(0).
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      4cd968ef
    • Michael Ellerman's avatar
      powerpc: Add a proper syscall for switching endianness · 529d235a
      Michael Ellerman authored
      We currently have a "special" syscall for switching endianness. This is
      syscall number 0x1ebe, which is handled explicitly in the 64-bit syscall
      exception entry.
      
      That has a few problems, firstly the syscall number is outside of the
      usual range, which confuses various tools. For example strace doesn't
      recognise the syscall at all.
      
      Secondly it's handled explicitly as a special case in the syscall
      exception entry, which is complicated enough without it.
      
      As a first step toward removing the special syscall, we need to add a
      regular syscall that implements the same functionality.
      
      The logic is simple, it simply toggles the MSR_LE bit in the userspace
      MSR. This is the same as the special syscall, with the caveat that the
      special syscall clobbers fewer registers.
      
      This version clobbers r9-r12, XER, CTR, and CR0-1,5-7.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      529d235a
    • Tyrel Datwyler's avatar
      powerpc/pseries: Simplify check for suspendability during suspend/migration · c03e7374
      Tyrel Datwyler authored
      During suspend/migration operation we must wait for the VASI state reported
      by the hypervisor to become Suspending prior to making the ibm,suspend-me
      RTAS call. Calling routines to rtas_ibm_supend_me() pass a vasi_state variable
      that exposes the VASI state to the caller. This is unnecessary as the caller
      only really cares about the following three conditions; if there is an error
      we should bailout, success indicating we have suspended and woken back up so
      proceed to device tree update, or we are not suspendable yet so try calling
      rtas_ibm_suspend_me again shortly.
      
      This patch removes the extraneous vasi_state variable and simply uses the
      return code to communicate how to proceed. We either succeed, fail, or get
      -EAGAIN in which case we sleep for a second before trying to call
      rtas_ibm_suspend_me again. The behaviour of ppc_rtas() remains the same,
      but migrate_store() now returns the propogated error code on failure.
      Previously -1 was returned from migrate_store() in the  failure case which
      equates to -EPERM and was clearly wrong.
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Cc: Nathan Fontenont <nfont@linux.vnet.ibm.com>
      Cc: Cyril Bur <cyrilbur@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      c03e7374