1. 11 11月, 2015 1 次提交
    • A
      MIPS: Initial implementation of a VDSO · ebb5e78c
      Alex Smith 提交于
      Add an initial implementation of a proper (i.e. an ELF shared library)
      VDSO. With this commit it does not export any symbols, it only replaces
      the current signal return trampoline page. A later commit will add user
      implementations of gettimeofday()/clock_gettime().
      
      To support both new toolchains and old ones which don't generate ABI
      flags section, we define its content manually and then use a tool
      (genvdso) to patch up the section to have the correct name and type.
      genvdso also extracts symbol offsets ({,rt_}sigreturn) needed by the
      kernel, and generates a C file containing a "struct mips_vdso_image"
      containing both the VDSO data and these offsets. This C file is
      compiled into the kernel.
      
      On 64-bit kernels we require a different VDSO for each supported ABI,
      so we may build up to 3 different VDSOs. The VDSO to use is selected by
      the mips_abi structure.
      
      A kernel/user shared data page is created and mapped below the VDSO
      image. This is currently empty, but will be used by the user time
      function implementations which are added later.
      
      [markos.chandras@imgtec.com:
      - Add more comments
      - Move abi detection in genvdso.h since it's the get_symbol function
      that needs it.
      - Add an R6 specific way to calculate the base address of VDSO in order
      to avoid the branch instruction which affects performance.
      - Do not patch .gnu.attributes since it's not needed for dynamic linking.
      - Simplify Makefile a little bit.
      - checkpatch fixes
      - Restrict VDSO support for binutils < 2.25 for pre-R6
      - Include atomic64.h for O32 variant on MIPS64]
      Signed-off-by: NAlex Smith <alex.smith@imgtec.com>
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: Matthew Fortune <matthew.fortune@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11337/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ebb5e78c
  2. 03 9月, 2015 1 次提交
    • P
      MIPS: AT_HWCAP aux vector infrastructure · e14f1db7
      Paul Burton 提交于
      In order for userland to determine whether various features are safe to
      use, it will need to know both that the hardware supports those features
      and that the kernel is recent enough & configured appropriately to
      support them. For example under the O32 modeless FP proposal the dynamic
      linker & ifunc resolvers will need this information.  The kernel is the
      only thing in a position to know availability accurately, so the kernel
      needs to provide the information to userland. This patch introduces the
      infrastructure to provide the AT_HWCAP aux vector to userland in order
      to provide that information. It also defines the 2 currently specified
      flags, which indicate MIPSr6 & MSA support.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Matthew Fortune <matthew.fortune@imgtec.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Alex Smith <alex@alex-smith.me.uk>
      Cc: linux-kernel@vger.kernel.org
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Patchwork: https://patchwork.linux-mips.org/patch/10797/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e14f1db7
  3. 13 5月, 2015 1 次提交
  4. 15 4月, 2015 1 次提交
    • K
      mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE · 204db6ed
      Kees Cook 提交于
      The arch_randomize_brk() function is used on several architectures,
      even those that don't support ET_DYN ASLR. To avoid bulky extern/#define
      tricks, consolidate the support under CONFIG_ARCH_HAS_ELF_RANDOMIZE for
      the architectures that support it, while still handling CONFIG_COMPAT_BRK.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Hector Marco-Gisbert <hecmargi@upv.es>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NIngo Molnar <mingo@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: "David A. Long" <dave.long@linaro.org>
      Cc: Andrey Ryabinin <a.ryabinin@samsung.com>
      Cc: Arun Chandran <achandran@mvista.com>
      Cc: Yann Droneaud <ydroneaud@opteya.com>
      Cc: Min-Hua Chen <orca.chen@gmail.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Alex Smith <alex@alex-smith.me.uk>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Vineeth Vijayan <vvijayan@mvista.com>
      Cc: Jeff Bailey <jeffbailey@google.com>
      Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Behan Webster <behanw@converseincode.com>
      Cc: Ismael Ripoll <iripoll@upv.es>
      Cc: Jan-Simon Mller <dl9pf@gmx.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      204db6ed
  5. 10 4月, 2015 1 次提交
  6. 08 4月, 2015 1 次提交
  7. 17 2月, 2015 1 次提交
    • M
      MIPS: kernel: elf: Improve the overall ABI and FPU mode checks · 46490b57
      Markos Chandras 提交于
      The previous implementation did not cover all possible FPU combinations
      and it silently allowed ABI incompatible objects to be loaded with the
      wrong ABI. For example, the previous logic would set the FP_64 ABI as
      the matching ABI for an FP_XX object combined with an FP_64A object.
      This was wrong, and the matching ABI should have been FP_64A.
      The previous logic is now replaced with a new one which determines
      the appropriate FPU mode to be used rather than the FP ABI. This has
      the advantage that the entire logic is much simpler since it is the FPU
      mode we are interested in rather than the FP ABI resulting to code
      simplifications. This also removes the now obsolete FP32XX_HYBRID_FPRS
      option.
      
      Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      46490b57
  8. 24 11月, 2014 3 次提交
    • P
      MIPS: ELF: Set FP mode according to .MIPS.abiflags · 90cee759
      Paul Burton 提交于
      This patch reads the .MIPS.abiflags section when it is present, and sets
      the FP mode of the task accordingly. Any loaded ELF files which do not
      contain a .MIPS.abiflags section will continue to observe the previous
      behaviour, that is FR=1 if EF_MIPS_FP64 is set else FR=0.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: linux-fsdevel@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/7681/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      90cee759
    • P
      MIPS: ELF: Add definition for the .MIPS.abiflags section · 6cd96229
      Paul Burton 提交于
      New toolchains will generate a .MIPS.abiflags section, referenced by a
      new PT_MIPS_ABIFLAGS program header. This section will provide
      information about the requirements of the ELF, including the ISA level
      the code is built for, the ASEs it requires, the size of various
      registers and its expectations of the floating point mode. This patch
      introduces a definition of the structure of this section and the program
      header, for use in a subsequent patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: linux-fsdevel@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/7682/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      6cd96229
    • P
      MIPS: Support for hybrid FPRs · 4227a2d4
      Paul Burton 提交于
      Hybrid FPRs is a scheme where scalar FP registers are 64b wide, but
      accesses to odd indexed single registers use bits 63:32 of the
      preceeding even indexed 64b register. In this mode all FP code
      except that built for the plain FP64 ABI can execute correctly. Most
      notably a combination of FP64A & FP32 code can execute correctly,
      allowing for existing FP32 binaries to be linked with new FP64A binaries
      that can make use of 64 bit FP & MSA.
      
      Hybrid FPRs are implemented by setting both the FR & FRE bits, trapping
      & emulating single precision FP instructions (via Reserved Instruction
      exceptions) whilst allowing others to execute natively. It therefore has
      a penalty in terms of execution speed, and should only be used when no
      fully native mode can be. As more binaries are recompiled to use either
      the FPXX or FP64(A) ABIs, the need for hybrid FPRs should diminish.
      However in the short to mid term it allows for a gradual transition
      towards that world, rather than a complete ABI break which is not
      feasible for some users & not desirable for many.
      
      A task will be executed using the hybrid FPR scheme when its
      TIF_HYBRID_FPREGS flag is set & TIF_32BIT_FPREGS is clear. A further
      patch will set the flags as necessary, this patch simply adds the
      infrastructure necessary for the hybrid FPR mode to work.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: linux-fsdevel@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/7683/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      4227a2d4
  9. 02 8月, 2014 1 次提交
  10. 14 1月, 2014 1 次提交
    • P
      MIPS: Support for 64-bit FP with O32 binaries · 597ce172
      Paul Burton 提交于
      CPUs implementing MIPS32 R2 may include a 64-bit FPU, just as MIPS64 CPUs
      do. In order to preserve backwards compatibility a 64-bit FPU will act
      like a 32-bit FPU (by accessing doubles from the least significant 32
      bits of an even-odd pair of FP registers) when the Status.FR bit is
      zero, again just like a mips64 CPU. The standard O32 ABI is defined
      expecting a 32-bit FPU, however recent toolchains support use of a
      64-bit FPU from an O32 MIPS32 executable. When an ELF executable is
      built to use a 64-bit FPU a new flag (EF_MIPS_FP64) is set in the ELF
      header.
      
      With this patch the kernel will check the EF_MIPS_FP64 flag when
      executing an O32 binary, and set Status.FR accordingly. The addition
      of O32 64-bit FP support lessens the opportunity for optimisation in
      the FPU emulator, so a CONFIG_MIPS_O32_FP64_SUPPORT Kconfig option is
      introduced to allow this support to be disabled for those that don't
      require it.
      
      Inspired by an earlier patch by Leonid Yegoshin, but implemented more
      cleanly & correctly.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Paul Burton <paul.burton@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/6154/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      597ce172
  11. 30 10月, 2013 1 次提交
  12. 01 2月, 2013 1 次提交
  13. 17 12月, 2010 1 次提交
  14. 05 8月, 2010 1 次提交
  15. 13 4月, 2010 2 次提交
    • D
      MIPS: Preliminary VDSO · c52d0d30
      David Daney 提交于
      This is a preliminary patch to add a vdso to all user processes.  Still
      missing are ELF headers and .eh_frame information.  But it is enough to
      allow us to move signal trampolines off of the stack.  Note that emulation
      of branch delay slots in the FPU emulator still requires the stack.
      
      We allocate a single page (the vdso) and write all possible signal
      trampolines into it.  The stack is moved down by one page and the vdso is
      mapped into this space.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      To: linux-mips@linux-mips.org
      Patchwork: http://patchwork.linux-mips.org/patch/975/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c52d0d30
    • R
      MIPS: Fix elfcore.c build warning · d5d3102b
      Ralf Baechle 提交于
      kernel/elfcore.c includes <linux/elf.h> which includes the <asm/elf.h>.  In
      <asm/elf.h>, struct pt_regs is declared inside the parameter list of the
      elf_dump_regs function which causes a kernel build warning.
      
      Fixed by adding a forward declaration of struct pt_regs.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      d5d3102b
  16. 27 2月, 2010 1 次提交
  17. 16 12月, 2009 1 次提交
  18. 03 7月, 2009 1 次提交
    • Y
      MIPS: 64-bit: Fix o32 core dump · cad9bc69
      Yong Zhang 提交于
      If an o32 process generates a core dump on a 64 bit kernel, the core file
      will not be correctly recognized. This is because ELF_CORE_COPY_REGS and
      ELF_CORE_COPY_TASK_REGS are not correctly defined for o32 and will use
      the default register set which would be CONFIG_64BIT in asm/elf.h.
      
      So we'll switch to use the right register defines in this situation by
      checking for WANT_COMPAT_REG_H and use the right defines of
      ELF_CORE_COPY_REGS and ELF_CORE_COPY_TASK_REGS.
      
      [Ralf: made ELF_CORE_COPY_TASK_REGS() bullet-proof against funny arguments.]
      Signed-off-by: NYong Zhang <yong.zhang@windriver.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cad9bc69
  19. 22 12月, 2008 1 次提交
  20. 16 10月, 2008 1 次提交
  21. 11 10月, 2008 1 次提交
  22. 08 2月, 2008 1 次提交
  23. 12 10月, 2007 1 次提交
  24. 01 8月, 2007 1 次提交
  25. 26 4月, 2006 1 次提交
  26. 19 4月, 2006 1 次提交
  27. 10 1月, 2006 1 次提交
  28. 07 11月, 2005 1 次提交
  29. 30 10月, 2005 5 次提交
  30. 05 9月, 2005 1 次提交
  31. 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