1. 03 Feb, 2013 1 commit
  2. 01 Oct, 2012 1 commit
  3. 01 Jun, 2012 1 commit
  4. 22 May, 2012 2 commits
  5. 28 Mar, 2012 1 commit
  6. 07 Mar, 2012 1 commit
    • Matt Fleming's avatar
      powerpc: Use set_current_blocked() and block_sigmask() · a2007ce8
      Matt Fleming authored
      As described in e6fa16ab ("signal: sigprocmask() should do
      retarget_shared_pending()") the modification of current->blocked is
      incorrect as we need to check whether the signal we're about to block
      is pending in the shared queue.
      
      Also, use the new helper function introduced in commit 5e6292c0
      
      
      ("signal: add block_sigmask() for adding sigmask to current->blocked")
      which centralises the code for updating current->blocked after
      successfully delivering a signal and reduces the amount of duplicate
      code across architectures. In the past some architectures got this
      code wrong, so using this helper function should stop that from
      happening again.
      
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a2007ce8
  7. 17 Nov, 2011 1 commit
  8. 29 Jun, 2011 1 commit
  9. 22 Sep, 2010 1 commit
  10. 17 Feb, 2010 2 commits
    • Dave Kleikamp's avatar
      powerpc/booke: Add support for advanced debug registers · 3bffb652
      Dave Kleikamp authored
      
      
      powerpc/booke: Add support for advanced debug registers
      
      From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      
      Based on patches originally written by Torez Smith.
      
      This patch defines context switch and trap related functionality
      for BookE specific Debug Registers. It adds support to ptrace()
      for setting and getting BookE related Debug Registers
      Signed-off-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Torez Smith  <lnxtorez@linux.vnet.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: David Gibson <dwg@au1.ibm.com>
      Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Sergio Durigan Junior <sergiodj@br.ibm.com>
      Cc: Thiago Jung Bauermann <bauerman@br.ibm.com>
      Cc: linuxppc-dev list <Linuxppc-dev@ozlabs.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3bffb652
    • Dave Kleikamp's avatar
      powerpc/booke: Introduce new CONFIG options for advanced debug registers · 172ae2e7
      Dave Kleikamp authored
      
      
      powerpc/booke: Introduce new CONFIG options for advanced debug registers
      
      From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      
      Introduce new config options to simplify the ifdefs pertaining to the
      advanced debug registers for booke and 40x processors:
      
      CONFIG_PPC_ADV_DEBUG_REGS - boolean: true for dac-based processors
      CONFIG_PPC_ADV_DEBUG_IACS - number of IAC registers
      CONFIG_PPC_ADV_DEBUG_DACS - number of DAC registers
      CONFIG_PPC_ADV_DEBUG_DVCS - number of DVC registers
      CONFIG_PPC_ADV_DEBUG_DAC_RANGE - DAC ranges supported
      
      Beginning conservatively, since I only have the facilities to test 440
      hardware.  I believe all 40x and booke platforms support at least 2 IAC
      and 2 DAC registers.  For 440, 4 IAC and 2 DVC registers are enabled, as
      well as the DAC ranges.
      Signed-off-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Acked-by: default avatarDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      172ae2e7
  11. 27 Mar, 2009 1 commit
    • Josh Boyer's avatar
      powerpc: Sanitize stack pointer in signal handling code · efbda860
      Josh Boyer authored
      
      
      On powerpc64 machines running 32-bit userspace, we can get garbage bits in the
      stack pointer passed into the kernel.  Most places handle this correctly, but
      the signal handling code uses the passed value directly for allocating signal
      stack frames.
      
      This fixes the issue by introducing a get_clean_sp function that returns a
      sanitized stack pointer.  For 32-bit tasks on a 64-bit kernel, the stack
      pointer is masked correctly.  In all other cases, the stack pointer is simply
      returned.
      
      Additionally, we pass an 'is_32' parameter to get_sigframe now in order to
      get the properly sanitized stack.  The callers are know to be 32 or 64-bit
      statically.
      Signed-off-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      efbda860
  12. 11 Nov, 2008 1 commit
  13. 31 Oct, 2008 1 commit
    • Michael Neuling's avatar
      powerpc: Fix swapcontext system for VSX + old ucontext size · 16c29d18
      Michael Neuling authored
      
      
      Since VSX support was added, we now have two sizes of ucontext_t;
      the older, smaller size without the extra VSX state, and the new
      larger size with the extra VSX state.  A program using the
      sys_swapcontext system call and supplying smaller ucontext_t
      structures will currently get an EINVAL error if the task has
      used VSX (e.g. because of calling library code that uses VSX) and
      the old_ctx argument is non-NULL (i.e. the program is asking for
      its current context to be saved).  Thus the program will start
      getting EINVAL errors on calls that previously worked.
      
      This commit changes this behaviour so that we don't send an EINVAL in
      this case.  It will now return the smaller context but the VSX MSR bit
      will always be cleared to indicate that the ucontext_t doesn't include
      the extra VSX state, even if the task has executed VSX instructions.
      
      Both 32 and 64 bit cases are updated.
      
      [paulus@samba.org - also fix some access_ok() and get_user() calls]
      
      Thanks to Ben Herrenschmidt for noticing this problem.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      16c29d18
  14. 15 Jul, 2008 1 commit
  15. 09 Jul, 2008 1 commit
  16. 03 Jul, 2008 1 commit
  17. 01 Jul, 2008 3 commits
    • Michael Neuling's avatar
      powerpc: Add VSX context save/restore, ptrace and signal support · ce48b210
      Michael Neuling authored
      
      
      This patch extends the floating point save and restore code to use the
      VSX load/stores when VSX is available.  This will make FP context
      save/restore marginally slower on FP only code, when VSX is available,
      as it has to load/store 128bits rather than just 64bits.
      
      Mixing FP, VMX and VSX code will get constant architected state.
      
      The signals interface is extended to enable access to VSR 0-31
      doubleword 1 after discussions with tool chain maintainers.  Backward
      compatibility is maintained.
      
      The ptrace interface is also extended to allow access to VSR 0-31 full
      registers.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      ce48b210
    • Michael Neuling's avatar
      powerpc: Introduce VSX thread_struct and CONFIG_VSX · c6e6771b
      Michael Neuling authored
      
      
      The layout of the new VSR registers and how they overlap on top of the
      legacy FPR and VR registers is:
      
                         VSR doubleword 0               VSR doubleword 1
                ----------------------------------------------------------------
        VSR[0]  |             FPR[0]            |                              |
                ----------------------------------------------------------------
        VSR[1]  |             FPR[1]            |                              |
                ----------------------------------------------------------------
                |              ...              |                              |
                |              ...              |                              |
                ----------------------------------------------------------------
        VSR[30] |             FPR[30]           |                              |
                ----------------------------------------------------------------
        VSR[31] |             FPR[31]           |                              |
                ----------------------------------------------------------------
        VSR[32] |                             VR[0]                            |
                ----------------------------------------------------------------
        VSR[33] |                             VR[1]                            |
                ----------------------------------------------------------------
                |                              ...                             |
                |                              ...                             |
                ----------------------------------------------------------------
        VSR[62] |                             VR[30]                           |
                ----------------------------------------------------------------
        VSR[63] |                             VR[31]                           |
                ----------------------------------------------------------------
      
      VSX has 64 128bit registers.  The first 32 regs overlap with the FP
      registers and hence extend them with and additional 64 bits.  The
      second 32 regs overlap with the VMX registers.
      
      This commit introduces the thread_struct changes required to reflect
      this register layout.  Ptrace and signals code is updated so that the
      floating point registers are correctly accessed from the thread_struct
      when CONFIG_VSX is enabled.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      c6e6771b
    • Michael Neuling's avatar
      powerpc: Fix MSR setting in 32 bit signal code · 9e751186
      Michael Neuling authored
      
      
      If we set the SPE MSR bit in save_user_regs we can blow away the VEC
      bit.  This doesn't matter in reality as they are in fact the same bit
      but looks bad.
      
      Also, when we add VSX in a later patch, we need to be able to set two
      separate MSR bits here.
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      9e751186
  18. 14 May, 2008 1 commit
  19. 20 Apr, 2008 1 commit
  20. 20 Dec, 2007 1 commit
  21. 12 Oct, 2007 1 commit
  22. 14 Jun, 2007 5 commits
  23. 08 May, 2007 1 commit
  24. 20 Dec, 2006 1 commit
    • Paul Mackerras's avatar
      [POWERPC] Fix register save area alignment for swapcontext syscall · 1c9bb1a0
      Paul Mackerras authored
      
      
      For 32-bit processes, the getcontext side of the swapcontext system
      call (i.e. the saving of the context when the first argument is
      non-NULL) has to set the ctx->uc_mcontext.uc_regs pointer to the place
      where it saves the registers.  Which it does, but it doesn't ensure
      that the pointer is 16-byte aligned.  16-byte alignment is needed
      because the Altivec/VMX registers are saved in there, and they need to
      be on a 16-byte boundary.
      
      This fixes it by ensuring the appropriate alignment of the pointer.
      This issue was pointed out by Jakub Jelinek.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      1c9bb1a0
  25. 07 Dec, 2006 1 commit
  26. 30 Jun, 2006 1 commit
  27. 09 Jun, 2006 3 commits
    • Paul Mackerras's avatar
      [PATCH] powerpc: Implement support for setting little-endian mode via prctl · fab5db97
      Paul Mackerras authored
      
      
      This adds the PowerPC part of the code to allow processes to change
      their endian mode via prctl.
      
      This also extends the alignment exception handler to be able to fix up
      alignment exceptions that occur in little-endian mode, both for
      "PowerPC" little-endian and true little-endian.
      
      We always enter signal handlers in big-endian mode -- the support for
      little-endian mode does not amount to the creation of a little-endian
      user/kernel ABI.  If the signal handler returns, the endian mode is
      restored to what it was when the signal was delivered.
      
      We have two new kernel CPU feature bits, one for PPC little-endian and
      one for true little-endian.  Most of the classic 32-bit processors
      support PPC little-endian, and this is reflected in the CPU feature
      table.  There are two corresponding feature bits reported to userland
      in the AT_HWCAP aux vector entry.
      
      This is based on an earlier patch by Anton Blanchard.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      fab5db97
    • Benjamin Herrenschmidt's avatar
      [PATCH] powerpc vdso updates · a5bba930
      Benjamin Herrenschmidt authored
      
      
      This patch cleans up some locking & error handling in the ppc vdso and
      moves the vdso base pointer from the thread struct to the mm context
      where it more logically belongs. It brings the powerpc implementation
      closer to Ingo's new x86 one and also adds an arch_vma_name() function
      allowing to print [vsdo] in /proc/<pid>/maps if Ingo's x86 vdso patch is
      also applied.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      a5bba930
    • Paul Mackerras's avatar
      powerpc: Fix machine check problem on 32-bit kernels · 7c85d1f9
      Paul Mackerras authored
      
      
      This fixes a bug found by Dave Jones that means that it is possible
      for userspace to provoke a machine check on 32-bit kernels.  This
      also fixes a couple of other places where I found similar problems
      by inspection.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      7c85d1f9
  28. 27 Mar, 2006 1 commit
  29. 08 Mar, 2006 1 commit
    • Paul Mackerras's avatar
      powerpc: Fix various syscall/signal/swapcontext bugs · 1bd79336
      Paul Mackerras authored
      
      
      A careful reading of the recent changes to the system call entry/exit
      paths revealed several problems, plus some things that could be
      simplified and improved:
      
      * 32-bit wasn't testing the _TIF_NOERROR bit in the syscall fast exit
        path, so it was only doing anything with it once it saw some other
        bit being set.  In other words, the noerror behaviour would apply to
        the next system call where we had to reschedule or deliver a signal,
        which is not necessarily the current system call.
      
      * 32-bit wasn't doing the call to ptrace_notify in the syscall exit
        path when the _TIF_SINGLESTEP bit was set.
      
      * _TIF_RESTOREALL was in both _TIF_USER_WORK_MASK and
        _TIF_PERSYSCALL_MASK, which is odd since _TIF_RESTOREALL is only set
        by system calls.  I took it out of _TIF_USER_WORK_MASK.
      
      * On 64-bit, _TIF_RESTOREALL wasn't causing the non-volatile registers
        to be restored (unless perhaps a signal was delivered or the syscall
        was traced or single-stepped).  Thus the non-volatile registers
        weren't restored on exit from a signal handler.  We probably got
        away with it mostly because signal handlers written in C wouldn't
        alter the non-volatile registers.
      
      * On 32-bit I simplified the code and made it more like 64-bit by
        making the syscall exit path jump to ret_from_except to handle
        preemption and signal delivery.
      
      * 32-bit was calling do_signal unnecessarily when _TIF_RESTOREALL was
        set - but I think because of that 32-bit was actually restoring the
        non-volatile registers on exit from a signal handler.
      
      * I changed the order of enabling interrupts and saving the
        non-volatile registers before calling do_syscall_trace_leave; now we
        enable interrupts first.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      1bd79336
  30. 08 Feb, 2006 1 commit