+ arch-arm-mach-tegra-timerc-separate-clocksource-and-sched_clock.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     arch/arm/mach-tegra/timer.c: separate clocksource and sched_clock
has been added to the -mm tree.  Its filename is
     arch-arm-mach-tegra-timerc-separate-clocksource-and-sched_clock.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: arch/arm/mach-tegra/timer.c: separate clocksource and sched_clock
From: Colin Cross <ccross@xxxxxxxxxxx>

tegra_clocksource_read should not use cnt32_to_63, wrapping is already
handled in the clocksource code.  Move the cnt32_to_63 into the
sched_clock function, and replace the use of clocksource mult and shift
with a multiplication by 1000 to convert us to ns.

Signed-off-by: Colin Cross <ccross@xxxxxxxxxxx>
Acked-by: John Stultz <johnstul@xxxxxxxxxx>
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>
Cc: Russell King <rmk@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/arm/mach-tegra/timer.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff -puN arch/arm/mach-tegra/timer.c~arch-arm-mach-tegra-timerc-separate-clocksource-and-sched_clock arch/arm/mach-tegra/timer.c
--- a/arch/arm/mach-tegra/timer.c~arch-arm-mach-tegra-timerc-separate-clocksource-and-sched_clock
+++ a/arch/arm/mach-tegra/timer.c
@@ -91,7 +91,7 @@ static void tegra_timer_set_mode(enum cl
 
 static cycle_t tegra_clocksource_read(struct clocksource *cs)
 {
-	return cnt32_to_63(timer_readl(TIMERUS_CNTR_1US));
+	return timer_readl(TIMERUS_CNTR_1US);
 }
 
 static struct clock_event_device tegra_clockevent = {
@@ -106,14 +106,13 @@ static struct clocksource tegra_clocksou
 	.name	= "timer_us",
 	.rating	= 300,
 	.read	= tegra_clocksource_read,
-	.mask	= 0x7FFFFFFFFFFFFFFFULL,
+	.mask	= CLOCKSOURCE_MASK(32),
 	.flags	= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
 unsigned long long sched_clock(void)
 {
-	return clocksource_cyc2ns(tegra_clocksource.read(&tegra_clocksource),
-		tegra_clocksource.mult, tegra_clocksource.shift);
+	return cnt32_to_63(timer_readl(TIMERUS_CNTR_1US)) * 1000;
 }
 
 static irqreturn_t tegra_timer_interrupt(int irq, void *dev_id)
_

Patches currently in -mm which might be from ccross@xxxxxxxxxxx are

arch-arm-mach-tegra-timerc-separate-clocksource-and-sched_clock.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux