Skip to content
  1. Jan 31, 2013
    • Al Cooper's avatar
      MIPS: Function tracer: Fix broken function tracing · 58b69401
      Al Cooper authored
      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: default avatarAl 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: default avatarRalf Baechle <ralf@linux-mips.org>
      58b69401
    • Steven Rostedt's avatar
      mips: Move __virt_addr_valid() to a place for MIPS 64 · 196897a2
      Steven Rostedt authored
      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: default avatarSteven 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: default avatarRalf Baechle <ralf@linux-mips.org>
      196897a2
    • Jayachandran C's avatar
      MIPS: Netlogic: Fix UP compilation on XLR · 26f5ae86
      Jayachandran C authored
      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: default avatarJayachandran C <jchandra@broadcom.com>
      Patchwork: http://patchwork.linux-mips.org/patch/4760/
      
      
      Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      26f5ae86
    • Gabor Juhos's avatar
      MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE · fe950df7
      Gabor Juhos authored
      
      
      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: default avatarGabor Juhos <juhosg@openwrt.org>
      Patchwork: http://patchwork.linux-mips.org/patch/4873/
      
      
      Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      fe950df7
    • Gabor Juhos's avatar
      MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE · 4c960910
      Gabor Juhos authored
      
      
      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: default avatarGabor Juhos <juhosg@openwrt.org>
      Patchwork: http://patchwork.linux-mips.org/patch/4872/
      
      
      Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      4c960910
    • John Crispin's avatar
      MIPS: Lantiq: Fix cp0_perfcount_irq mapping · 79d61a04
      John Crispin authored
      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: default avatarConor O'Gorman <i@conorogorman.net>
      Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/4875/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      79d61a04
  2. Jan 24, 2013
  3. Jan 23, 2013
  4. Jan 22, 2013
  5. Jan 17, 2013
  6. Jan 16, 2013
  7. Jan 10, 2013
  8. Jan 09, 2013
    • Linus Torvalds's avatar
      Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 974b3358
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "People are back from the holiday breaks, and it shows.  Here are a
        bunch of fixes for a number of platforms:
         - A couple of small fixes for Nomadik
         - A larger set of changes for kirkwood/mvebu
           - uart driver selection, dt clocks, gpio-poweroff fixups, a few
             __init annotation fixes and some error handling improvement in
             their xor dma driver.
         - i.MX had a couple of minor fixes (and a critical one for flexcan2
           clock setup)
         - MXS has a small board fix and a framebuffer bugfix
         - A set of fixes for Samsung Exynos, fixing default bootargs and some
           Exynos5440 clock issues
         - A set of OMAP changes including PM fixes and a few sparse warning
           fixups
      
        All in all a bit more positive code delta than we'd ideally want to
        see here, mostly from the OMAP PM changes, but nothing overly crazy."
      
      * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (44 commits)
        ARM: clps711x: Fix bad merge of clockevents setup
        ARM: highbank: save and restore L2 cache and GIC on suspend
        ARM: highbank: add a power request clear
        ARM: highbank: fix secondary boot and hotplug
        ARM: highbank: fix typos with hignbank in power request functions
        ARM: dts: fix highbank cpu mpidr values
        ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
        ARM: mx5: Fix MX53 flexcan2 clock
        ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
        pinctrl: mvebu: make pdma clock on dove mandatory
        ARM: Dove: Add pinctrl clock to DT
        dma: mv_xor: fix error handling for clocks
        dma: mv_xor: fix error handling of mv_xor_channel_add()
        arm: mvebu: Add missing ; for cpu node.
        arm: mvebu: Armada XP MV78230 has only three Ethernet interfaces
        arm: mvebu: Armada XP MV78230 has two cores, not one
        clk: mvebu: Remove inappropriate __init tagging
        ARM: Kirkwood: Use fixed-regulator instead of board gpio call
        ARM: Kirkwood: Fix missing sdio clock
        ARM: Kirkwood: Switch TWSI1 of 88f6282 to DT clock providers
        ...
      974b3358
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · ca5c8a4c
      Linus Torvalds authored
      Pull drm update from Dave Airlie:
       "Exynos and Radeon mostly, with a dma-buf and ttm fix thrown in.
      
        It's a bit big but its mostly exynos license fix ups and I'd rather
        not hold those up since its legally stuff.
      
        Radeon has a couple of fixes from dma engine work, TTM is just a
        locking fix, and dma-buf fix has been hanging around and I finally got
        a chance to review it."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (30 commits)
        drm/ttm: fix fence locking in ttm_buffer_object_transfer
        drm/prime: drop reference on imported dma-buf come from gem
        drm/radeon: add quirk for d3 delay during switcheroo poweron for apple macbooks
        drm/exynos: move finish page flip to a common place
        drm/exynos: fimd: modify condition in fimd resume
        drm/radeon: fix DMA CS parser for r6xx linear copy packet
        drm/radeon: split r6xx and r7xx copy_dma functions
        drm/exynos: Use devm_clk_get in exynos_drm_gsc.c
        drm/exynos: Remove redundant NULL check in exynos_drm_gsc.c
        drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_gsc.c
        drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
        drm/exynos: Remove redundant NULL check in exynos_drm_rotator.c
        drm/exynos: Remove unnecessary devm_* freeing APIs in exynos_drm_rotator.c
        drm/exynos: Use devm_clk_get in exynos_drm_fimc.c
        drm/exynos: Remove redundant NULL check
        drm/exynos: Remove explicit freeing using devm_* APIs in exynos_drm_fimc.c
        drm/exynos: Use devm_kzalloc in exynos_drm_ipp.c
        drm/exynos: fix gem buffer allocation type checking
        drm/exynos: remove needless parenthesis.
        drm/exynos: fix incorrect interrupt induced by m2m operation.
        ...
      ca5c8a4c
    • Olof Johansson's avatar
      Merge tag 'omap-for-v3.8-rc2/fixes-signed-v2' of... · 434fec16
      Olof Johansson authored
      Merge tag 'omap-for-v3.8-rc2/fixes-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      The biggest change is a fix to deal with different power state
      on omap2 registers that causes issues trying to use common PM code.
      Also fix few incorrect registers, and an issue for omap1 USB, and
      few sparse fixes for issues that sneaked in with all the clean-up.
      
      * tag 'omap-for-v3.8-rc2/fixes-signed-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap
      
      :
        ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
        ARM: OMAP1: fix USB configuration use-after-release
        ARM: OMAP2/3: PRM: fix bogus OMAP2xxx powerstate return values
        ARM: OMAP3: clock data: Add missing enable/disable for EMU clock
        ARM: OMAP4: PRM: Correct wrong instance usage for reading reset sources
        ARM: OMAP4: PRM: fix RSTTIME and RSTST offsets
        ARM: OMAP4: PRM: Correct reset source map
        ARM: OMAP: SRAM: resolve sparse warnings
        ARM: OMAP AM33xx: hwmod data: resolve sparse warnings
        ARM: OMAP: 32k counter: resolve sparse warnings
      
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      434fec16
    • Olof Johansson's avatar
      Merge branch 'v3.8-samsung-fixes-2' of... · 2f64a8d7
      Olof Johansson authored
      Merge branch 'v3.8-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
      
      From Kukjin Kim:
      Most of them are EXYNOS5440 fixes which are for changing uart console,
      cpu id (typo)  and silent complaining gpio error in kernel boot.
      
      * 'v3.8-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
        ARM: EXYNOS: skip the clock initialization for exynos5440
        ARM: EXYNOS: enable PINCTRL for EXYNOS5440
        ARM: dts: use uart port1 for console on exynos4210-smdkv310
        ARM: dts: use uart port0 for console on exynos5440-ssdk5440
        ARM: SAMSUNG: fix the cpu id for EXYNOS5440
        ARM: EXYNOS: Revise HDMI resource size
      2f64a8d7
    • Olof Johansson's avatar
      Merge tag 'mxs-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes · 5595e755
      Olof Johansson authored
      From Shawn Guo:
      I have to send one critical mxsfb fix through arm-soc, as FB maintainer
      is unresponsive for quite a while.  People start complaining the missing
      of such an important fix.
      
      * tag 'mxs-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6:
        video: mxsfb: fix crash when unblanking the display
        ARM: dts: imx23-olinuxino: Fix IOMUX settings
      5595e755
    • Olof Johansson's avatar
      Merge tag 'imx-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes · 2d9e02ca
      Olof Johansson authored
      From Shawn Guo:
      
      It includes one critical fix - wrong flexcan2 clock will hang system
      when the port gets brought up.  The other two are non-critical fixes,
      which are sent together here, since it's still early -rc stage.
      
      * tag 'imx-fixes-3.8' of git://git.linaro.org/people/shawnguo/linux-2.6:
        ARM: mx5: Fix MX53 flexcan2 clock
        ARM: dts: imx31-bug: Fix manufacturer compatible string
        clk: imx: Remove 'clock-output-names' from the examples
      2d9e02ca
  9. Jan 08, 2013