- 15 12月, 2015 6 次提交
-
-
由 Daniel Lezcano 提交于
Increase the compilation test coverage by adding the COMPILE_TEST option. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
Increase the compilation test coverage by adding the COMPILE_TEST option. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
Instead of having the clocksource's Kconfig depending on the arch, let the arch to select the timer it needs. The CLKSRC_OF dependency is removed because already selected by the ARCH_PXA, and it is added for SA1100. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
Increase the compilation test coverage by adding the COMPILE_TEST option. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
Change the Kconfig selection rule by letting the STI arch to select the timer. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Acked-by: NMaxime Coquelin <maxime.coquelin@st.com>
-
由 Daniel Lezcano 提交于
In order to be consistent with the rest of the drivers compilation, let's introduce the COMPILE_TEST option. Unfortunately, the delay.h code is not portable, so the compilation test coverage will be restricted to the ARM architecture. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
- 17 11月, 2015 1 次提交
-
-
由 Arnd Bergmann 提交于
We can now select clocksource drivers like ti-32k and CONFIG_OF on ancient machines that still use gettimeoffset, and the combination results in a link error. arch/arm/kernel/built-in.o: In function `time_init': (.init.text+0xc28): undefined reference to `clocksource_probe' The reason for this is that the Makefile is hidden behind CONFIG_ARCH_USES_GETTIMEOFFSET, but the Kconfig file is not, and it has shown up just now because the ti-32k driver was added and can be selected using COMPILE_TEST on all platforms. This patch hides the Kconfig menu in CONFIG_ARCH_USES_GETTIMEOFFSET as well. Fixes: dfedaf10 "clocksource: ti-32k: make it depend on GENERIC_CLOCKSOURCE" Signed-off-by: NArnd Bergmann <arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org Cc: Felipe Balbi <balbi@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Link: http://lkml.kernel.org/r/7579471.4N90fYPQOK@wuerfelSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 17 10月, 2015 2 次提交
-
-
由 Felipe Balbi 提交于
the new ti 32k clocksource driver should depend on GENERIC_CLOCKSOURCE because of its reliance on sched_clock_register(). Let's enable that to avoid any possible build errors and/or warnings on randbuilds. Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Felipe Balbi 提交于
Introduce a new clocksource driver for Texas Instruments 32.768 Hz device which is available on most OMAP-like devices. Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 16 10月, 2015 1 次提交
-
-
由 Marc Gonzalez 提交于
Sigma Designs Tango platforms provide a 27 MHz crystal oscillator. Use it for clocksource, sched_clock, and delay_timer. Signed-off-by: NMarc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
- 01 10月, 2015 2 次提交
-
-
由 Marc Zyngier 提交于
It is now absolutely trivial to convert the arch timer driver to use ACPI probing, just like its DT counterpart. Let's enjoy another crapectomy. Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com> Acked-by: NCatalin Marinas <catalin.marinas@arm.com> Acked-by: NThomas Gleixner <tglx@linutronix.de> Tested-by: NHanjun Guo <hanjun.guo@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Marc Zyngier 提交于
The clocksource probing infrastructure currently depends on CONFIG_CLKSRC_OF, which depends on CONFIG_OF. In order to make this infrastructure selectable even if CONFIG_OF is not selected, introduce a new CONFIG_CLKSRC_PROBE (which allow the infrastructure to be compiled in), and CONFIG_CLKSRC_ACPI (which is the pendent of CONFIG_CLKSRC_OF for ACPI). Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com> Acked-by: NThomas Gleixner <tglx@linutronix.de> Tested-by: NHanjun Guo <hanjun.guo@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 03 9月, 2015 1 次提交
-
-
由 Ezequiel Garcia 提交于
The Pistachio SoC provides four general purpose timers, and allow to implement a clocksource driver. This driver can be used as a replacement for the MIPS GIC and MIPS R4K clocksources and sched clocks, which are clocked from the CPU clock. Given the general purpose timers are clocked from an independent clock, this new clocksource driver will be useful to introduce CPUFreq support for Pistachio machines. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: NGovindraj Raja <govindraj.raja@imgtec.com> Reviewed-by: NThomas Gleixner <tglx@linutronix.de> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: Andrew Bresticker <abrestic@chromium.org> Cc: James Hartley <James.Hartley@imgtec.com> Cc: Damien Horsley <Damien.Horsley@imgtec.com> Cc: James Hogan <James.Hogan@imgtec.com> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Patchwork: https://patchwork.linux-mips.org/patch/10899/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 10 8月, 2015 1 次提交
-
-
由 Antonio Borneo 提交于
USE_OF is used as intermediate Kconfig option by few arch's (ARM, MIPS, Xtensa); in all these cases it implies setting option OF too. Replace the only instance of USE_OF in clocksource with OF. Signed-off-by: NAntonio Borneo <borneo.antonio@gmail.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
- 24 7月, 2015 1 次提交
-
-
由 Lee Jones 提交于
This IP is shared with Watchdog and RTC functionality. All 3 of these devices are mutually exclusive from one another i.e. Only 1 IP can be used at any given time. We use the device-driver model combined with a DT 'mode' property to enforce this. The ST LPC Clocksource IP can be used as the system (tick) timer. Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 24 6月, 2015 1 次提交
-
-
由 Guenter Roeck 提交于
mips:allmodconfig fails to build with drivers/clocksource/timer-sp804.c: In function '__sp804_clocksource_and_sched_clock_init': drivers/clocksource/timer-sp804.c:88:3: error: implicit declaration of function 'clk_get_sys' because CLKDEV_LOOKUP is not configured and the driver depends on it. Fixes: 0b7402dc ("ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource") Acked-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 23 6月, 2015 1 次提交
-
-
由 Yoshinori Sato 提交于
h8300_timer8: 8bit clockevent device h8300_timer16 / h8300_tpu: 16bit clocksource Signed-off-by: NYoshinori Sato <ysato@users.sourceforge.jp>
-
- 22 6月, 2015 1 次提交
-
-
由 Paul Gortmaker 提交于
This driver leaks out into arch/parisc builds that don't have CONFIG_GENERIC_CLOCKEVENTS, leading to the following (truncated) wreckage: CC drivers/clocksource/timer-stm32.o drivers/clocksource/timer-stm32.c:38:28: error: field 'evtdev' has incomplete type drivers/clocksource/timer-stm32.c:44:19: warning: 'enum clock_event_mode' declared inside parameter list drivers/clocksource/timer-stm32.c:44:19: warning: its scope is only this definition or declaration, which is probably not what you want drivers/clocksource/timer-stm32.c:43:62: error: parameter 1 ('mode') has incomplete type drivers/clocksource/timer-stm32.c:43:13: error: function declaration isn't a prototype drivers/clocksource/timer-stm32.c: In function 'stm32_clock_event_set_mode': drivers/clocksource/timer-stm32.c:47:3: error: type defaults to 'int' in declaration of '__mptr' drivers/clocksource/timer-stm32.c:47:3: warning: initialization from incompatible pointer type drivers/clocksource/timer-stm32.c:51:7: error: 'CLOCK_EVT_MODE_PERIODIC' undeclared (first use in this function) drivers/clocksource/timer-stm32.c:51:7: note: each undeclared identifier is reported only once for each function it appears in drivers/clocksource/timer-stm32.c:56:7: error: 'CLOCK_EVT_MODE_ONESHOT' undeclared (first use in this function) Tighten up the dependencies to limit where it gets built by copying the style of the Kconfig line for CLKSRC_EFM32 a few lines above. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Chanwoo Choi <cw00.choi@samsung.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Link: http://lkml.kernel.org/r/1434841352-24300-1-git-send-email-paul.gortmaker@windriver.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 03 6月, 2015 1 次提交
-
-
由 Shawn Guo 提交于
After the cleanup on imx timer driver, now it's ready to be moved into drivers/clocksource/. Let's do it. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
- 02 6月, 2015 5 次提交
-
-
由 Maxime Coquelin 提交于
STM32 MCUs feature 16 and 32 bits general purpose timers with prescalers. The drivers detects whether the time is 16 or 32 bits, and applies a 1024 prescaler value if it is 16 bits. Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMaxime Coquelin <mcoquelin.stm32@gmail.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Maxime Coquelin 提交于
This patch adds clocksource support for ARMv7-M's System timer, also known as SysTick. Tested-by: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NMaxime Coquelin <mcoquelin.stm32@gmail.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Joachim Eastwood 提交于
Add support for using the NXP LPC timer as clocksource and clock event. These timers are present on many NXP devices including LPC32xx, LPC17xx, LPC18xx and LPC43xx. The timer has a 32-bit timer counter register with a programmable 32-bit prescaler. It supports up to 4 compare match values with interrupt generation and reset/stop timer counter action. Signed-off-by: NJoachim Eastwood <manabian@gmail.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: NArnd Bergmann <arnd@arndb.de>
-
由 Sudeep Holla 提交于
Commit 5261ef2ea836 ("ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource") moved SP804 to drivers/clocksource resulting in it being selectable on platforms/architectures without the config GENERIC_SCHED_CLOCK enabled. Due to that, it results in the following build failure(e.g. x86_64 allmodconfig) drivers/built-in.o: In function `__sp804_clocksource_and_sched_clock_init': (.init.text+0x1a0e7): undefined reference to `sched_clock_register' This patch fixes the build by making ARM_TIMER_SP804 depend on GENERIC_SCHED_CLOCK Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Sudeep Holla 提交于
The ARM Dual-Timer SP804 module is peripheral found not only on ARM32 platforms but also on ARM64 platforms. This patch moves the driver out of arch/arm to driver/clocksource so that it can be used on ARM64 platforms also. Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Rob Herring <robh@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Olof Johansson <olof@lixom.net> Acked-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 06 4月, 2015 1 次提交
-
-
由 Alexandre Belloni 提交于
Enforce MFD_SYSCON selection as the driver needs it. Else, it will still compile with some warning about X1, x2 or sr being used uninitialized. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
- 01 4月, 2015 1 次提交
-
-
由 Deng-Cheng Zhu 提交于
GENERIC_SCHED_CLOCK can be selected by architectures other than ARM. The current dependencies of CLKSRC_VERSATILE make it possible that other architectures will have CLKSRC_VERSATILE available in configuration once they select GENERIC_SCHED_CLOCK, whereas this clock source should be solely available to ARM in reality. This patch adds one more dependency to CLKSRC_VERSATILE to fix the issue. Signed-off-by: NDeng-Cheng Zhu <dengcheng.zhu@imgtec.com> Reported-by: NMaciej W. Rozycki <macro@linux-mips.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: LKML <linux-kernel@vger.kernel.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9476/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 26 3月, 2015 1 次提交
-
-
由 Richard Weinberger 提交于
Fix !CONFIG_HAS_IOMEM related build failures in three clocksource drivers. The build failures have the pattern of: drivers/clocksource/sh_cmt.c: In function ‘sh_cmt_map_memory’: drivers/clocksource/sh_cmt.c:920:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration] cmt->mapbase = ioremap_nocache(mem->start, resource_size(mem)); Signed-off-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Cc: maxime.ripard@free-electrons.com Link: http://lkml.kernel.org/r/1427362029-6511-1-git-send-email-daniel.lezcano@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
-
- 17 3月, 2015 1 次提交
-
-
由 Alexandre Belloni 提交于
Import at91rm9200_time.c from mach-at91 as timer-atmel-st.c. Further cleanup is required to get rid of the mach-at91 headers. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
-
- 25 2月, 2015 1 次提交
-
-
由 Daniel Lezcano 提交于
The Kconfig options for the asm9260 timer is wrong as it can be selected by another platform with allyes config and thus leading to a compilation failure as some non arch related code is pulled by the compilation. Fix this by having the platform Kconfig to select the timer as it is done for the others drivers. Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Acked-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NOleksij Rempel <linux@rempel-privat.de> Conflicts: drivers/clocksource/Kconfig
-
- 29 1月, 2015 3 次提交
-
-
由 Baruch Siach 提交于
Add clocksource driver to the Conexant CX92755 SoC, part of the Digicolor SoCs series. Hardware provides 8 timers, A to H. Timer A is dedicated to a future watchdog driver so we don't use it here. Use timer B for sched_clock, and timer C for clock_event. Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
由 Daniel Lezcano 提交于
The rk3288 board uses the architected timers and these ones are shutdown when the cpu is powered down. There is a need of a broadcast timer in this case to ensure proper wakeup when the cpus are in sleep mode and a timer expires. This driver provides the basic timer functionnality as a backup for the local timers at sleep time. The timer belongs to the alive subsystem. It includes two programmables 64 bits timer channels but the driver only uses 32bits. It works with two operations mode: free running and user defined count. Programing sequence: 1. Timer initialization: * Disable the timer by writing '0' to the CONTROLREG register * Program the timer mode by writing the mode to the CONTROLREG register * Set the interrupt mask 2. Setting the count value: * Load the count value to the registers COUNT0 and COUNT1 (not used). 3. Enable the timer * Write '1' to the CONTROLREG register with the mode (free running or user) Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NHeiko Stuebner <heiko@sntech.de>
-
由 Oleksij Rempel 提交于
In some cases asm9260 looks similar to iMX2x. One of exceptions is timer controller. So this patch introduces new driver for this special case. Signed-off-by: NOleksij Rempel <linux@rempel-privat.de> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-
- 14 1月, 2015 1 次提交
-
-
由 Dmitry Eremin-Solenikov 提交于
SA-11x0 platform used the same IP block as was used on PXA. Consequently it makes sense to have only one driver. Enable pxa_timer clocksource for StrongARM platform. Signed-off-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com> Acked-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 09 1月, 2015 1 次提交
-
-
由 Thierry Reding 提交于
Instead of directly using the ARCH_TEGRA Kconfig symbol to enable this driver, add a new, non-user-visible Kconfig symbol (TEGRA_TIMER) which can be selected by the various SoCs. This is useful to disable building the driver on Tegra132 (64-bit ARM) where it doesn't currently compile but also isn't needed (yet). Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NThierry Reding <treding@nvidia.com>
-
- 24 11月, 2014 2 次提交
-
-
由 Andrew Bresticker 提交于
Parse the GIC timer frequency and interrupt from the device-tree. Signed-off-by: NAndrew Bresticker <abrestic@chromium.org> Acked-by: NArnd Bergmann <arnd@arndb.de> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: John Crispin <blogic@openwrt.org> Cc: David Daney <ddaney.cavm@gmail.com> Cc: Qais Yousef <qais.yousef@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8421/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Andrew Bresticker 提交于
Move the GIC clocksource driver to drivers/clocksource/mips-gic-timer.c. Signed-off-by: NAndrew Bresticker <abrestic@chromium.org> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Qais Yousef <qais.yousef@imgtec.com> Cc: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8133/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 18 11月, 2014 1 次提交
-
-
由 Beniamino Galvani 提交于
Select CLKSRC_MMIO when the meson6_timer driver is enabled since it depends on clocksource MMIO functions. Signed-off-by: NBeniamino Galvani <b.galvani@gmail.com> Signed-off-by: NCarlo Caione <carlo@caione.org>
-
- 29 9月, 2014 1 次提交
-
-
由 Carlo Caione 提交于
Meson6 SoCs are equipped with 5 32-bit timers, called TIMER_A, TIMER_B, TIMER_C, TIMER_D and TIMER_E. The driver is providing clocksource support for the 32-bit counter using TIMER_E. Clockevents are also supported using TIMER_A. Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NCarlo Caione <carlo@caione.org> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com>
-
- 15 9月, 2014 1 次提交
-
-
由 Maxime Ripard 提交于
Now that we don't depend on anyting in the mach-at91 directory, we can just move the driver to where it belongs. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Acked-by: NBoris BREZILLON <boris.brezillon@free-electrons.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Conflicts: arch/arm/mach-at91/Kconfig arch/arm/mach-at91/Makefile
-
- 23 7月, 2014 1 次提交
-
-
由 Doug Anderson 提交于
The MCT has a nice 64-bit counter. That means that we _can_ register as a 64-bit clocksource and sched_clock. ...but that doesn't mean we should. The 64-bit counter is read by reading two 32-bit registers. That means reading needs to be something like: - Read upper half - Read lower half - Read upper half and confirm that it hasn't changed. That wouldn't be terrible, but: - THe MCT isn't very fast to access (hundreds of nanoseconds). - The clocksource is queried _all the time_. In total system profiles of real workloads on ChromeOS, we've seen exynos_frc_read() taking 2% or more of CPU time even after optimizing the 3 reads above to 2 (see below). The MCT is clocked at ~24MHz on all known systems. That means that the 32-bit half of the counter rolls over every ~178 seconds. This inspired an optimization in ChromeOS to cache the upper half between calls, moving 3 reads to 2. ...but we can do better! Having a 32-bit timer that flips every 178 seconds is more than sufficient for Linux. Let's just use the lower half of the MCT. Times on 5420 to do 1000000 gettimeofday() calls from userspace: * Original code: 1323852 us * ChromeOS cache upper half: 1173084 us * ChromeOS + ldmia to optimize: 1045674 us * Use lower 32-bit only (this code): 1014429 us As you can see, the time used doesn't increase linearly with the number of reads and we can make 64-bit work almost as fast as 32-bit with a bit of assembly code. But since there's no real gain for 64-bit, let's go with the simplest and fastest implementation. Note: with this change roughly half the time for gettimeofday() is spent in exynos_frc_read(). The rest is timer / system call overhead. Also note: this patch disables the use of the MCT on ARM64 systems until we've sorted out how to make "cycles_t" always 32-bit. Really ARM64 systems should be using arch timers anyway. Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: NKukjin Kim <kgene.kim@samsung.com> Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
-