1. 31 5月, 2018 4 次提交
  2. 18 12月, 2017 2 次提交
  3. 09 4月, 2017 2 次提交
  4. 23 8月, 2016 1 次提交
    • V
      ARM: 8599/1: mm: pull asm/memory.h explicitly · f271b779
      Vladimir Murzin 提交于
      Commit d7811455 (""ARM: 8512/1: proc-v7.S: Adjust stack address when
      XIP_KERNEL"") introduced a macro which lives under asm/memory.h.
      Unfortunately, for MMU-less systems (like R-class) it leads to build failure:
      
      arch/arm/mm/proc-v7.S: Assembler messages:
      arch/arm/mm/proc-v7.S:538: Error: unrecognised relocation suffix
      make[1]: *** [arch/arm/mm/proc-v7.o] Error 1
      make: *** [arch/arm/mm] Error 2
      
      since it is implicitly pulled via asm/pgtable.h for MMU capable systems only.
      
      To fix it include asm/memory.h explicitly.
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f271b779
  5. 14 7月, 2016 3 次提交
    • D
      ARM: 8560/1: errata: Workaround errata A12 825619 / A17 852421 · 9f6f9354
      Doug Anderson 提交于
      The workaround for both errata is to set bit 24 in the diagnostic
      register.  There are no known end-user bugs solved by fixing this
      errata, but the fix is trivial and it seems sane to apply it.
      
      The arguments for why this needs to be in the kernel are similar to the
      arugments made in the patch "Workaround errata A12 818325/852422 A17
      852423".
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      9f6f9354
    • D
      ARM: 8559/1: errata: Workaround erratum A12 821420 · 416bcf21
      Doug Anderson 提交于
      This erratum has a very simple workaround (set a bit in a register), so
      let's apply it.  Apparently the workaround's downside is a very slight
      power impact.
      
      Note that applying this errata fixes deadlocks that are easy to
      reproduce with real world applications.
      
      The arguments for why this needs to be in the kernel are similar to the
      arugments made in the patch "Workaround errata A12 818325/852422 A17
      852423".
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      416bcf21
    • D
      ARM: 8558/1: errata: Workaround errata A12 818325/852422 A17 852423 · 62c0f4a5
      Doug Anderson 提交于
      There are several similar errata on Cortex A12 and A17 that all have the same workaround: setting bit[12] of the Feature Register.
      Technically the list of errata are:
      
      - A12 818325: Execution of an UNPREDICTABLE STR or STM instruction
        might deadlock.  Fixed in r0p1.
      - A12 852422: Execution of a sequence of instructions might lead to
        either a data corruption or a CPU deadlock.  Not fixed in any A12s
        yet.
      - A17 852423: Execution of a sequence of instructions might lead to
        either a data corruption or a CPU deadlock.  Not fixed in any A17s
        yet.
      
      Since A12 got renamed to A17 it seems likely that there won't be any
      future Cortex-A12 cores, so we'll enable for all Cortex-A12.
      
      For Cortex-A17 I believe that all known revisions are affected and that all knows revisions means <= r1p2.  Presumably if a new A17 was
      released it would have this problem fixed.
      
      Note that in <https://patchwork.kernel.org/patch/4735341/> folks
      previously expressed opposition to this change because:
      A) It was thought to only apply to r0p0 and there were no known r0p0
         boards supported in mainline.
      B) It was argued that such a workaround beloned in firmware.
      
      Now that this same fix solves other errata on real boards (like
      rk3288) point A) is addressed.
      
      Point B) is impossible to address on boards like rk3288.  On rk3288
      the firmware doesn't stay resident in RAM and isn't involved at all in
      the suspend/resume process nor in the SMP bringup process.  That means
      that the most the firmware could do would be to set the bit on "core
      0" and this bit would be lost at suspend/resume time.  It is true that
      we could write a "generic" solution that saved the boot-time "core 0"
      value of this register and applied it at SMP bringup / resume time.
      However, since this register (described as the "Feature Register" in
      errata) appears to be undocumented (as far as I can tell) and is only
      modified for these errata, that "generic" solution seems questionably
      cleaner.  The generic solution also won't fix existing users that
      haven't happened to do a FW update.
      
      Note that in ARM64 presumably PSCI will be universal and fixes like
      this will end up in ATF.  Hopefully we are nearing the end of this
      style of errata workaround.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NHuang Tao <huangtao@rock-chips.com>
      Signed-off-by: NKever Yang <kever.yang@rock-chips.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      62c0f4a5
  6. 02 4月, 2016 1 次提交
    • R
      ARM: SMP enable of cache maintanence broadcast · 0fc03d4c
      Russell King 提交于
      Masahiro Yamada reports that we can fail to set the FW bit in the
      auxiliary control register, which enables broadcasting the cache
      maintanence operations.  This occurs because we only check that the
      SMP/nAMP bit is set, rather than checking whether all the bits we
      want to be set are set.
      
      Rearrange the code to ensure that all desired bits are set, and only
      update the register if we discover some required bits are not set.
      Tested-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      0fc03d4c
  7. 17 2月, 2016 2 次提交
  8. 17 12月, 2015 1 次提交
  9. 15 12月, 2015 1 次提交
  10. 17 7月, 2015 1 次提交
  11. 02 6月, 2015 4 次提交
    • R
      ARM: proc-v7: sanitise and document registers around errata · c76f238e
      Russell King 提交于
      Document that r13 is not a stack in the initialisation function, in
      case anyone gets other ideas.
      
      Document the registers available for the errata workarounds, and
      specifically which registers contain parts of the MIDR register, as
      well as which registers must be preserved.
      
      Lastly, use the lowest numbered available register (r0) rather than
      r10 for temporary storage.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      c76f238e
    • R
      ARM: proc-v7: clean up MIDR access · 44194968
      Russell King 提交于
      We already have the main ID register available in r9, there's no need
      to refetch it.  Use the saved value.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      44194968
    • R
      ARM: proc-v7: move CPU errata out of line · 17e7bf86
      Russell King 提交于
      Rather than having a long sprawling __v7_setup function, which is hard
      to maintain properly, move the CPU errata out of line.
      
      While doing this, it was discovered that the Cortex-A15 errata had been
      incorrectly added:
      
      	ldr	r10, =0x00000c08	@ Cortex-A8 primary part number
      	teq	r0, r10
      	bne	2f
      /* Cortex-A8 errata */
      	b	3f
      2:	ldr	r10, =0x00000c09	@ Cortex-A9 primary part number
      	teq	r0, r10
      	bne	3f
      /* Cortex-A9 errata */
      3:	ldr	r10, =0x00000c0f	@ Cortex-A15 primary part number
      	teq	r0, r10
      	bne	4f
      /* Cortex-A15 errata */
      4:
      
      This results in the Cortex-A15 test always being executed after the
      Cortex-A8 and Cortex-A9 errata, which is obviously not what is intended.
      The 'b 3f' labels should have been updated to 'b 4f'.  The new structure
      of:
      
      	/* Cortex-A8 Errata */
      	ldr	r10, =0x00000c08	@ Cortex-A8 primary part number
      	teq	r0, r10
      	beq	__ca8_errata
      
      	/* Cortex-A9 Errata */
      	ldr	r10, =0x00000c09	@ Cortex-A9 primary part number
      	teq	r0, r10
      	beq	__ca9_errata
      
      	/* Cortex-A15 Errata */
      	ldr	r10, =0x00000c0f	@ Cortex-A15 primary part number
      	teq	r0, r10
      	beq	__ca15_errata
      
      __errata_finish:
      
      is much cleaner and easier to see that this kind of thing doesn't
      happen.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      17e7bf86
    • R
      ARM: redo TTBR setup code for LPAE · b2c3e38a
      Russell King 提交于
      Re-engineer the LPAE TTBR setup code.  Rather than passing some shifted
      address in order to fit in a CPU register, pass either a full physical
      address (in the case of r4, r5 for TTBR0) or a PFN (for TTBR1).
      
      This removes the ARCH_PGD_SHIFT hack, and the last dangerous user of
      cpu_set_ttbr() in the secondary CPU startup code path (which was there
      to re-set TTBR1 to the appropriate high physical address space on
      Keystone2.)
      Tested-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b2c3e38a
  12. 01 6月, 2015 1 次提交
  13. 15 4月, 2015 1 次提交
  14. 28 3月, 2015 1 次提交
  15. 27 11月, 2014 1 次提交
  16. 21 11月, 2014 1 次提交
  17. 13 9月, 2014 1 次提交
    • B
      ARM: 8138/1: drop ISAR0 workaround for B15 · fbf10641
      Brian Norris 提交于
      The Brahma-B15's ISAR0 correcty advertises UDIV/SDIV support in both ARM
      and Thumb2 modes (CPUID_EXT_ISAR0=02101110), so we don't need to
      manually apply this hwcap.
      
      The code in question actually predates the following commit, which made
      our hwcaps unnecessary:
      
          commit 8164f7af
          Author: Stephen Boyd <sboyd@codeaurora.org>
          Date:   Mon Mar 18 19:44:15 2013 +0100
      
              ARM: 7680/1: Detect support for SDIV/UDIV from ISAR0 register
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fbf10641
  18. 24 7月, 2014 1 次提交
  19. 18 7月, 2014 3 次提交
    • S
      ARM: 8103/1: save/restore Cortex-A9 CP15 registers on suspend/resume · ddd0c530
      Shawn Guo 提交于
      The CP15 diagnostic register holds ARM errata bits on Cortex-A9, so it
      needs to be saved/restored on suspend/resume.  Otherwise, the
      effectiveness of errata workaround gets lost together with diagnostic
      register bit across suspend/resume cycle.  And the CP15 power control
      register of Cortex-A9 shares the same problem.
      
      The patch adds a couple of Cortex-A9 specific suspend/resume functions
      to save/restore these two Cortex-A9 CP15 registers across the
      suspend/resume cycle.
      Signed-off-by: NShawn Guo <shawn.guo@freescale.com>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ddd0c530
    • S
      ARM: 8089/1: cpu_pj4b_suspend_size should base on cpu_v7_suspend_size · 7ca791c5
      Shawn Guo 提交于
      Since pj4b suspend/resume routines are implemented based on generic
      ARMv7 ones, instead of hard-coding cpu_pj4b_suspend_size, we should have
      it be cpu_v7_suspend_size plus pj4b specific bytes.  Otherwise, if
      cpu_v7_suspend_size gets updated alone, the pj4b suspend/resume will
      likely be broken.
      
      While at it, fix the comments in cpu_pj4b_do_resume, as we're restoring
      CP15 registers rather than saving in there.
      Signed-off-by: NShawn Guo <shawn.guo@freescale.com>
      Acked-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Tested-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7ca791c5
    • R
      ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ · 6ebbf2ce
      Russell King 提交于
      ARMv6 and greater introduced a new instruction ("bx") which can be used
      to return from function calls.  Recent CPUs perform better when the
      "bx lr" instruction is used rather than the "mov pc, lr" instruction,
      and this sequence is strongly recommended to be used by the ARM
      architecture manual (section A.4.1.1).
      
      We provide a new macro "ret" with all its variants for the condition
      code which will resolve to the appropriate instruction.
      
      Rather than doing this piecemeal, and miss some instances, change all
      the "mov pc" instances to use the new macro, with the exception of
      the "movs" instruction and the kprobes code.  This allows us to detect
      the "mov pc, lr" case and fix it up - and also gives us the possibility
      of deploying this for other registers depending on the CPU selection.
      Reported-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: Stephen Warren <swarren@nvidia.com> # Tegra Jetson TK1
      Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> # mioa701_bootresume.S
      Tested-by: Andrew Lunn <andrew@lunn.ch> # Kirkwood
      Tested-by: NShawn Guo <shawn.guo@freescale.com>
      Tested-by: Tony Lindgren <tony@atomide.com> # OMAPs
      Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> # Armada XP, 375, 385
      Acked-by: Sekhar Nori <nsekhar@ti.com> # DaVinci
      Acked-by: Christoffer Dall <christoffer.dall@linaro.org> # kvm/hyp
      Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> # PXA3xx
      Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> # Xen
      Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> # ARMv7M
      Tested-by: Simon Horman <horms+renesas@verge.net.au> # Shmobile
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6ebbf2ce
  20. 26 5月, 2014 1 次提交
  21. 23 4月, 2014 1 次提交
  22. 10 2月, 2014 2 次提交
  23. 14 11月, 2013 1 次提交
  24. 20 10月, 2013 1 次提交
  25. 02 9月, 2013 1 次提交
  26. 12 8月, 2013 1 次提交