1. 01 2月, 2013 11 次提交
  2. 31 1月, 2013 6 次提交
    • A
      MIPS: Function tracer: Fix broken function tracing · 58b69401
      Al Cooper 提交于
      Function tracing is currently broken for all 32 bit MIPS platforms.
      When tracing is enabled, the kernel immediately hangs on boot.
      This is a result of commit b732d439
      that changes the kernel/trace/Kconfig file so that is no longer
      forces FRAME_POINTER when FUNCTION_TRACING is enabled.
      
      MIPS frame pointers are generally considered to be useless because
      they cannot be used to unwind the stack. Unfortunately the MIPS
      function tracing code has bugs that are masked by the use of frame
      pointers. This commit fixes the bugs so that MIPS frame pointers
      don't need to be enabled.
      
      The bugs are a result of the odd calling sequence used to call the trace
      routine. This calling sequence is inserted into every traceable function
      when the tracing CONFIG option is enabled. This sequence is generated
      for 32bit MIPS platforms by the compiler via the "-pg" flag.
      
      Part of the sequence is "addiu sp,sp,-8" in the delay slot after every
      call to the trace routine "_mcount" (some legacy thing where 2 arguments
      used to be pushed on the stack). The _mcount routine is expected to
      adjust the sp by +8 before returning.  So when not disabled, the original
      jalr and addiu will be there, so _mcount has to adjust sp.
      
      The problem is that when tracing is disabled for a function, the
      "jalr _mcount" instruction is replaced with a nop, but the
      "addiu sp,sp,-8" is still executed and the stack pointer is left
      trashed. When frame pointers are enabled the problem is masked
      because any access to the stack is done through the frame
      pointer and the stack pointer is restored from the frame pointer when
      the function returns.
      
      This patch writes two nops starting at the address of the "jalr _mcount"
      instruction whenever tracing is disabled. This means that the
      "addiu sp,sp.-8" will be converted to a nop along with the "jalr".  When
      disabled, there will be two nops.
      
      This is SMP safe because the first time this happens is during
      ftrace_init() which is before any other processor has been started.
      Subsequent calls to enable/disable tracing when other CPUs ARE running
      will still be safe because the enable will only change the first nop
      to a "jalr" and the disable, while writing 2 nops, will only be changing
      the "jalr". This patch also stops using stop_machine() to call the
      tracer enable/disable routines and calls them directly because the
      routines are SMP safe.
      
      When the kernel first boots we have to be able to handle the gcc
      generated jalr, addui sequence until ftrace_init gets a chance to run
      and change the sequence. At this point mcount just adjusts the stack
      and returns. When ftrace_init runs, we convert the jalr/addui to nops.
      Then whenever tracing is enabled we convert the first nop to a "jalr
      mcount+8". The mcount+8 entry point skips the stack adjust.
      
      [ralf@linux-mips.org: Folded in  Steven Rostedt's build fix.]
      Signed-off-by: NAl Cooper <alcooperx@gmail.com>
      Cc: rostedt@goodmis.org
      Cc: ddaney.cavm@gmail.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/4806/
      Patchwork: https://patchwork.linux-mips.org/patch/4841/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      58b69401
    • S
      mips: Move __virt_addr_valid() to a place for MIPS 64 · 196897a2
      Steven Rostedt 提交于
      Commit d3ce8843 "MIPS: Fix modpost error in modules attepting to use
      virt_addr_valid()" moved __virt_addr_valid() from a macro in a header
      file to a function in ioremap.c. But ioremap.c is only compiled for MIPS
      32, and not for MIPS 64.
      
      When compiling for my yeeloong2, which supposedly supports hibernation,
      which compiles kernel/power/snapshot.c which calls virt_addr_valid(), I
      got this error:
      
        LD      init/built-in.o
      kernel/built-in.o: In function `memory_bm_free':
      snapshot.c:(.text+0x4c9c4): undefined reference to `__virt_addr_valid'
      snapshot.c:(.text+0x4ca58): undefined reference to `__virt_addr_valid'
      kernel/built-in.o: In function `snapshot_write_next':
      (.text+0x4e44c): undefined reference to `__virt_addr_valid'
      kernel/built-in.o: In function `snapshot_write_next':
      (.text+0x4e890): undefined reference to `__virt_addr_valid'
      make[1]: *** [vmlinux] Error 1
      make: *** [sub-make] Error 2
      
      I suspect that __virt_addr_valid() is fine for mips 64. I moved it to
      mmap.c such that it gets compiled for mips 64 and 32.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/4842/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      196897a2
    • J
      MIPS: Netlogic: Fix UP compilation on XLR · 26f5ae86
      Jayachandran C 提交于
      The commit 2a37b1ae "MIPS: Netlogic: Move from u32 cpumask to cpumask_t"
      breaks uniprocessor compilation on XLR with:
      
      arch/mips/netlogic/xlr/setup.c: In function 'prom_init':
      arch/mips/netlogic/xlr/setup.c:196:6: error: unused variable 'i'
      
      Fix by defining 'i' only when CONFIG_SMP is defined.
      Signed-off-by: NJayachandran C <jchandra@broadcom.com>
      Patchwork: http://patchwork.linux-mips.org/patch/4760/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      26f5ae86
    • G
      MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE · fe950df7
      Gabor Juhos 提交于
      The base address of the PCI memory is 0x10000000 and the base address of the
      PCI configuration space is 0x17000000 on the AR71xx SoCs.
      
      The AR71XX_PCI_MEM_SIZE is defined as 0x08000000 which is wrong because that
      overlaps with the configuration space.  This patch fixes the value of the
      AR71XX_PCI_MEM_SIZE constant, in order to avoid this resource conflicts.
      Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
      Patchwork: http://patchwork.linux-mips.org/patch/4873/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      fe950df7
    • G
      MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE · 4c960910
      Gabor Juhos 提交于
      The base address of the PCI memory is
      0x10000000 and the base address of the
      PCI configuration space is 0x14000000
      on the AR724x SoCs.
      
      The AR724X_PCI_MEM_SIZE is defined as
      0x08000000 which is wrong because that
      overlaps  with the configuration space.
      
      The patch fixes the value of the
      AR724X_PCI_MEM_SIZE constant, in order
      to avoid this resource conflicts.
      Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
      Patchwork: http://patchwork.linux-mips.org/patch/4872/Signed-off-by: NJohn Crispin <blogic@openwrt.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      4c960910
    • J
      MIPS: Lantiq: Fix cp0_perfcount_irq mapping · 79d61a04
      John Crispin 提交于
      The introduction of the OF support broke the cp0_perfcount_irq mapping. This
      resulted in oprofile not working anymore.
      
      Offending commit is :
      
      commit 3645da02
      Author: John Crispin <blogic@openwrt.org>
      Date:   Tue Apr 17 10:18:32 2012 +0200
      
      OF: MIPS: lantiq: implement irq_domain support
      Signed-off-by: NConor O'Gorman <i@conorogorman.net>
      Signed-off-by: NJohn Crispin <blogic@openwrt.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/4875/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      79d61a04
  3. 24 1月, 2013 1 次提交
  4. 23 1月, 2013 2 次提交
  5. 22 1月, 2013 2 次提交
  6. 17 1月, 2013 1 次提交
  7. 16 1月, 2013 4 次提交
  8. 04 1月, 2013 1 次提交
    • G
      MIPS: drivers: remove __dev* attributes. · 28eb0e46
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      28eb0e46
  9. 03 1月, 2013 1 次提交
    • J
      MIPS: 64-bit: Fix build if !CONFIG_MODULES · 2f12fb20
      Joshua Kinard 提交于
      Fix build failure if building a monolithic kernel due to
      arch/mips/kernel/Kconfig selecting MODULES_USE_ELF_REL[A] without checking
      to see if MODULES is set or not.  This leads to 'struct module' not
      existing, which triggers a compile failure in arch/mips/kernel/module-rela.c
      when the compiler attempts to dereference me->name:
      
        CC      arch/mips/kernel/module-rela.o
      arch/mips/kernel/module-rela.c: In function ‘apply_r_mips_26_rela’:
      arch/mips/kernel/module-rela.c:38:74: error: dereferencing pointer to incomplete type
      arch/mips/kernel/module-rela.c:46:12: error: dereferencing pointer to incomplete type
      arch/mips/kernel/module-rela.c: In function ‘apply_relocate_add’:
      arch/mips/kernel/module-rela.c:133:13: error: dereferencing pointer to incomplete type
      make[2]: *** [arch/mips/kernel/module-rela.o] Error 1
      Signed-off-by: NJoshua Kinard <kumba@gentoo.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/4749/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      2f12fb20
  10. 29 12月, 2012 6 次提交
  11. 27 12月, 2012 4 次提交
  12. 20 12月, 2012 1 次提交