1. 17 2月, 2015 28 次提交
  2. 16 2月, 2015 3 次提交
  3. 12 2月, 2015 1 次提交
    • P
      MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS · 9791554b
      Paul Burton 提交于
      Userland code may be built using an ABI which permits linking to objects
      that have more restrictive floating point requirements. For example,
      userland code may be built to target the O32 FPXX ABI. Such code may be
      linked with other FPXX code, or code built for either one of the more
      restrictive FP32 or FP64. When linking with more restrictive code, the
      overall requirement of the process becomes that of the more restrictive
      code. The kernel has no way to know in advance which mode the process
      will need to be executed in, and indeed it may need to change during
      execution. The dynamic loader is the only code which will know the
      overall required mode, and so it needs to have a means to instruct the
      kernel to switch the FP mode of the process.
      
      This patch introduces 2 new options to the prctl syscall which provide
      such a capability. The FP mode of the process is represented as a
      simple bitmask combining a number of mode bits mirroring those present
      in the hardware. Userland can either retrieve the current FP mode of
      the process:
      
        mode = prctl(PR_GET_FP_MODE);
      
      or modify the current FP mode of the process:
      
        err = prctl(PR_SET_FP_MODE, new_mode);
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Matthew Fortune <matthew.fortune@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/8899/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      9791554b
  4. 05 2月, 2015 1 次提交
    • J
      MIPS: cevt-r4k: Drop GIC special case · ae58d882
      James Hogan 提交于
      The cevt-r4k driver used to call into the GIC driver to find whether the
      timer was pending, but only with External Interrupt Controller (EIC)
      mode, where the Cause.IP bits can't be used as they encode the interrupt
      priority level (Cause.RIPL) instead.
      
      However commit e9de688d ("irqchip: mips-gic: Support local
      interrupts") changed the condition from cpu_has_veic to gic_present.
      This fails on cores such as P5600 which have a GIC but the local
      interrupts aren't routable by the GIC, causing c0_compare_int_usable()
      to consider the interrupt unusable so r4k_clockevent_init() fails.
      
      The previous behaviour, added in commit 98b67c37 ("MIPS: Add EIC
      support for GIC."), wasn't really correct either as far as I can tell,
      since P5600 apparently supports EIC mode too, and in any case the use of
      Cause.TI with r2 should have been sufficient anyway since commit
      010c108d ("MIPS: PowerTV: Fix support for timer interrupts with > 64
      external IRQs").
      
      Therefore drop the call into the gic driver altogether, and add a
      comment in c0_compare_int_pending() to clarify that Cause.TI does get
      checked since MIPS r2.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Fixes: e9de688d ("irqchip: mips-gic: Support local interrupts")
      Reviewed-by: NAndrew Bresticker <abrestic@chromium.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Steven J. Hill <steven.hill@imgtec.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9077/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ae58d882
  5. 13 12月, 2014 1 次提交
  6. 25 11月, 2014 1 次提交
  7. 24 11月, 2014 5 次提交
    • P
      MIPS: Enable VDSO randomization · ccd39880
      Prem Karat 提交于
      Based on commit 1091458d (mmap randomization)
      
      For 32-bit address spaces randomize within a
      16MB space, for 64-bit within a 256MB space.
      
      Test Results:
      ------------
      Without Patch (VDSO is not randomized)
      ---------------------------------------
      root@Maleo:~# ./aslr vdso
      FAIL: ASLR not functional (vdso always at 0x7fff7000)
      
      root@Maleo:~# ./aslr rekey vdso
      pre_val==cur_val
      value=0x7fff7000
      
      With patch:(VDSO is randmoized and doesn't interfere with stack)
      ----------------------------------------------------------------
      root@cavium-octeon2:~# ./aslr rekey vdso
      pre_val!=cur_val
      previous_value=0x7f830ea2
      current_value=0x776e2000
      root@cavium-octeon2:~# ./aslr rekey vdso
      pre_val!=cur_val
      previous_value=0x7fb0cea2
      current_value=0x77209000
      root@cavium-octeon2:~# ./aslr rekey vdso
      pre_val!=cur_val
      previous_value=0x7f985ea2
      current_value=0x7770c000
      root@cavium-octeon2:~# ./aslr rekey vdso
      pre_val!=cur_val
      previous_value=0x7fbc6ea2
      current_value=0x7fe25000
      
      Maps file output:
      -------------------------
      root@cavium-octeon2:~# ./aslr rekey maps
      78584000-785a5000 rwxp 00000000 00:00 0                                  [heap]
      7f9d0000-7f9f1000 rw-p 00000000 00:00 0                                  [stack]
      7ffa5000-7ffa6000 r-xp 00000000 00:00 0                                  [vdso]
      
      root@cavium-octeon2:~# ./aslr rekey maps
      77de0000-77e01000 rwxp 00000000 00:00 0                                  [heap]
      7f91b000-7f93c000 rw-p 00000000 00:00 0                                  [stack]
      7ff99000-7ff9a000 r-xp 00000000 00:00 0                                  [vdso]
      
      root@cavium-octeon2:~# ./aslr rekey maps
      77d7f000-77da0000 rwxp 00000000 00:00 0                                  [heap]
      7fc2a000-7fc4b000 rw-p 00000000 00:00 0                                  [stack]
      7fe09000-7fe0a000 r-xp 00000000 00:00 0                                  [vdso]
      
      root@cavium-octeon2:~# ./aslr rekey maps
      7794c000-7794d000 r-xp 00000000 00:00 0                                  [vdso]
      77e4b000-77e6c000 rwxp 00000000 00:00 0                                  [heap]
      7f6e7000-7f708000 rw-p 00000000 00:00 0                                  [stack]
      root@cavium-octeon2:~#
      Signed-off-by: NPrem Karat <pkarat@mvista.com>
      Cc: linux-mips@linux-mips.org
      Cc: sergei.shtylyov@cogentembedded.com
      Cc: ddaney.cavm@gmail.com
      Patchwork: https://patchwork.linux-mips.org/patch/6812Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ccd39880
    • M
      MIPS: Apply `.insn' to fixup labels throughout · 0e525e48
      Maciej W. Rozycki 提交于
      Fix the issue with the ISA bit being lost in fixups that jump to labels
      placed just before a section switch.  Such a switch leads to the ISA bit
      being lost, because GAS concludes there is no code that follows and
      therefore the label refers to data.  Use the `.insn' pseudo-op to
      convince the tool this is not the case.
      
      This lack of label annotation leads to microMIPS compilation errors
      like:
      
      mips-linux-gnu-ld: arch/mips/built-in.o: .fixup+0x3b8: Unsupported jump between ISA modes; consider recompiling with interlinking enabled.
      mips-linux-gnu-ld: final link failed: Bad value
      Signed-off-by: NMaciej W. Rozycki <macro@codesourcery.com>
      Signed-off-by: NSteven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/8483/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0e525e48
    • M
      MIPS: signal.c: Fix an invalid cast in ISA mode bit handling · 2fabc7d2
      Maciej W. Rozycki 提交于
      Fix:
      
      arch/mips/kernel/signal.c: In function 'handle_signal':
      arch/mips/kernel/signal.c:533:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        unsigned int tmp = (unsigned int)current->mm->context.vdso;
                           ^
      arch/mips/kernel/signal.c:536:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
        vdso = (void *)tmp;
               ^
      cc1: all warnings being treated as errors
      
      when building a 64-bit kernel.
      
      This is not really a supported configuration, but the cast is wrong
      either way, Linux makes the assumption that sizeof(void *) equals
      sizeof(unsigned long) and therefore the latter type is expected to be
      used where integer operations have to be applied to pointers for some
      reason.
      Signed-off-by: NMaciej W. Rozycki <macro@codesourcery.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/8480/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      2fabc7d2
    • M
      MIPS: traps: Dump the PageGrain and Wired registers on MC · 26b40ef1
      Markos Chandras 提交于
      They can be useful to determine how the MMU is configured on a MC
      exception.
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/8401/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      26b40ef1
    • M
      MIPS: traps: Dump the HTW registers on a MC exception · 31ec86b8
      Markos Chandras 提交于
      The HTW registers can be useful to debug a MC exception.
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/8400/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      31ec86b8