Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1288711 > unrolled thread

[PATCH] clocksource: mmio: remove artificial 32bit limitation

Started byLinus Walleij <linus.walleij@linaro.org>
First post2015-12-10 18:30 +0100
Last post2015-12-10 19:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] clocksource: mmio: remove artificial 32bit limitation Linus Walleij <linus.walleij@linaro.org> - 2015-12-10 18:30 +0100
    [tip:timers/urgent] clocksource: Mmio:   remove artificial 32bit limitation tip-bot for Linus Walleij <tipbot@zytor.com> - 2015-12-10 19:50 +0100

#1288711 — [PATCH] clocksource: mmio: remove artificial 32bit limitation

FromLinus Walleij <linus.walleij@linaro.org>
Date2015-12-10 18:30 +0100
Subject[PATCH] clocksource: mmio: remove artificial 32bit limitation
Message-ID<qEdcw-Km-51@gated-at.bofh.it>
The EP93xx is registering a clocksource of 40 bits with
clocksource_mmio_init() but this is not working because of this
artificial limitation. It works fine to lift the uppe limit to
64 bits, and since cycle_t is u64, it should intuitively have been
like that from the beginning.

Fixes: 000bc17817bf "ARM: ep93xx: switch to GENERIC_CLOCKEVENTS"
Reported-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/clocksource/mmio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c
index 1593ade2a815..c4f7d7a9b689 100644
--- a/drivers/clocksource/mmio.c
+++ b/drivers/clocksource/mmio.c
@@ -55,7 +55,7 @@ int __init clocksource_mmio_init(void __iomem *base, const char *name,
 {
 	struct clocksource_mmio *cs;
 
-	if (bits > 32 || bits < 16)
+	if (bits > 64 || bits < 16)
 		return -EINVAL;
 
 	cs = kzalloc(sizeof(struct clocksource_mmio), GFP_KERNEL);
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1288810 — [tip:timers/urgent] clocksource: Mmio: remove artificial 32bit limitation

Fromtip-bot for Linus Walleij <tipbot@zytor.com>
Date2015-12-10 19:50 +0100
Subject[tip:timers/urgent] clocksource: Mmio: remove artificial 32bit limitation
Message-ID<qEerT-1tP-9@gated-at.bofh.it>
In reply to#1288711
Commit-ID:  e2bf3e6ecaff79c5479682da2dc7b2035e52c5b8
Gitweb:     http://git.kernel.org/tip/e2bf3e6ecaff79c5479682da2dc7b2035e52c5b8
Author:     Linus Walleij <linus.walleij@linaro.org>
AuthorDate: Thu, 10 Dec 2015 18:21:41 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 10 Dec 2015 19:37:18 +0100

clocksource: Mmio: remove artificial 32bit limitation

The EP93xx is registering a clocksource of 40 bits with
clocksource_mmio_init() but this is not working because of this
artificial limitation. It works fine to lift the uppe limit to
64 bits, and since cycle_t is u64, it should intuitively have been
like that from the beginning.

Fixes: 000bc17817bf "ARM: ep93xx: switch to GENERIC_CLOCKEVENTS"
Reported-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: http://lkml.kernel.org/r/1449768101-6879-1-git-send-email-linus.walleij@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/clocksource/mmio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c
index 1593ade..c4f7d7a 100644
--- a/drivers/clocksource/mmio.c
+++ b/drivers/clocksource/mmio.c
@@ -55,7 +55,7 @@ int __init clocksource_mmio_init(void __iomem *base, const char *name,
 {
 	struct clocksource_mmio *cs;
 
-	if (bits > 32 || bits < 16)
+	if (bits > 64 || bits < 16)
 		return -EINVAL;
 
 	cs = kzalloc(sizeof(struct clocksource_mmio), GFP_KERNEL);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web