linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/16] Consolidation: move SMP local timers to driver/clocksource
@ 2011-06-16 19:06 Marc Zyngier
  2011-06-16 19:06 ` [RFC PATCH 01/16] ARM: local timers: early device probing hooks Marc Zyngier
                   ` (17 more replies)
  0 siblings, 18 replies; 46+ messages in thread
From: Marc Zyngier @ 2011-06-16 19:06 UTC (permalink / raw)
  To: linux-arm-kernel

The arch/arm tree contains several SMP local timer implementations
(smp_twd, Exynos4 mct, and the msm timer, with more to come), and the
word these days is that they should be moved to the driver directory.

Furthermore, the current core implementation makes it impossible to
compile a kernel with several SMP local timer implementations, as the
core code directly calls into the driver code.

This series moves these three drivers to driver/clocksource, with the
following changes:
- They are converted to platform devices, and registered as early devices.
- CPU notifiers are used to start/stop the timers on secondary cores.

Each platform registers an early platform device with the associated
resources (memory, interrupts). At the core level, an early device
probe hook is installed, and binds devices and drivers if
possible. The broadcast timer is always registered by the core code,
and is used by the kernel if no other timer is available.

Small side effect on the mpcode_wdt watchdog driver, who used to share
an include file with smp_twd, and now has a private copy of the
definition of few registers it needs.

It should be relatively easy to move other (non SMP)
timers/clocksources the same way, as it's already been done for
shmobile. Furthermore, it is now straightforward to convert these
platform devices to OF devices, and plug everything into the device
tree.

Patches against next-20110615 + my earlier GIC-PPI series. Tested on
VExpress, PB11MP, Pandaboard, Tegra Harmony and Exynos4 SMDK-v310.

Thomas and Arnd cc-ed on the whole series, as this could be
consolidation material.

As always, comments welcome.

Marc Zyngier (16):
  ARM: local timers: early device probing hooks
  ARM: local timers: add arm_smp_twd driver to driver/clocksource
  ARM: local timers: move realview to LOCAL_TIMER_DEVICES/ARM_SMP_TWD
  ARM: local timers: move vexpress to LOCAL_TIMER_DEVICES/ARM_SMP_TWD
  ARM: local timers: remove localtimer.c from plat-versatile
  ARM: local timers: move Tegra to LOCAL_TIMER_DEVICES/ARM_SMP_TWD
  ARM: local timers: move OMAP4 to LOCAL_TIMER_DEVICES/ARM_SMP_TWD
  ARM: local timers: move shmobile to LOCAL_TIMER_DEVICES/ARM_SMP_TWD
  ARM: local timers: move ux500 to LOCAL_TIMER_DEVICES/ARM_SMP_TWD
  ARM: local timers: add exynos_mct driver to driver/clocksource
  ARM: local timers: move exynos4 to
    LOCAL_TIMER_DEVICES/EXYNOS_MCT/ARM_SMP_TWD
  ARM: watchdog: make mpcore_wdt independant from asm/smp_twd.h
  ARM: local timers: remove smp_twd from arch/arm
  ARM: local timers: add msm_timer driver to driver/clocksource
  ARM: local timers: move msm to LOCAL_TIMER_DEVICES/MSM_TIMER
  ARM: local timers: remove local timer support from arch/arm

 arch/arm/Kconfig                         |   19 +--
 arch/arm/include/asm/localtimer.h        |   58 -----
 arch/arm/include/asm/mach/time.h         |    1 +
 arch/arm/include/asm/smp_twd.h           |   28 ---
 arch/arm/kernel/Makefile                 |    1 -
 arch/arm/kernel/smp.c                    |   70 ++-----
 arch/arm/kernel/smp_twd.c                |  163 --------------
 arch/arm/kernel/time.c                   |   15 ++
 arch/arm/mach-exynos4/Kconfig            |    2 +
 arch/arm/mach-exynos4/Makefile           |    1 -
 arch/arm/mach-exynos4/localtimer.c       |   27 ---
 arch/arm/mach-exynos4/mct.c              |  197 +----------------
 arch/arm/mach-exynos4/time.c             |   33 +++-
 arch/arm/mach-msm/Kconfig                |   10 +
 arch/arm/mach-msm/timer.c                |  290 +------------------------
 arch/arm/mach-omap2/Kconfig              |    3 +-
 arch/arm/mach-omap2/Makefile             |    1 -
 arch/arm/mach-omap2/timer-gp.c           |   40 +++-
 arch/arm/mach-omap2/timer-mpu.c          |   40 ----
 arch/arm/mach-realview/Kconfig           |    8 +
 arch/arm/mach-realview/realview_eb.c     |   31 +++-
 arch/arm/mach-realview/realview_pb11mp.c |   30 +++-
 arch/arm/mach-realview/realview_pbx.c    |   31 +++-
 arch/arm/mach-shmobile/Kconfig           |    2 +
 arch/arm/mach-shmobile/Makefile          |    1 -
 arch/arm/mach-shmobile/localtimer.c      |   27 ---
 arch/arm/mach-shmobile/platsmp.c         |    1 -
 arch/arm/mach-shmobile/setup-sh73a0.c    |   21 ++
 arch/arm/mach-shmobile/smp-sh73a0.c      |    6 -
 arch/arm/mach-shmobile/timer.c           |    2 +-
 arch/arm/mach-tegra/Kconfig              |    2 +
 arch/arm/mach-tegra/Makefile             |    2 +-
 arch/arm/mach-tegra/localtimer.c         |   27 ---
 arch/arm/mach-tegra/timer.c              |   32 +++-
 arch/arm/mach-ux500/Kconfig              |    2 +
 arch/arm/mach-ux500/Makefile             |    1 -
 arch/arm/mach-ux500/cpu-db5500.c         |    1 -
 arch/arm/mach-ux500/cpu-db8500.c         |    1 -
 arch/arm/mach-ux500/cpu.c                |   38 +++-
 arch/arm/mach-ux500/localtimer.c         |   30 ---
 arch/arm/mach-vexpress/Kconfig           |    2 +
 arch/arm/mach-vexpress/ct-ca9x4.c        |   30 +++-
 arch/arm/plat-s5p/s5p-time.c             |    1 -
 arch/arm/plat-versatile/Makefile         |    1 -
 arch/arm/plat-versatile/localtimer.c     |   28 ---
 drivers/clocksource/Kconfig              |    6 +
 drivers/clocksource/Makefile             |    3 +
 drivers/clocksource/arm_smp_twd.c        |  265 +++++++++++++++++++++++
 drivers/clocksource/exynos4_mct.c        |  283 ++++++++++++++++++++++++
 drivers/clocksource/msm_timer.c          |  345 ++++++++++++++++++++++++++++++
 drivers/watchdog/Kconfig                 |    2 +-
 drivers/watchdog/mpcore_wdt.c            |    7 +-
 52 files changed, 1239 insertions(+), 1029 deletions(-)
 delete mode 100644 arch/arm/include/asm/localtimer.h
 delete mode 100644 arch/arm/include/asm/smp_twd.h
 delete mode 100644 arch/arm/kernel/smp_twd.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
 delete mode 100644 arch/arm/plat-versatile/localtimer.c
 create mode 100644 drivers/clocksource/arm_smp_twd.c
 create mode 100644 drivers/clocksource/exynos4_mct.c
 create mode 100644 drivers/clocksource/msm_timer.c

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

end of thread, other threads:[~2011-06-27  4:53 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 19:06 [RFC PATCH 00/16] Consolidation: move SMP local timers to driver/clocksource Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 01/16] ARM: local timers: early device probing hooks Marc Zyngier
2011-06-17 14:56   ` Arnd Bergmann
2011-06-17 15:13     ` Marc Zyngier
2011-06-17 16:10       ` Arnd Bergmann
2011-06-16 19:06 ` [RFC PATCH 02/16] ARM: local timers: add arm_smp_twd driver to driver/clocksource Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 03/16] ARM: local timers: move realview to LOCAL_TIMER_DEVICES/ARM_SMP_TWD Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 04/16] ARM: local timers: move vexpress " Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 05/16] ARM: local timers: remove localtimer.c from plat-versatile Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 06/16] ARM: local timers: move Tegra to LOCAL_TIMER_DEVICES/ARM_SMP_TWD Marc Zyngier
2011-06-16 20:07   ` Stephen Warren
2011-06-16 20:22     ` Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 07/16] ARM: local timers: move OMAP4 " Marc Zyngier
2011-06-17  8:16   ` Santosh Shilimkar
2011-06-17  8:39     ` Marc Zyngier
2011-06-17  8:42       ` Santosh Shilimkar
2011-06-16 19:06 ` [RFC PATCH 08/16] ARM: local timers: move shmobile " Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 09/16] ARM: local timers: move ux500 " Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 10/16] ARM: local timers: add exynos_mct driver to driver/clocksource Marc Zyngier
2011-06-17 15:09   ` Arnd Bergmann
2011-06-17 15:17     ` Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 11/16] ARM: local timers: move exynos4 to LOCAL_TIMER_DEVICES/EXYNOS_MCT/ARM_SMP_TWD Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 12/16] ARM: watchdog: make mpcore_wdt independant from asm/smp_twd.h Marc Zyngier
2011-06-17  7:08   ` Wim Van Sebroeck
2011-06-17  8:04     ` Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 13/16] ARM: local timers: remove smp_twd from arch/arm Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 14/16] ARM: local timers: add msm_timer driver to driver/clocksource Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 15/16] ARM: local timers: move msm to LOCAL_TIMER_DEVICES/MSM_TIMER Marc Zyngier
2011-06-16 19:06 ` [RFC PATCH 16/16] ARM: local timers: remove local timer support from arch/arm Marc Zyngier
2011-06-17 11:00 ` [RFC PATCH 00/16] Consolidation: move SMP local timers to driver/clocksource Linus Walleij
2011-06-17 13:27   ` Marc Zyngier
2011-06-20  8:21     ` Linus Walleij
2011-06-17 15:07 ` Arnd Bergmann
2011-06-17 15:24   ` Marc Zyngier
2011-06-17 17:25   ` Rob Herring
2011-06-20  8:25     ` Marc Zyngier
2011-06-20  8:32       ` Russell King - ARM Linux
2011-06-22  0:54         ` Magnus Damm
2011-06-26  7:00         ` Grant Likely
2011-06-27  4:53           ` Magnus Damm
2011-06-21 11:13     ` Marc Zyngier
2011-06-21 12:51       ` Rob Herring
2011-06-21 13:02         ` Marc Zyngier
2011-06-21 13:18           ` Rob Herring
2011-06-21 13:46             ` Marc Zyngier
2011-06-20  8:23   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).