All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCHv2 00/20] A15 architected timer support
@ 2011-03-15 15:12 Marc Zyngier
  2011-03-15 15:12 ` [RFC PATCHv2 01/20] ARM: architected timers: move local timer support to percpu_timer.c Marc Zyngier
                   ` (19 more replies)
  0 siblings, 20 replies; 26+ messages in thread
From: Marc Zyngier @ 2011-03-15 15:12 UTC (permalink / raw)
  To: linux-arm-kernel

This patch set adds support for the architected (or generic) timers
that appear in the Cortex A15. The specification is part of the
ARMv7-AR LPA Virtualization Extensions, available from (free
registration required):

http://infocenter.arm.com/help/topic/com.arm.doc.ddi0406b_virtualization_extns/index.html

They provide physical and virtual timers/counters (the later being
under control of the hypervisor). The code provides a clock source
(using the physical counter) and a sched_clock implementation (using
the virtual counter, so the local scheduling is not affected by having
multiple VMs scheduled in and out of the CPU by the hypervisor).

Modifications are relatively invasive:

- The timer interrupt is on IRQ 29 or 30, depending on whether the
  kernel is running in secure or normal mode. As it is not possible to
  distinguish between the two modes in a reliable way, we have to
  check if we're running on an A15 or not (the feature register may be
  virtualized, and thus potentially expensive to access).
- Local timer is also used in an UP configuration, so the local timer
  code is isolated from SMP support.
- A registration interface is introduced to allow a platform to pick
  its preferred implementation (architected timers, twd, msm local
  timers...). This causes some code churn in the platform specific
  code as the registration mechanism takes place at runtime instead of
  having a link time selection (local_timer_setup).
- Broadcast timers become the fallback in case no local timers are
  available.
- Allow the kernel to have multiple sched_clock() implementations
  compiled in, and extend the existing API to register one at
  runtime.

On the (emulated) Versatile Express platform, the A15 is running
without the SP804 that is usually used across the whole Versatile
range. The same binary kernel also runs on the Cortex A5 tile using
TWD and SP804 (both patch sets to be posted shortly).

Patches #1, 9, 10 and 11 carry the core modifications. All the others
are platform support changes and various cleanups. This patch set
depends on Will Deacon's multi-tile patch. Tested on next-20110314.

Any comments are welcome.

Changelog:
* From v1:
  - Fix typo in the msm platform code (noticed by David Brown)
  - Fix a few TWD setup function signatures
  - Convert Samsung MCT (exynos4) to the new local timer API

Marc Zyngier (20):
  ARM: architected timers: move local timer support to percpu_timer.c
  ARM: omap2: remove stubbed twd_timer_setup call
  ARM: exynos4: remove stubbed twd_timer_setup call
  ARM: shmobile: remove stubbed twd_timer_setup call
  ARM: tegra: remove stubbed twd_timer_setup call
  ARM: ux500: remove stubbed twd_timer_setup call
  ARM: versatile: remove stubbed twd_timer_setup call
  ARM: remove unused twd_timer_setup stub
  ARM: architected timers: add A15 architected timers
  ARM: Platform dependent sched_clock() override
  ARM: architected timers: Add A15 specific sched_clock implementation
  ARM: versatile/vexpress: rework timer support
  ARM: msm: dynamically register local timer setup function
  ARM: omap4: dynamically register local timer setup function
  ARM: exynos4: dynamically register local timer setup function
  ARM: shmobile: dynamically register local timer setup function
  ARM: tegra: dynamically register local timer setup function
  ARM: ux500: dynamically register local timer setup function
  ARM: simplify percpu_timer_setup
  ARM: simplify percpu_timer_ack

 arch/arm/Kconfig                                  |   20 ++-
 arch/arm/include/asm/arch_timer.h                 |   13 +
 arch/arm/include/asm/entry-macro-multi.S          |    2 +-
 arch/arm/include/asm/hardware/entry-macro-gic.S   |   18 ++
 arch/arm/include/asm/localtimer.h                 |   61 +++--
 arch/arm/include/asm/sched_clock.h                |   41 +++-
 arch/arm/include/asm/smp.h                        |    7 +-
 arch/arm/include/asm/smp_twd.h                    |   14 +-
 arch/arm/kernel/Makefile                          |    2 +
 arch/arm/kernel/arch_timer.c                      |  253 +++++++++++++++++++++
 arch/arm/kernel/irq.c                             |    1 +
 arch/arm/kernel/percpu_timer.c                    |  141 ++++++++++++
 arch/arm/kernel/sched_clock.c                     |   23 ++-
 arch/arm/kernel/smp.c                             |   92 +-------
 arch/arm/kernel/smp_twd.c                         |   21 ++-
 arch/arm/mach-exynos4/Makefile                    |    1 -
 arch/arm/mach-exynos4/localtimer.c                |   26 --
 arch/arm/mach-exynos4/mct.c                       |   22 ++-
 arch/arm/mach-exynos4/time.c                      |   10 +
 arch/arm/mach-msm/timer.c                         |   22 ++-
 arch/arm/mach-omap2/Makefile                      |    1 -
 arch/arm/mach-omap2/timer-gp.c                    |   13 +-
 arch/arm/mach-omap2/timer-mpu.c                   |   39 ----
 arch/arm/mach-realview/realview_eb.c              |    4 +-
 arch/arm/mach-realview/realview_pb11mp.c          |    4 +-
 arch/arm/mach-realview/realview_pbx.c             |    5 +-
 arch/arm/mach-shmobile/Makefile                   |    1 -
 arch/arm/mach-shmobile/localtimer.c               |   26 --
 arch/arm/mach-shmobile/timer.c                    |   13 +
 arch/arm/mach-tegra/Makefile                      |    2 +-
 arch/arm/mach-tegra/localtimer.c                  |   26 --
 arch/arm/mach-tegra/timer.c                       |   11 +
 arch/arm/mach-ux500/Makefile                      |    1 -
 arch/arm/mach-ux500/cpu.c                         |   13 +
 arch/arm/mach-ux500/localtimer.c                  |   29 ---
 arch/arm/mach-vexpress/v2m.c                      |   29 +++-
 arch/arm/plat-versatile/include/plat/localtimer.h |    9 +
 arch/arm/plat-versatile/localtimer.c              |   11 +-
 arch/arm/plat-versatile/sched-clock.c             |    7 +-
 39 files changed, 730 insertions(+), 304 deletions(-)
 create mode 100644 arch/arm/include/asm/arch_timer.h
 create mode 100644 arch/arm/kernel/arch_timer.c
 create mode 100644 arch/arm/kernel/percpu_timer.c
 delete mode 100644 arch/arm/mach-exynos4/localtimer.c
 delete mode 100644 arch/arm/mach-omap2/timer-mpu.c
 delete mode 100644 arch/arm/mach-shmobile/localtimer.c
 delete mode 100644 arch/arm/mach-tegra/localtimer.c
 delete mode 100644 arch/arm/mach-ux500/localtimer.c
 create mode 100644 arch/arm/plat-versatile/include/plat/localtimer.h

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2011-04-11  8:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15 15:12 [RFC PATCHv2 00/20] A15 architected timer support Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 01/20] ARM: architected timers: move local timer support to percpu_timer.c Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 02/20] ARM: omap2: remove stubbed twd_timer_setup call Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 03/20] ARM: exynos4: " Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 04/20] ARM: shmobile: " Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 05/20] ARM: tegra: " Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 06/20] ARM: ux500: " Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 07/20] ARM: versatile: " Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 08/20] ARM: remove unused twd_timer_setup stub Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 09/20] ARM: architected timers: add A15 architected timers Marc Zyngier
2011-04-09  2:47   ` Stephen Boyd
2011-04-11  8:31     ` Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 10/20] ARM: Platform dependent sched_clock() override Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 11/20] ARM: architected timers: Add A15 specific sched_clock implementation Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 12/20] ARM: versatile/vexpress: rework timer support Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 13/20] ARM: msm: dynamically register local timer setup function Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 14/20] ARM: omap4: " Marc Zyngier
2011-03-16  5:55   ` [RFC PATCHv2 14/20] ARM: omap4: dynamically register local timersetup function Santosh Shilimkar
2011-03-16 10:03     ` Marc Zyngier
2011-03-17 10:12       ` Santosh Shilimkar
2011-03-15 15:12 ` [RFC PATCHv2 15/20] ARM: exynos4: dynamically register local timer setup function Marc Zyngier
2011-03-15 15:12 ` [RFC PATCHv2 16/20] ARM: shmobile: " Marc Zyngier
2011-03-15 15:13 ` [RFC PATCHv2 17/20] ARM: tegra: " Marc Zyngier
2011-03-15 15:13 ` [RFC PATCHv2 18/20] ARM: ux500: " Marc Zyngier
2011-03-15 15:13 ` [RFC PATCHv2 19/20] ARM: simplify percpu_timer_setup Marc Zyngier
2011-03-15 15:13 ` [RFC PATCHv2 20/20] ARM: simplify percpu_timer_ack Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.