1. 23 1月, 2014 5 次提交
  2. 30 10月, 2013 3 次提交
  3. 22 5月, 2013 1 次提交
  4. 09 5月, 2013 2 次提交
  5. 08 5月, 2013 1 次提交
  6. 10 4月, 2013 1 次提交
  7. 20 3月, 2013 1 次提交
    • F
      MIPS: Fix code generation for non-DSP capable CPUs · 63c2b681
      Florian Fainelli 提交于
      Commit 32a7ede6 (MIPS: dsp: Add assembler support for DSP ASEs) has
      enabled the use of DSP ASE specific instructions such as rddsp and wrdsp
      under the idea that all code path that will make use of these two
      instructions are properly checking for cpu_has_dsp to ensure that the
      particular CPU we are running on *actually* supports DSP ASE.
      
      This commit actually causes the following oops on QEMU Malta emulating a
      MIPS 24Kc without the DSP ASE implemented:
      
      [    7.960000] Reserved instruction in kernel
      [    7.960000] Cpu 0
      [    7.960000] $ 0   : 00000000 00000000 00000014 00000005
      [    7.960000] $ 4   : 8fc2de48 00000001 00000000 8f59ddb0
      [    7.960000] $ 8   : 8f5ceec4 00000018 00000c00 00800000
      [    7.960000] $12   : 00000100 00000200 00000000 00457b84
      [    7.960000] $16   : 00000000 8fc2ba78 8f4ec980 00000001
      [    7.960000] $20   : 80418f90 00000000 00000000 000002dd
      [    7.960000] $24   : 0000009c 7730d7b8
      [    7.960000] $28   : 8f59c000 8f59dd38 00000001 80104248
      [    7.960000] Hi    : 0000001d
      [    7.960000] Lo    : 0000000b
      [    7.960000] epc   : 801041ec thread_saved_pc+0x2c/0x38
      [    7.960000]     Not tainted
      [    7.960000] ra    : 80104248 get_wchan+0x48/0xac
      [    7.960000] Status: 1000b703    KERNEL EXL IE
      [    7.960000] Cause : 10800028
      [    7.960000] PrId  : 00019300 (MIPS 24Kc)
      [    7.960000] Modules linked in:
      [    7.960000] Process killall (pid: 1574, threadinfo=8f59c000,
      task=8fd14558, tls=773aa440)
      [    7.960000] Stack : 8fc2ba78 8012b008 0000000c 0000001d 00000000
      00000000 8f58a380
                        8f58a380 8fc2ba78 80202668 8f59de78 8f468600 8f59de28
      801b2a3c 8f59df00 8f98ba20 74696e69
                        8f468600 8f59de28 801b7308 0081c007 00000000 00000000
      00000000 00000000 00000000 00000000
                        00000000 8fc2bbb4 00000001 0000001d 0000000b 77f038cc
      7fe80648 ffffffff ffffffff 00000000
                        00000001 0016e000 00000000 ...
      [    7.960000] Call Trace:
      [    7.960000] [<801041ec>] thread_saved_pc+0x2c/0x38
      [    7.960000] [<80104248>] get_wchan+0x48/0xac
      
      The disassembly of thread_saved_pc points to the following:
      000006d0 <thread_saved_pc>:
       6d0:   8c820208        lw      v0,520(a0)
       6d4:   3c030000        lui     v1,0x0
       6d8:   24630000        addiu   v1,v1,0
       6dc:   10430008        beq     v0,v1,700 <thread_saved_pc+0x30>
       6e0:   00000000        nop
       6e4:   3c020000        lui     v0,0x0
       6e8:   8c43000c        lw      v1,12(v0)
       6ec:   04620004        bltzl   v1,700 <thread_saved_pc+0x30>
       6f0:   00001021        move    v0,zero
       6f4:   8c840200        lw      a0,512(a0)
       6f8:   00031080        sll     v0,v1,0x2
       6fc:   7c44100a        lwx     v0,a0(v0)   <------------
       700:   03e00008        jr      ra
       704:   00000000        nop
      
      If we specifically disable -mdsp/-mdspr2 for arch/mips/kernel/process.o,
      we get the following (non-crashing) assembly:
      
      00000708 <thread_saved_pc>:
       708:   8c820208        lw      v0,520(a0)
       70c:   3c030000        lui     v1,0x0
       710:   24630000        addiu   v1,v1,0
       714:   10430009        beq     v0,v1,73c <thread_saved_pc+0x34>
       718:   00000000        nop
       71c:   3c020000        lui     v0,0x0
       720:   8c42000c        lw      v0,12(v0)
       724:   04420005        bltzl   v0,73c <thread_saved_pc+0x34>
       728:   00001021        move    v0,zero
       72c:   8c830200        lw      v1,512(a0)
       730:   00021080        sll     v0,v0,0x2
       734:   00431021        addu    v0,v0,v1
       738:   8c420000        lw      v0,0(v0)
       73c:   03e00008        jr      ra
       740:   00000000        nop
      
      The specific line that leads a different assembly being produced is:
      
      unsigned long thread_saved_pc(struct task_struct *tsk)
      ...
      	return ((unsigned long *)t->reg29)[schedule_mfi.pc_offset]; <---
      
      The problem here is that the compiler was given the right to use DSP
      instructions with the -mdsp / -mdspr2 command-line switches and
      performed some optimization for us and used DSP ASE instructions where
      we are not checking that the running CPU actually supports DSP ASE.
      
      This patch fixes the issue by partially reverting commit 32a7ede6 for
      arch/mips/kernel/Makefile in order to remove the -mdsp / -mdspr2
      compiler command-line switches such that we are now guaranteed that the
      compiler will not optimize using DSP ASE reserved instructions. We also
      need to fixup the rddsp/wrdsp and m{t,h}{hi,lo}{0,1,2,3} macros in
      arch/mips/include/asm/mipsregs.h to tell the assembler that we are going
      to explicitely use DSP ASE reserved instructions. The comment in
      arch/mips/kernel/Makefile is also updated to reflect that.
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      Acked-by: NSteven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: blogic@openwrt.org
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      63c2b681
  8. 17 2月, 2013 2 次提交
  9. 01 2月, 2013 1 次提交
  10. 14 12月, 2012 3 次提交
    • R
      MIPS: PMC-Sierra Yosemite: Remove support. · bdf20507
      Ralf Baechle 提交于
      Nobody seems to be interested anymore and upstream also never had an
      ethernet driver.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bdf20507
    • R
      MIPS: Remove usage of CEVT_R4K_LIB config option. · f772cdb2
      Ralf Baechle 提交于
      Manuel Lauss <manuel.lauss@gmail.com> writes:
      
      I introduced it as a fallback because early revisions of Alchemy hardware
      we shipped had a non-functional 32kHz timer and had to rely on the r4k
      timer instead.  Previously the r4k timer was initialized regardless, but
      it's useless with the "wait" instruction.
      
      So long story short:   I need either the on-chip 32kHz timer OR the r4k
      timer if the 32kHz one is unusable, but not both, and r4k timer is useless
      when au1k_idle is in use.
      
      The current in-kernel Alchemy boards all work with the 32kHz timer, so I'm
      not against removing R4K_LIB symbols.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f772cdb2
    • S
      MIPS: Remove usage of CSRC_R4K_LIB config option. · d7ea335c
      Steven J. Hill 提交于
      Manuel Lauss <manuel.lauss@gmail.com> writes:
      
      I introduced it as a fallback because early revisions of Alchemy hardware
      we shipped had a non-functional 32kHz timer and had to rely on the r4k
      timer instead.  Previously the r4k timer was initialized regardless, but
      it's useless with the "wait" instruction.
      
      So long story short:   I need either the on-chip 32kHz timer OR the r4k
      timer if the 32kHz one is unusable, but not both, and r4k timer is useless
      when au1k_idle is in use.
      
      The current in-kernel Alchemy boards all work with the 32kHz timer, so I'm
      not against removing R4K_LIB symbols.
      Signed-off-by: NSteven J. Hill <sjhill@mips.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      d7ea335c
  11. 13 12月, 2012 1 次提交
  12. 11 10月, 2012 1 次提交
  13. 03 10月, 2012 1 次提交
    • J
      kbuild: Fix gcc -x syntax · b1e0d8b7
      Jean Delvare 提交于
      The correct syntax for gcc -x is "gcc -x assembler", not
      "gcc -xassembler". Even though the latter happens to work, the former
      is what is documented in the manual page and thus what gcc wrappers
      such as icecream do expect.
      
      This isn't a cosmetic change. The missing space prevents icecream from
      recognizing compilation tasks it can't handle, leading to silent kernel
      miscompilations.
      
      Besides me, credits go to Michael Matz and Dirk Mueller for
      investigating the miscompilation issue and tracking it down to this
      incorrect -x parameter syntax.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: stable@vger.kernel.org
      Cc: Bernhard Walle <bernhard@bwalle.de>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      b1e0d8b7
  14. 28 9月, 2012 2 次提交
    • D
      Make most arch asm/module.h files use asm-generic/module.h · 786d35d4
      David Howells 提交于
      Use the mapping of Elf_[SPE]hdr, Elf_Addr, Elf_Sym, Elf_Dyn, Elf_Rel/Rela,
      ELF_R_TYPE() and ELF_R_SYM() to either the 32-bit version or the 64-bit version
      into asm-generic/module.h for all arches bar MIPS.
      
      Also, use the generic definition mod_arch_specific where possible.
      
      To this end, I've defined three new config bools:
      
       (*) HAVE_MOD_ARCH_SPECIFIC
      
           Arches define this if they don't want to use the empty generic
           mod_arch_specific struct.
      
       (*) MODULES_USE_ELF_RELA
      
           Arches define this if their modules can contain RELA records.  This causes
           the Elf_Rela mapping to be emitted and allows apply_relocate_add() to be
           defined by the arch rather than have the core emit an error message.
      
       (*) MODULES_USE_ELF_REL
      
           Arches define this if their modules can contain REL records.  This causes
           the Elf_Rel mapping to be emitted and allows apply_relocate() to be
           defined by the arch rather than have the core emit an error message.
      
      Note that it is possible to allow both REL and RELA records: m68k and mips are
      two arches that do this.
      
      With this, some arch asm/module.h files can be deleted entirely and replaced
      with a generic-y marker in the arch Kbuild file.
      
      Additionally, I have removed the bits from m32r and score that handle the
      unsupported type of relocation record as that's now handled centrally.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      786d35d4
    • R
      MIPS: Fix module.c build for 32 bit · 6ede8123
      Ralf Baechle 提交于
      Fixes build failure introduced by "Make most arch asm/module.h files use
      asm-generic/module.h" by moving all the RELA processing code to a
      separate file to be used only for RELA processing on 64-bit kernels.
      
        CC      arch/mips/kernel/module.o
      arch/mips/kernel/module.c:250:14: error: 'reloc_handlers_rela' defined but not
      used [-Werror=unused-variable]
      cc1: all warnings being treated as errors
      
      make[6]: *** [arch/mips/kernel/module.o] Error 1
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      6ede8123
  15. 23 8月, 2012 1 次提交
  16. 05 5月, 2012 1 次提交
  17. 08 12月, 2011 2 次提交
  18. 25 10月, 2011 1 次提交
    • D
      MIPS: perf: Reorganize contents of perf support files. · e5dcb58a
      David Daney 提交于
      The contents of arch/mips/kernel/perf_event.c and
      arch/mips/kernel/perf_event_mipsxx.c were divided in a seemingly ad
      hoc manner, with the first including the second.
      
      I moved all the hardware counter support code to perf_event_mipsxx.c
      and removed the gating #ifdefs to the Kconfig and Makefile.
      
      Now perf_event.c contains only the callchain support, everything else
      is in perf_event_mipsxx.c
      
      There are no code changes, only moving of functions from one file to
      the other, or removing empty unneeded functions.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Dezhong Diao <dediao@cisco.com>
      Cc: Gabor Juhos <juhosg@openwrt.org>
      Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/2791/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      e5dcb58a
  19. 19 5月, 2011 1 次提交
  20. 19 1月, 2011 2 次提交
  21. 30 10月, 2010 1 次提交
    • D
      MIPS: add support for hardware performance events (skeleton) · 14f70012
      Deng-Cheng Zhu 提交于
      This patch provides the skeleton of the HW perf event support. To enable
      this feature, we can not choose the SMTC kernel; Oprofile should be
      disabled; kernel performance events be selected. Then we can enable it in
      Kernel type menu.
      
      Oprofile for MIPS platforms initializes irq at arch init time. Currently
      we do not change this logic to allow PMU reservation.
      
      If a platform has EIC, we can use the irq base and perf counter irq offset
      defines for the interrupt controller in specific init_hw_perf_events().
      
      Based on this skeleton patch, the 3 different kinds of MIPS PMU, namely,
      mipsxx/loongson2/rm9000, can be supported by adding corresponding lower
      level C files at the bottom. The suggested names of these files are
      perf_event_mipsxx.c/perf_event_loongson2.c/perf_event_rm9000.c. So, for
      example, we can do this by adding "#include perf_event_mipsxx.c" at the
      bottom of perf_event.c.
      
      In addition, PMUs with 64bit counters are also considered in this patch.
      Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@gmail.com>
      To: linux-mips@linux-mips.org
      Cc: a.p.zijlstra@chello.nl
      Cc: paulus@samba.org
      Cc: mingo@elte.hu
      Cc: acme@redhat.com
      Cc: jamie.iles@picochip.com
      Cc: ddaney@caviumnetworks.com
      Cc: matt@console-pimps.org
      Patchwork: https://patchwork.linux-mips.org/patch/1688/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      14f70012
  22. 22 10月, 2010 1 次提交
  23. 05 8月, 2010 2 次提交
  24. 13 4月, 2010 1 次提交
    • 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
  25. 27 2月, 2010 1 次提交
    • D
      MIPS: Crazy spinlock speed test. · bba90760
      David Daney 提交于
      This is just a test program for raw_spinlocks.  The main reason I
      wrote it is to validate my spinlock changes that I sent in a previous
      patch.
      
      To use it enable CONFIG_DEBUG_FS and CONFIG_SPINLOCK_TEST then at run
      time do:
      
      # mount -t debugfs none /sys/kernel/debug/
      # cat /sys/kernel/debug/mips/spin_single
      # cat /sys/kernel/debug/mips/spin_multi
      
      On my 600MHz octeon cn5860 (16 CPUs) I get
      
      		spin_single	spin_multi
      base		106885		247941
      spinlock_patch	75194		219465
      
      This shows that for uncontended locks the spinlock patch gives 41%
      improvement and for contended locks 12% improvement (1/time).
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      To: linux-mips@linux-mips.org
      Patchwork: http://patchwork.linux-mips.org/patch/969/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bba90760
  26. 17 12月, 2009 1 次提交