1. 31 12月, 2014 1 次提交
  2. 26 9月, 2013 2 次提交
  3. 01 8月, 2013 2 次提交
    • S
      clocksource: arch_timer: Add support for memory mapped timers · 22006994
      Stephen Boyd 提交于
      Add support for the memory mapped timers by filling in the
      read/write functions and adding some parsing code. Note that we
      only register one clocksource, preferring the cp15 based
      clocksource over the mmio one.
      
      To keep things simple we register one global clockevent. This
      covers the case of UP and SMP systems with only mmio hardware and
      systems where the memory mapped timers are used as the broadcast
      timer in low power modes.
      
      The DT binding allows for per-CPU memory mapped timers in case we
      want to support that in the future, but the code isn't added
      here. We also don't do much for hypervisor support, although it
      should be possible to support it by searching for at least two
      frames where one frame has the virtual capability and then
      updating KVM timers to support it.
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Marc Zyngier <Marc.Zyngier@arm.com>
      Cc: Rob Herring <robherring2@gmail.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      22006994
    • S
      clocksource: arch_timer: Make register accessors less error-prone · e09f3cc0
      Stephen Boyd 提交于
      Using an enum for the register we wish to access allows newer
      compilers to determine if we've forgotten a case in our switch
      statement. This allows us to remove the BUILD_BUG() instances in
      the arm64 port, avoiding problems where optimizations may not
      happen.
      
      To try and force better code generation we're currently marking
      the accessor functions as inline, but newer compilers can ignore
      the inline keyword unless it's marked __always_inline. Luckily on
      arm and arm64 inline is __always_inline, but let's make
      everything __always_inline to be explicit.
      Suggested-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Marc Zyngier <Marc.Zyngier@arm.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      e09f3cc0
  4. 07 6月, 2013 1 次提交
    • M
      clocksource: arch_timer: use virtual counters · 0d651e4e
      Mark Rutland 提交于
      Switching between reading the virtual or physical counters is
      problematic, as some core code wants a view of time before we're fully
      set up. Using a function pointer and switching the source after the
      first read can make time appear to go backwards, and having a check in
      the read function is an unfortunate block on what we want to be a fast
      path.
      
      Instead, this patch makes us always use the virtual counters. If we're a
      guest, or don't have hyp mode, we'll use the virtual timers, and as such
      don't care about CNTVOFF as long as it doesn't change in such a way as
      to make time appear to travel backwards. As the guest will use the
      virtual timers, a (potential) KVM host must use the physical timers
      (which can wake up the host even if they fire while a guest is
      executing), and hence a host must have CNTVOFF set to zero so as to have
      a consistent view of time between the physical timers and virtual
      counters.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      0d651e4e
  5. 12 4月, 2013 1 次提交
    • R
      ARM: convert arm/arm64 arch timer to use CLKSRC_OF init · 0583fe47
      Rob Herring 提交于
      This converts arm and arm64 to use CLKSRC_OF DT based initialization for
      the arch timer. A new function arch_timer_arch_init is added to allow for
      arch specific setup.
      
      This has a side effect of enabling sched_clock on omap5 and exynos5. There
      should not be any reason not to use the arch timers for sched_clock.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Magnus Damm <magnus.damm@gmail.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-omap@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      0583fe47
  6. 12 2月, 2013 1 次提交
  7. 31 1月, 2013 1 次提交