* [PATCH 2/4] clocksource: sh_mtu2: Fix !HAS_IOMEM build
2015-03-26 9:27 ` [PATCH 1/4] clocksource: sh_cmt: Fix !HAS_IOMEM build Daniel Lezcano
@ 2015-03-26 9:27 ` Daniel Lezcano
2015-03-26 9:27 ` [PATCH 3/4] clocksource: sh_tmu: " Daniel Lezcano
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2015-03-26 9:27 UTC (permalink / raw)
To: mingo, tglx; +Cc: maxime.ripard, richard, linux-kernel
From: Richard Weinberger <richard@nod.at>
Fixes:
drivers/clocksource/sh_mtu2.c: In function ‘sh_mtu2_map_memory’:
drivers/clocksource/sh_mtu2.c:391:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration]
mtu->mapbase = ioremap_nocache(res->start, resource_size(res));
^
drivers/clocksource/sh_mtu2.c:391:15: warning: assignment makes pointer from integer without a cast [enabled by default]
mtu->mapbase = ioremap_nocache(res->start, resource_size(res));
^
drivers/clocksource/sh_mtu2.c: In function ‘sh_mtu2_setup’:
drivers/clocksource/sh_mtu2.c:448:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(mtu->mapbase);
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/clocksource/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c948f4e..c4063a6 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -202,6 +202,7 @@ config SH_TIMER_CMT
config SH_TIMER_MTU2
bool "Renesas MTU2 timer driver" if COMPILE_TEST
depends on GENERIC_CLOCKEVENTS
+ depends on HAS_IOMEM
default SYS_SUPPORTS_SH_MTU2
help
This enables build of a clockevent driver for the Multi-Function
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] clocksource: sh_tmu: Fix !HAS_IOMEM build
2015-03-26 9:27 ` [PATCH 1/4] clocksource: sh_cmt: Fix !HAS_IOMEM build Daniel Lezcano
2015-03-26 9:27 ` [PATCH 2/4] clocksource: sh_mtu2: " Daniel Lezcano
@ 2015-03-26 9:27 ` Daniel Lezcano
2015-03-26 9:27 ` [PATCH 4/4] clocksource: sun5i: Fix cpufreq interaction with sched_clock Daniel Lezcano
2015-03-26 13:46 ` [tip:timers/urgent] clocksource/drivers: Fix various !CONFIG_HAS_IOMEM build errors tip-bot for Richard Weinberger
3 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2015-03-26 9:27 UTC (permalink / raw)
To: mingo, tglx; +Cc: maxime.ripard, richard, linux-kernel
From: Richard Weinberger <richard@nod.at>
Fixes:
drivers/clocksource/sh_tmu.c: In function ‘sh_tmu_map_memory’:
drivers/clocksource/sh_tmu.c:506:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration]
tmu->mapbase = ioremap_nocache(res->start, resource_size(res));
^
drivers/clocksource/sh_tmu.c:506:15: warning: assignment makes pointer from integer without a cast [enabled by default]
tmu->mapbase = ioremap_nocache(res->start, resource_size(res));
^
drivers/clocksource/sh_tmu.c: In function ‘sh_tmu_setup’:
drivers/clocksource/sh_tmu.c:598:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
iounmap(tmu->mapbase);
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/clocksource/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c4063a6..a0b036c 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -212,6 +212,7 @@ config SH_TIMER_MTU2
config SH_TIMER_TMU
bool "Renesas TMU timer driver" if COMPILE_TEST
depends on GENERIC_CLOCKEVENTS
+ depends on HAS_IOMEM
default SYS_SUPPORTS_SH_TMU
help
This enables build of a clocksource and clockevent driver for
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] clocksource: sun5i: Fix cpufreq interaction with sched_clock
2015-03-26 9:27 ` [PATCH 1/4] clocksource: sh_cmt: Fix !HAS_IOMEM build Daniel Lezcano
2015-03-26 9:27 ` [PATCH 2/4] clocksource: sh_mtu2: " Daniel Lezcano
2015-03-26 9:27 ` [PATCH 3/4] clocksource: sh_tmu: " Daniel Lezcano
@ 2015-03-26 9:27 ` Daniel Lezcano
2015-03-26 13:46 ` [tip:timers/urgent] clocksource/drivers/sun5i: Fix cpufreq interaction with sched_clock() tip-bot for Maxime Ripard
2015-03-26 13:46 ` [tip:timers/urgent] clocksource/drivers: Fix various !CONFIG_HAS_IOMEM build errors tip-bot for Richard Weinberger
3 siblings, 1 reply; 6+ messages in thread
From: Daniel Lezcano @ 2015-03-26 9:27 UTC (permalink / raw)
To: mingo, tglx; +Cc: maxime.ripard, richard, linux-kernel
From: Maxime Ripard <maxime.ripard@free-electrons.com>
The sched_clock we use on some system is this timer, and since we
started using cpufreq, the cpu clock (that is one of the timer's clock
indirect parent) now changes, along with the actual sched_clock rate.
We can safely remove the sched_clock on those systems, since we have
other reliable sched_clock in the system.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/clocksource/timer-sun5i.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
index 5dcbf90..58597fb 100644
--- a/drivers/clocksource/timer-sun5i.c
+++ b/drivers/clocksource/timer-sun5i.c
@@ -17,7 +17,6 @@
#include <linux/irq.h>
#include <linux/irqreturn.h>
#include <linux/reset.h>
-#include <linux/sched_clock.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
@@ -137,11 +136,6 @@ static struct irqaction sun5i_timer_irq = {
.dev_id = &sun5i_clockevent,
};
-static u64 sun5i_timer_sched_read(void)
-{
- return ~readl(timer_base + TIMER_CNTVAL_LO_REG(1));
-}
-
static void __init sun5i_timer_init(struct device_node *node)
{
struct reset_control *rstc;
@@ -172,7 +166,6 @@ static void __init sun5i_timer_init(struct device_node *node)
writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
timer_base + TIMER_CTL_REG(1));
- sched_clock_register(sun5i_timer_sched_read, 32, rate);
clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name,
rate, 340, 32, clocksource_mmio_readl_down);
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:timers/urgent] clocksource/drivers/sun5i: Fix cpufreq interaction with sched_clock()
2015-03-26 9:27 ` [PATCH 4/4] clocksource: sun5i: Fix cpufreq interaction with sched_clock Daniel Lezcano
@ 2015-03-26 13:46 ` tip-bot for Maxime Ripard
0 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Maxime Ripard @ 2015-03-26 13:46 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, tglx, maxime.ripard, hdegoede, mingo, daniel.lezcano
Commit-ID: 6e206020324c50a95486f6b279a53512febed92d
Gitweb: http://git.kernel.org/tip/6e206020324c50a95486f6b279a53512febed92d
Author: Maxime Ripard <maxime.ripard@free-electrons.com>
AuthorDate: Thu, 26 Mar 2015 10:27:09 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 26 Mar 2015 10:59:40 +0100
clocksource/drivers/sun5i: Fix cpufreq interaction with sched_clock()
The sun5i timer is used as the sched-clock on certain systems, and ever
since we started using cpufreq, the cpu clock (that is one of the
timer's clock indirect parent) now changes as well, along with the
actual sched_clock() rate.
This is not accurate and not desirable.
We can safely remove the sun5i sched-clock on those systems, since we
have other reliable sched_clock() sources in the system.
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
[ Improved the changelog. ]
Cc: richard@nod.at
Link: http://lkml.kernel.org/r/1427362029-6511-4-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/clocksource/timer-sun5i.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
index 5dcbf90..58597fb 100644
--- a/drivers/clocksource/timer-sun5i.c
+++ b/drivers/clocksource/timer-sun5i.c
@@ -17,7 +17,6 @@
#include <linux/irq.h>
#include <linux/irqreturn.h>
#include <linux/reset.h>
-#include <linux/sched_clock.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
@@ -137,11 +136,6 @@ static struct irqaction sun5i_timer_irq = {
.dev_id = &sun5i_clockevent,
};
-static u64 sun5i_timer_sched_read(void)
-{
- return ~readl(timer_base + TIMER_CNTVAL_LO_REG(1));
-}
-
static void __init sun5i_timer_init(struct device_node *node)
{
struct reset_control *rstc;
@@ -172,7 +166,6 @@ static void __init sun5i_timer_init(struct device_node *node)
writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
timer_base + TIMER_CTL_REG(1));
- sched_clock_register(sun5i_timer_sched_read, 32, rate);
clocksource_mmio_init(timer_base + TIMER_CNTVAL_LO_REG(1), node->name,
rate, 340, 32, clocksource_mmio_readl_down);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:timers/urgent] clocksource/drivers: Fix various !CONFIG_HAS_IOMEM build errors
2015-03-26 9:27 ` [PATCH 1/4] clocksource: sh_cmt: Fix !HAS_IOMEM build Daniel Lezcano
` (2 preceding siblings ...)
2015-03-26 9:27 ` [PATCH 4/4] clocksource: sun5i: Fix cpufreq interaction with sched_clock Daniel Lezcano
@ 2015-03-26 13:46 ` tip-bot for Richard Weinberger
3 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Richard Weinberger @ 2015-03-26 13:46 UTC (permalink / raw)
To: linux-tip-commits
Cc: daniel.lezcano, mingo, tglx, richard, geert+renesas, hpa, linux-kernel
Commit-ID: 11bc26fe372fa6da81c82c68f755d2795838a640
Gitweb: http://git.kernel.org/tip/11bc26fe372fa6da81c82c68f755d2795838a640
Author: Richard Weinberger <richard@nod.at>
AuthorDate: Thu, 26 Mar 2015 10:27:06 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 26 Mar 2015 10:59:40 +0100
clocksource/drivers: Fix various !CONFIG_HAS_IOMEM build errors
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: Richard Weinberger <richard@nod.at>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Geert 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.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/clocksource/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 68161f7..a0b036c 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -192,6 +192,7 @@ config SYS_SUPPORTS_EM_STI
config SH_TIMER_CMT
bool "Renesas CMT timer driver" if COMPILE_TEST
depends on GENERIC_CLOCKEVENTS
+ depends on HAS_IOMEM
default SYS_SUPPORTS_SH_CMT
help
This enables build of a clocksource and clockevent driver for
@@ -201,6 +202,7 @@ config SH_TIMER_CMT
config SH_TIMER_MTU2
bool "Renesas MTU2 timer driver" if COMPILE_TEST
depends on GENERIC_CLOCKEVENTS
+ depends on HAS_IOMEM
default SYS_SUPPORTS_SH_MTU2
help
This enables build of a clockevent driver for the Multi-Function
@@ -210,6 +212,7 @@ config SH_TIMER_MTU2
config SH_TIMER_TMU
bool "Renesas TMU timer driver" if COMPILE_TEST
depends on GENERIC_CLOCKEVENTS
+ depends on HAS_IOMEM
default SYS_SUPPORTS_SH_TMU
help
This enables build of a clocksource and clockevent driver for
^ permalink raw reply related [flat|nested] 6+ messages in thread