1. 01 7月, 2008 4 次提交
    • M
      powerpc: Update for VSX core file and ptrace · f3e909c2
      Michael Neuling 提交于
      This correctly hooks the VSX dump into Roland McGrath core file
      infrastructure.  It adds the VSX dump information as an additional elf
      note in the core file (after talking more to the tool chain/gdb guys).
      This also ensures the formats are consistent between signals, ptrace
      and core files.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f3e909c2
    • E
      powerpc: Keep 3 high personality bytes across exec · a91a03ee
      Eric B Munson 提交于
      Currently when a 32 bit process is exec'd on a powerpc 64 bit host the
      value in the top three bytes of the personality is clobbered.  patch
      adds a check in the SET_PERSONALITY macro that will carry all the
      values in the top three bytes across the exec.
      
      These three bytes currently carry flags to disable address randomisation,
      limit the address space, force zeroing of an mmapped page, etc.  Should an
      application set any of these bits they will be maintained and honoured on
      homogeneous environment but discarded and ignored on a heterogeneous
      environment.  So if an application requires all mmapped pages to be initialised
      to zero and a wrapper is used to setup the personality and exec the target,
      these flags will remain set on an all 32 or all 64 bit envrionment, but they
      will be lost in the exec on a mixed 32/64 bit environment.  Losing these bits
      means that the same application would behave differently in different
      environments.  Tested on a POWER5+ machine with 64bit kernel and a mixed
      64/32 bit user space.
      Signed-off-by: NEric B Munson <ebmunson@us.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a91a03ee
    • M
      powerpc: Add VSX context save/restore, ptrace and signal support · ce48b210
      Michael Neuling 提交于
      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: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ce48b210
    • A
      powerpc: asm/elf.h: Reduce userspace header · 178f8d78
      Adrian Bunk 提交于
      This makes asm/elf.h export less non-userspace stuff to userspace.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      178f8d78
  2. 07 2月, 2008 2 次提交
  3. 17 10月, 2007 3 次提交
  4. 19 9月, 2007 1 次提交
    • M
      [POWERPC] spufs: Cleanup ELF coredump extra notes logic · e5501492
      Michael Ellerman 提交于
      To start with, arch_notes_size() etc. is a little too ambiguous a name for
      my liking, so change the function names to be more explicit.
      
      Calling through macros is ugly, especially with hidden parameters, so don't
      do that, call the routines directly.
      
      Use ARCH_HAVE_EXTRA_ELF_NOTES as the only flag, and based on it decide
      whether we want the extern declarations or the empty versions.
      
      Since we have empty routines, actually use them in the coredump code to
      save a few #ifdefs.
      
      We want to change the handling of foffset so that the write routine updates
      foffset as it goes, instead of using file->f_pos (so that writing to a pipe
      works).  So pass foffset to the write routine, and for now just set it to
      file->f_pos at the end of writing.
      
      It should also be possible for the write routine to fail, so change it to
      return int and treat a non-zero return as failure.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e5501492
  5. 24 1月, 2007 1 次提交
    • A
      [POWERPC] Move ELF_ET_DYN_BASE up to 512MB point · 7e60d1b4
      Anton Blanchard 提交于
      I often test new versions of glibc by doing:
      
      LD_LIBRARY_PATH=/XXX/lib /XXX/lib/ld.so.1 <binary>
      
      One test case ended up SEGV'ing. Upon closer inspection ld.so was loaded
      at 0x8000000 (128MB) with the heap right after it. Since we normally
      link binaries at 0x10000000 (256MB) we only had about 128MB of space for
      the heap:
      
      00100000-00103000 r-xp 00100000 00:00 0           [vdso]
      08000000-0801e000 r-xp 00000000 00:01 33079       /lib/ld-2.5.so
      0802d000-0802f000 rwxp 0001d000 00:01 33079       /lib/ld-2.5.so
      0802f000-08050000 rwxp 0802f000 00:00 0           [heap]
      0fe91000-0ffd9000 r-xp 00000000 00:01 33082       /lib/libc-2.5.so
      0ffd9000-0ffe8000 ---p 00148000 00:01 33082       /lib/libc-2.5.so
      0ffe8000-0ffea000 r--p 00147000 00:01 33082       /lib/libc-2.5.so
      0ffea000-0ffed000 rwxp 00149000 00:01 33082       /lib/libc-2.5.so
      10000000-10004000 r-xp 00000000 00:01 76          /bin/sleep
      10013000-10014000 rwxp 00003000 00:01 76          /bin/sleep
      ffb41000-ffb56000 rw-p ffb41000 00:00 0           [stack]
      
      One way to fix this is move ELF_ET_DYN_BASE from 0x08000000 to 0x20000000.
      This allows 128MB for the binary (hopefully enough for even the most
      crazy c++ apps), and with our current layout we will grow the heap up
      and the stack down, allowing potentially gigabytes of heap:
      
      00100000-00103000 r-xp 00100000 00:00 0           [vdso]
      0fe8a000-0ffd3000 r-xp 00000000 00:01 3350        /lib/tls/libc-2.3.6.so
      0ffd3000-0ffe3000 ---p 00149000 00:01 3350        /lib/tls/libc-2.3.6.so
      0ffe3000-0ffea000 r--p 00149000 00:01 3350        /lib/tls/libc-2.3.6.so
      0ffea000-0ffee000 rwxp 00150000 00:01 3350        /lib/tls/libc-2.3.6.so
      10000000-10004000 r-xp 00000000 00:01 76          /bin/sleep
      10013000-10014000 rwxp 00003000 00:01 76          /bin/sleep
      20000000-20018000 r-xp 00000000 00:01 3478        /lib/ld-2.3.6.so
      20028000-20029000 r--p 00018000 00:01 3478        /lib/ld-2.3.6.so
      20029000-2002a000 rwxp 00019000 00:01 3478        /lib/ld-2.3.6.so
      2002a000-2004b000 rwxp 2002a000 00:00 0           [heap]
      ffd67000-ffd7c000 rw-p ffd67000 00:00 0           [stack]
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7e60d1b4
  6. 08 12月, 2006 1 次提交
  7. 04 12月, 2006 2 次提交
    • A
      [POWERPC] cell: fix building without spufs · e055595d
      Arnd Bergmann 提交于
      It may be desireable to build a kernel for cell without
      spufs, e.g. as the initial kboot kernel. This requires
      that the SPU specific parts of the core dump and the xmon
      code depend on CONFIG_SPU_BASE instead of CONFIG_PPC_CELL.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      e055595d
    • D
      [POWERPC] coredump: Add SPU elf notes to coredump. · bf1ab978
      Dwayne Grant McConnell 提交于
      This patch adds SPU elf notes to the coredump. It creates a separate note
      for each of /regs, /fpcr, /lslr, /decr, /decr_status, /mem, /signal1,
      /signal1_type, /signal2, /signal2_type, /event_mask, /event_status,
      /mbox_info, /ibox_info, /wbox_info, /dma_info, /proxydma_info, /object-id.
      
      A new macro, ARCH_HAVE_EXTRA_NOTES, was created for architectures to
      specify they have extra elf core notes.
      
      A new macro, ELF_CORE_EXTRA_NOTES_SIZE, was created so the size of the
      additional notes could be calculated and added to the notes phdr entry.
      
      A new macro, ELF_CORE_WRITE_EXTRA_NOTES, was created so the new notes
      would be written after the existing notes.
      
      The SPU coredump code resides in spufs. Stub functions are provided in the
      kernel which are hooked into the spufs code which does the actual work via
      register_arch_coredump_calls().
      
      A new set of __spufs_<file>_read/get() functions was provided to allow the
      coredump code to read from the spufs files without having to lock the
      SPU context for each file read from.
      
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NDwayne Grant McConnell <decimal@us.ibm.com>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      bf1ab978
  8. 09 6月, 2006 1 次提交
  9. 04 5月, 2006 1 次提交
  10. 25 4月, 2006 1 次提交
  11. 14 1月, 2006 1 次提交
    • P
      powerpc: Provide a suitable AT_PLATFORM value · 80f15dc7
      Paul Mackerras 提交于
      The glibc folks want to use AT_PLATFORM to select between possible
      alternative versions of shared libraries.  This commit makes the kernel
      supply an AT_PLATFORM string that indicates what class of processor
      we are running on.  Processors with the same set of user-level
      instructions and roughly the same instruction scheduling characteristics
      are given the same AT_PLATFORM value; for example, 821, 823 and 860
      are all reported as "ppc823", and 7447, 7447A, 7448, 7450, 7451, 7455
      are all called "ppc7450".
      
      The intention is that the AT_PLATFORM values match the values that
      gcc accepts for the -mcpu= option.  For values which are numeric
      (e.g. -mcpu=750), "ppc" has been prepended.
      
      This also adds a PPC_FEATURE_BOOKE bit to the AT_HWCAP value and sets
      it for the 440 family and the Freescale 85xx family.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      80f15dc7
  12. 11 1月, 2006 1 次提交
  13. 09 1月, 2006 1 次提交
  14. 11 11月, 2005 1 次提交
    • B
      [PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel · a7f290da
      Benjamin Herrenschmidt 提交于
      This patch moves the vdso's to arch/powerpc, adds support for the 32
      bits vdso to the 32 bits kernel, rename systemcfg (finally !), and adds
      some new (still untested) routines to both vdso's: clock_gettime() with
      support for CLOCK_REALTIME and CLOCK_MONOTONIC, clock_getres() (same
      clocks) and get_tbfreq() for glibc to retreive the timebase frequency.
      
      Tom,Steve: The implementation of get_tbfreq() I've done for 32 bits
      returns a long long (r3, r4) not a long. This is such that if we ever
      add support for >4Ghz timebases on ppc32, the userland interface won't
      have to change.
      
      I have tested gettimeofday() using some glibc patches in both ppc32 and
      ppc64 kernels using 32 bits userland (I haven't had a chance to test a
      64 bits userland yet, but the implementation didn't change and was
      tested earlier). I haven't tested yet the new functions.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a7f290da
  15. 07 11月, 2005 1 次提交
  16. 04 11月, 2005 1 次提交
    • M
      powerpc: Fix random memory corruption in merged elf.h · 30415f6a
      Michael Ellerman 提交于
      The merged verison of ELF_CORE_COPY_REGS is basically the PPC64 version, with
      a memset that came from PPC and a few types abstracted out into #defines. But
      it's not _quite_ right.
      
      The first problem is we calculate the number of registers with:
              nregs = sizeof(struct pt_regs) / sizeof(ELF_GREG_TYPE)
      
      For a 32-bit process on a 64-bit kernel that's bogus because the registers are
      64 bits, but ELF_GREG_TYPE is u32, so nregs == 88 which is wrong.
      
      The other problem is the memset, which assumes a struct pt_regs is smaller
      than a struct elf_regs. For a 32-bit process on a 64-bit kernel that's false.
      
      The fix is to calculate the number of regs using sizeof(unsigned long), which
      should always be right, and just memset the whole damn thing _before_ copying
      the registers in.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      30415f6a
  17. 10 10月, 2005 1 次提交
  18. 28 9月, 2005 1 次提交
  19. 21 9月, 2005 2 次提交
  20. 08 9月, 2005 1 次提交
    • H
      [PATCH] auxiliary vector cleanups · 36d57ac4
      H. J. Lu 提交于
      The size of auxiliary vector is fixed at 42 in linux/sched.h.  But it isn't
      very obvious when looking at linux/elf.h.  This patch adds AT_VECTOR_SIZE
      so that we can change it if necessary when a new vector is added.
      
      Because of include file ordering problems, doing this necessitated the
      extraction of the AT_* symbols into a standalone header file.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      36d57ac4
  21. 09 6月, 2005 1 次提交
    • P
      [PATCH] ppc64: Fix PER_LINUX32 behaviour · ce10d979
      Paul Mackerras 提交于
      This patch fixes some bugs in the ppc64 PER_LINUX32 implementation,
      noted by Juergen Kreileder:
      
      * uname(2) doesn't respect PER_LINUX32, it returns 'ppc64' instead of 'ppc'
      * Child processes of a PER_LINUX32 process don't inherit PER_LINUX32
      
      Along the way I took the opportunity to move things around so that
      sys_ppc32.c only has 32-bit syscall emulation functions and to remove
      the obsolete "fakeppc" command line option.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ce10d979
  22. 01 5月, 2005 1 次提交
    • A
      [PATCH] ppc64: noexec fixes · a2f95a5a
      Anton Blanchard 提交于
      There were a few issues with the ppc64 noexec support:
      
      The 64bit ABI has a non executable stack by default.  At the moment 64bit apps
      require a PT_GNU_STACK section in order to have a non executable stack.
      
      Disable the read implies exec workaround on the 64bit ABI.  The 64bit
      toolchain has never had problems with incorrect mmap permissions (the 32bit
      has, thats why we need to retain the workaround).
      
      With these fixes as well as a gcc fix from Alan Modra (that was recently
      committed) 64bit apps work as expected.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a2f95a5a
  23. 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