1. 17 Nov, 2011 5 commits
    • Benjamin Herrenschmidt's avatar
      powerpc: Fix atomic_xxx_return barrier semantics · b97021f8
      Benjamin Herrenschmidt authored
      The Documentation/memory-barriers.txt document requires that atomic
      operations that return a value act as a memory barrier both before
      and after the actual atomic operation.
      
      Our current implementation doesn't guarantee this. More specifically,
      while a load following the isync can not be issued before stwcx. has
      completed, that completion doesn't architecturally means that the
      result of stwcx. is visible to other processors (or any previous stores
      for that matter) (typically, the other processors L1 caches can still
      hold the old value).
      
      This has caused an actual crash in RCU torture testing on Power 7
      
      This fixes it by changing those atomic ops to use new macros instead
      of RELEASE/ACQUIRE barriers, called ATOMIC_ENTRY and ATMOIC_EXIT barriers,
      which are then defined respectively to lwsync and sync.
      
      I haven't had a chance to measure the performance impact (or rather
      what I measured with kernel compiles is in the noise, I yet have to
      find a more precise benchmark)
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      b97021f8
    • Kyle Moffett's avatar
      powerpc: Remove buggy 9-year-old test for binutils < 2.12.1 · a9a8f77a
      Kyle Moffett authored
      Recent binutils refuses to assemble AltiVec opcodes when in e500/SPE
      mode, as some of those opcodes alias the "SPE" instructions.  This
      triggers an ancient binutils version check even when building a kernel
      with CONFIG_ALTIVEC disabled.
      
      In theory, the check could be conditionalized on CONFIG_ALTIVEC, but in
      practice it has long outlived its utility.  It is virtually impossible
      to find binutils older than 2.12.1 (released 2002) in the wild anymore.
      Even ancient RedHat Enterprise Linux 4 has binutils-2.14.
      
      To fix the kernel build when done natively on e500 systems with this new
      binutils, the test is simply removed.
      Signed-off-by: default avatarKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a9a8f77a
    • Kumar Gala's avatar
      powerpc/book3e-64: Fix debug support for userspace · 187b9f2a
      Kumar Gala authored
      With the introduction of CONFIG_PPC_ADV_DEBUG_REGS user space debug is
      broken on Book-E 64-bit parts that support delayed debug events.  When
      switch_booke_debug_regs() sets DBCR0 we'll start getting debug events as
      MSR_DE is also set and we aren't able to handle debug events from kernel
      space.
      
      We can remove the hack that always enables MSR_DE and loads up DBCR0 and
      just utilize switch_booke_debug_regs() to get user space debug working
      again.
      
      We still need to handle critical/debug exception stacks & proper
      save/restore of state for those exception levles to support debug events
      from kernel space like we have on 32-bit.
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      187b9f2a
    • Kumar Gala's avatar
      powerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS define · b95bc219
      Kumar Gala authored
      All of DebugException is already protected by CONFIG_PPC_ADV_DEBUG_REGS
      there is no need to have another such ifdef inside the function.
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b95bc219
    • Kumar Gala's avatar
      powerpc: Revert show_regs() define for readability · ba28c9aa
      Kumar Gala authored
      We had an existing ifdef for 4xx & BOOKE processors that got changed to
      CONFIG_PPC_ADV_DEBUG_REGS.  The define has nothing to do with
      CONFIG_PPC_ADV_DEBUG_REGS.  The define really should be:
      
       #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
      
      and not
      
       #ifdef CONFIG_PPC_ADV_DEBUG_REGS
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ba28c9aa
  2. 16 Nov, 2011 11 commits
  3. 15 Nov, 2011 7 commits
  4. 14 Nov, 2011 7 commits
  5. 13 Nov, 2011 1 commit
  6. 12 Nov, 2011 9 commits