Skip to content
  1. Sep 24, 2016
    • Scott Wood's avatar
      arm64: arch_timer: Work around QorIQ Erratum A-008585 · f6dc1576
      Scott Wood authored
      
      
      Erratum A-008585 says that the ARM generic timer counter "has the
      potential to contain an erroneous value for a small number of core
      clock cycles every time the timer value changes".  Accesses to TVAL
      (both read and write) are also affected due to the implicit counter
      read.  Accesses to CVAL are not affected.
      
      The workaround is to reread TVAL and count registers until successive
      reads return the same value.  Writes to TVAL are replaced with an
      equivalent write to CVAL.
      
      The workaround is to reread TVAL and count registers until successive reads
      return the same value, and when writing TVAL to retry until counter
      reads before and after the write return the same value.
      
      The workaround is enabled if the fsl,erratum-a008585 property is found in
      the timer node in the device tree.  This can be overridden with the
      clocksource.arm_arch_timer.fsl-a008585 boot parameter, which allows KVM
      users to enable the workaround until a mechanism is implemented to
      automatically communicate this information.
      
      This erratum can be found on LS1043A and LS2080A.
      
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarScott Wood <oss@buserror.net>
      [will: renamed read macro to reflect that it's not usually unstable]
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      f6dc1576
  2. Sep 23, 2016
  3. Sep 22, 2016
  4. Sep 20, 2016
  5. Sep 17, 2016
  6. Sep 15, 2016
    • David A. Long's avatar
      arm64: Improve kprobes test for atomic sequence · 3e593f66
      David A. Long authored
      
      
      Kprobes searches backwards a finite number of instructions to determine if
      there is an attempt to probe a load/store exclusive sequence. It stops when
      it hits the maximum number of instructions or a load or store exclusive.
      However this means it can run up past the beginning of the function and
      start looking at literal constants. This has been shown to cause a false
      positive and blocks insertion of the probe. To fix this, further limit the
      backwards search to stop if it hits a symbol address from kallsyms. The
      presumption is that this is the entry point to this code (particularly for
      the common case of placing probes at the beginning of functions).
      
      This also improves efficiency by not searching code that is not part of the
      function. There may be some possibility that the label might not denote the
      entry path to the probed instruction but the likelihood seems low and this
      is just another example of how the kprobes user really needs to be
      careful about what they are doing.
      
      Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarDavid A. Long <dave.long@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      3e593f66
  7. Sep 12, 2016
    • Mark Rutland's avatar
      arm64/kvm: use alternative auto-nop · e506236a
      Mark Rutland authored
      
      
      Make use of the new alternative_if and alternative_else_nop_endif and
      get rid of our open-coded NOP sleds, making the code simpler to read.
      
      Note that for __kvm_call_hyp the branch to __vhe_hyp_call has been moved
      out of the alternative sequence, and in the default case there will be
      four additional NOPs executed.
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: kvmarm@lists.cs.columbia.edu
      Acked-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      e506236a
    • Mark Rutland's avatar
      arm64: use alternative auto-nop · 6ba3b554
      Mark Rutland authored
      
      
      Make use of the new alternative_if and alternative_else_nop_endif and
      get rid of our homebew NOP sleds, making the code simpler to read.
      
      Note that for cpu_do_switch_mm the ret has been moved out of the
      alternative sequence, and in the default case there will be three
      additional NOPs executed.
      
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      6ba3b554
    • Mark Rutland's avatar
      arm64: alternative: add auto-nop infrastructure · 792d4737
      Mark Rutland authored
      
      
      In some cases, one side of an alternative sequence is simply a number of
      NOPs used to balance the other side. Keeping track of this manually is
      tedious, and the presence of large chains of NOPs makes the code more
      painful to read than necessary.
      
      To ameliorate matters, this patch adds a new alternative_else_nop_endif,
      which automatically balances an alternative sequence with a trivial NOP
      sled.
      
      In many cases, we would like a NOP-sled in the default case, and
      instructions patched in in the presence of a feature. To enable the NOPs
      to be generated automatically for this case, this patch also adds a new
      alternative_if, and updates alternative_else and alternative_endif to
      work with either alternative_if or alternative_endif.
      
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Martin <dave.martin@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
      [will: use new nops macro to generate nop sequences]
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      792d4737
  8. Sep 10, 2016
  9. Sep 09, 2016