1. 05 7月, 2016 1 次提交
    • C
      powerpc: Send SIGBUS on unaligned copy and paste · ae26b36f
      Chris Smart 提交于
      Calling ISA 3.0 instructions copy, copy_first, paste and paste_last
      generates an alignment fault when copying or pasting unaligned
      data (128 byte). We catch this and send SIGBUS to the userspace
      process that caused it.
      
      We do not emulate these because paste may contain additional metadata
      when pasting to a co-processor and paste_last is the synchronisation
      point for preceding copy/paste sequences.
      
      Thanks to Michael Neuling <mikey@neuling.org> for his help.
      Signed-off-by: NChris Smart <chris@distroguy.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ae26b36f
  2. 16 6月, 2016 1 次提交
    • D
      powerpc/align: Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE · a9650e9b
      Daniel Axtens 提交于
      Sparse complains that it doesn't know what REG_BYTE is:
      
        arch/powerpc/kernel/align.c:313:29: error: undefined identifier 'REG_BYTE'
      
      REG_BYTE is defined differently based on whether we're compiling for
      LE, BE32 or BE64. Sparse apparently doesn't provide __BIG_ENDIAN__ or
      __LITTLE_ENDIAN__, which means we get no definition.
      
      Rather than check for __BIG_ENDIAN__ and then separately for
      __LITTLE_ENDIAN__, just switch the #ifdef to check for __BIG_ENDIAN__
      and then #else we define the little endian version. Technically that's
      dicey because PDP_ENDIAN is also a possibility, but we already do it in
      a lot of places so one more hardly matters.
      Signed-off-by: NDaniel Axtens <dja@axtens.net>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a9650e9b
  3. 01 12月, 2015 1 次提交
  4. 10 11月, 2014 1 次提交
  5. 30 5月, 2014 1 次提交
  6. 09 4月, 2014 1 次提交
  7. 30 10月, 2013 2 次提交
  8. 11 10月, 2013 6 次提交
  9. 27 8月, 2013 1 次提交
    • A
      powerpc: Never handle VSX alignment exceptions from kernel · 5c2e0823
      Anton Blanchard 提交于
      The VSX alignment handler needs to write out the existing VSX
      state to memory before operating on it (flush_vsx_to_thread()).
      If we take a VSX alignment exception in the kernel bad things
      will happen. It looks like we could write the kernel state out
      to the user process, or we could handle the kernel exception
      using data from the user process (depending if MSR_VSX is set
      or not).
      
      Worse still, if the code to read or write the VSX state causes an
      alignment exception, we will recurse forever. I ended up with
      hundreds of megabytes of kernel stack to look through as a result.
      
      Floating point and SPE code have similar issues but already include
      a user check. Add the same check to emulate_vsx().
      
      With this patch any unaligned VSX loads and stores in the kernel
      will show up as a clear oops rather than silent corruption of
      kernel or userspace VSX state, or worse, corruption of a potentially
      unlimited amount of kernel memory.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5c2e0823
  10. 14 8月, 2013 1 次提交
    • A
      powerpc: Handle unaligned ldbrx/stdbrx · 230aef7a
      Anton Blanchard 提交于
      Normally when we haven't implemented an alignment handler for
      a load or store instruction the process will be terminated.
      
      The alignment handler uses the DSISR (or a pseudo one) to locate
      the right handler. Unfortunately ldbrx and stdbrx overlap lfs and
      stfs so we incorrectly think ldbrx is an lfs and stdbrx is an
      stfs.
      
      This bug is particularly nasty - instead of terminating the
      process we apply an incorrect fixup and continue on.
      
      With more and more overlapping instructions we should stop
      creating a pseudo DSISR and index using the instruction directly,
      but for now add a special case to catch ldbrx/stdbrx.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      230aef7a
  11. 29 3月, 2012 1 次提交
  12. 02 9月, 2010 1 次提交
  13. 18 12月, 2009 1 次提交
  14. 28 10月, 2009 1 次提交
  15. 21 5月, 2009 1 次提交
  16. 26 2月, 2009 1 次提交
  17. 23 2月, 2009 2 次提交
  18. 13 2月, 2009 1 次提交
  19. 03 9月, 2008 1 次提交
  20. 15 7月, 2008 1 次提交
  21. 09 7月, 2008 1 次提交
  22. 01 7月, 2008 1 次提交
  23. 14 9月, 2007 1 次提交
    • K
      [POWERPC] Handle alignment faults on SPE load/store instructions · 26caeb2e
      Kumar Gala 提交于
      This adds code to handle alignment traps generated by the following
      SPE (signal processing engine) load/store instructions, by emulating
      the instruction in the kernel (as is done for other instructions that
      generate alignment traps):
      
      evldd[x]         Vector Load Double Word into Double Word [Indexed]
      evldw[x]         Vector Load Double into Two Words [Indexed]
      evldh[x]         Vector Load Double into Four Half Words [Indexed]
      evlhhesplat[x]   Vector Load Half Word into Half Words Even and Splat [Indexed]
      evlhhousplat[x]  Vector Load Half Word into Half Word Odd Unsigned and Splat [Indexed]
      evlhhossplat[x]  Vector Load Half Word into Half Word Odd Signed and Splat [Indexed]
      evlwhe[x]        Vector Load Word into Two Half Words Even [Indexed]
      evlwhou[x]       Vector Load Word into Two Half Words Odd Unsigned (zero-extended) [Indexed]
      evlwhos[x]       Vector Load Word into Two Half Words Odd Signed (with sign extension) [Indexed]
      evlwwsplat[x]    Vector Load Word into Word and Splat [Indexed]
      evlwhsplat[x]    Vector Load Word into Two Half Words and Splat [Indexed]
      evstdd[x]        Vector Store Double of Double [Indexed]
      evstdw[x]        Vector Store Double of Two Words [Indexed]
      evstdh[x]        Vector Store Double of Four Half Words [Indexed]
      evstwhe[x]       Vector Store Word of Two Half Words from Even [Indexed]
      evstwho[x]       Vector Store Word of Two Half Words from Odd [Indexed]
      evstwwe[x]       Vector Store Word of Word from Even [Indexed]
      evstwwo[x]       Vector Store Word of Word from Odd [Indexed]
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      26caeb2e
  24. 17 8月, 2007 1 次提交
    • P
      [POWERPC] Handle alignment faults on new FP load/store instructions · c6d4267e
      Paul Mackerras 提交于
      This adds code to handle alignment traps generated by the following
      new floating-point load/store instructions, by emulating the
      instruction in the kernel (as is done for other instructions that
      generate alignment traps):
      
      lfiwax	load floating-point as integer word algebraic indexed
      stfiwx	store floating-point as integer word indexed
      lfdp	load floating-point double pair
      lfdpx	load floating-point double pair indexed
      stfdp	store floating-point double pair
      stfdpx	store floating-point double pair indexed
      
      All these except stfiwx are new in POWER6.
      
      lfdp/lfdpx/stfdp/stfdpx load and store 16 bytes of memory into an
      even/odd FP register pair.  In little-endian mode each 8-byte value is
      byte-reversed separately (i.e. not as a 16-byte unit).  lfiwax/stfiwx
      load or store the lower 4 bytes of a floating-point register from/to
      memory; lfiwax sets the upper 4 bytes of the FP register to the sign
      extension of the value loaded.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c6d4267e
  25. 13 4月, 2007 1 次提交
  26. 09 6月, 2006 1 次提交
    • P
      [PATCH] powerpc: Implement support for setting little-endian mode via prctl · fab5db97
      Paul Mackerras 提交于
      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: NPaul Mackerras <paulus@samba.org>
      fab5db97
  27. 18 11月, 2005 1 次提交
  28. 27 10月, 2005 1 次提交
    • D
      [PATCH] powerpc: Fix handling of fpscr on 64-bit · 25c8a78b
      David Gibson 提交于
      The recent merge of fpu.S broken the handling of fpscr for
      ARCH=powerpc and CONFIG_PPC64=y.  FP registers could be corrupted,
      leading to strange random application crashes.
      
      The confusion arises, because the thread_struct has (and requires) a
      64-bit area to save the fpscr, because we use load/store double
      instructions to get it in to/out of the FPU.  However, only the low
      32-bits are actually used, so we want to treat it as a 32-bit quantity
      when manipulating its bits to avoid extra load/stores on 32-bit.  This
      patch replaces the current definition with a structure of two 32-bit
      quantities (pad and val), to clarify things as much as is possible.
      The 'val' field is used when manipulating bits, the structure itself
      is used when obtaining the address for loading/unloading the value
      from the FPU.
      
      While we're at it, consolidate the 4 (!) almost identical versions of
      cvt_fd() and cvt_df() (arch/ppc/kernel/misc.S,
      arch/ppc64/kernel/misc.S, arch/powerpc/kernel/misc_32.S,
      arch/powerpc/kernel/misc_64.S) into a single version in fpu.S.  The
      new version takes a pointer to thread_struct and applies the correct
      offset itself, rather than a pointer to the fpscr field itself, again
      to avoid confusion as to which is the correct field to use.
      
      Finally, this patch makes ARCH=ppc64 also use the consolidated fpu.S
      code, which it previously did not.
      
      Built for G5 (ARCH=ppc64 and ARCH=powerpc), 32-bit powermac (ARCH=ppc
      and ARCH=powerpc) and Walnut (ARCH=ppc, CONFIG_MATH_EMULATION=y).
      Booted on G5 (ARCH=powerpc) and things which previously fell over no
      longer do.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      25c8a78b
  29. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4