1. 09 Jun, 2009 7 commits
    • Benjamin Herrenschmidt's avatar
      powerpc: Split exception handling out of head_64.S · 0ebc4cda
      Benjamin Herrenschmidt authored
      To prepare for future support of Book3E 64-bit PowerPC processors,
      which use a completely different exception handling, we move that
      code to a new exceptions-64s.S file.
      
      This file is #included from head_64.S due to some of the absolute
      address requirements which can currently only be fulfilled from
      within that file.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0ebc4cda
    • Benjamin Herrenschmidt's avatar
      powerpc: Introduce CONFIG_PPC_BOOK3S · 5b7c3c91
      Benjamin Herrenschmidt authored
      This patch introduce a new Kconfig option, CONFIG_PPC_BOOK3S
      that represents processors that are compliant with the "classic"
      (aka "server") variant of the PowerPC architecture.
      
      It replaces CONFIG_6xx on 32-bit (though the symbol is still
      defined for compatibility) and encompass all currently supported
      64-bit processors.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5b7c3c91
    • Benjamin Herrenschmidt's avatar
      powerpc: Move VMX and VSX asm code to vector.S · e821ea70
      Benjamin Herrenschmidt authored
      Currently, load_up_altivec and give_up_altivec are duplicated
      in 32-bit and 64-bit. This creates a common implementation that
      is moved away from head_32.S, head_64.S and misc_64.S and into
      vector.S, using the same macros we already use for our common
      implementation of load_up_fpu.
      
      I also moved the VSX code over to vector.S though in that case
      I didn't make it build on 32-bit (yet).
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e821ea70
    • Benjamin Herrenschmidt's avatar
      powerpc: Set init_bootmem_done on NUMA platforms as well · d3f6204a
      Benjamin Herrenschmidt authored
      For some obscure reason, we only set init_bootmem_done after initializing
      bootmem when NUMA isn't enabled. We even document this next to the declaration
      of that global in system.h which of course I didn't read before I had to
      debug why some WIP code wasn't working properly...
      
      This patch changes it so that we always set it after bootmem is initialized
      which should have always been the case... go figure !
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d3f6204a
    • Benjamin Herrenschmidt's avatar
      powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock · b46b6942
      Benjamin Herrenschmidt authored
      The MMU context_lock can be taken from switch_mm() while the
      rq->lock is held. The rq->lock can also be taken from interrupts,
      thus if we get interrupted in destroy_context() with the context
      lock held and that interrupt tries to take the rq->lock, there's
      a possible deadlock scenario with another CPU having the rq->lock
      and calling switch_mm() which takes our context lock.
      
      The fix is to always ensure interrupts are off when taking our
      context lock. The switch_mm() path is already good so this fixes
      the destroy_context() path.
      
      While at it, turn the context lock into a new style spinlock.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b46b6942
    • Benjamin Herrenschmidt's avatar
      powerpc/mm: Fix some SMP issues with MMU context handling · 3035c863
      Benjamin Herrenschmidt authored
      This patch fixes a couple of issues that can happen as a result
      of steal_context() dropping the context_lock when all possible
      PIDs are ineligible for stealing (hopefully an extremely hard to
      hit occurence).
      
      This case exposes the possibility of a stale context_mm[] entry
      to be seen since destroy_context() doesn't clear it and the free
      map isn't re-tested. It also means steal_context() will not notice
      a context freed while the lock was help, thus possibly trying to
      steal a context when a free one was available.
      
      This fixes it by always returning to the caller from steal_context
      when it dropped the lock with a return value that causes the
      caller to re-samble the number of free contexts, along with
      properly clearing the context_mm[] array for destroyed contexts.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3035c863
    • Roland McGrath's avatar
      powerpc: Add PTRACE_SINGLEBLOCK support · ec097c84
      Roland McGrath authored
      Reworked by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      
      This adds block-step support on powerpc, including a PTRACE_SINGLEBLOCK
      request for ptrace.
      
      The BookE implementation is tweaked to fire a single step after a
      block step in order to mimmic the server behaviour.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ec097c84
  2. 06 Jun, 2009 5 commits
  3. 02 Jun, 2009 9 commits
  4. 29 May, 2009 1 commit
  5. 27 May, 2009 17 commits
  6. 26 May, 2009 1 commit