<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/kernel/time, branch v3.13-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v3.13-rc2</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v3.13-rc2'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2013-11-12T01:36:00Z</updated>
<entry>
<title>Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2013-11-12T01:36:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-11-12T01:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=87093826aa0172d9135ca1f301c4298a258ceee6'/>
<id>urn:sha1:87093826aa0172d9135ca1f301c4298a258ceee6</id>
<content type='text'>
Pull timer changes from Ingo Molnar:
 "Main changes in this cycle were:

   - Updated full dynticks support.

   - Event stream support for architected (ARM) timers.

   - ARM clocksource driver updates.

   - Move arm64 to using the generic sched_clock framework &amp; resulting
     cleanup in the generic sched_clock code.

   - Misc fixes and cleanups"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits)
  x86/time: Honor ACPI FADT flag indicating absence of a CMOS RTC
  clocksource: sun4i: remove IRQF_DISABLED
  clocksource: sun4i: Report the minimum tick that we can program
  clocksource: sun4i: Select CLKSRC_MMIO
  clocksource: Provide timekeeping for efm32 SoCs
  clocksource: em_sti: convert to clk_prepare/unprepare
  time: Fix signedness bug in sysfs_get_uname() and its callers
  timekeeping: Fix some trivial typos in comments
  alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist
  clocksource: arch_timer: Do not register arch_sys_counter twice
  timer stats: Add a 'Collection: active/inactive' line to timer usage statistics
  sched_clock: Remove sched_clock_func() hook
  arch_timer: Move to generic sched_clock framework
  clocksource: tcb_clksrc: Remove IRQF_DISABLED
  clocksource: tcb_clksrc: Improve driver robustness
  clocksource: tcb_clksrc: Replace clk_enable/disable with clk_prepare_enable/disable_unprepare
  clocksource: arm_arch_timer: Use clocksource for suspend timekeeping
  clocksource: dw_apb_timer_of: Mark a few more functions as __init
  clocksource: Put nodes passed to CLOCKSOURCE_OF_DECLARE callbacks centrally
  arm: zynq: Enable arm_global_timer
  ...
</content>
</entry>
<entry>
<title>clockevents: Sanitize ticks to nsec conversion</title>
<updated>2013-10-23T10:51:21Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-09-24T19:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=97b9410643475d6557d2517c2aff9fd2221141a9'/>
<id>urn:sha1:97b9410643475d6557d2517c2aff9fd2221141a9</id>
<content type='text'>
Marc Kleine-Budde pointed out, that commit 77cc982 "clocksource: use
clockevents_config_and_register() where possible" caused a regression
for some of the converted subarchs.

The reason is, that the clockevents core code converts the minimal
hardware tick delta to a nanosecond value for core internal
usage. This conversion is affected by integer math rounding loss, so
the backwards conversion to hardware ticks will likely result in a
value which is less than the configured hardware limitation. The
affected subarchs used their own workaround (SIGH!) which got lost in
the conversion.

The solution for the issue at hand is simple: adding evt-&gt;mult - 1 to
the shifted value before the integer divison in the core conversion
function takes care of it. But this only works for the case where for
the scaled math mult/shift pair "mult &lt;= 1 &lt;&lt; shift" is true. For the
case where "mult &gt; 1 &lt;&lt; shift" we can apply the rounding add only for
the minimum delta value to make sure that the backward conversion is
not less than the given hardware limit. For the upper bound we need to
omit the rounding add, because the backwards conversion is always
larger than the original latch value. That would violate the upper
bound of the hardware device.

Though looking closer at the details of that function reveals another
bogosity: The upper bounds check is broken as well. Checking for a
resulting "clc" value greater than KTIME_MAX after the conversion is
pointless. The conversion does:

      u64 clc = (latch &lt;&lt; evt-&gt;shift) / evt-&gt;mult;

So there is no sanity check for (latch &lt;&lt; evt-&gt;shift) exceeding the
64bit boundary. The latch argument is "unsigned long", so on a 64bit
arch the handed in argument could easily lead to an unnoticed shift
overflow. With the above rounding fix applied the calculation before
the divison is:

       u64 clc = (latch &lt;&lt; evt-&gt;shift) + evt-&gt;mult - 1;

So we need to make sure, that neither the shift nor the rounding add
is overflowing the u64 boundary.

[ukl: move assignment to rnd after eventually changing mult, fix build
 issue and correct comment with the right math]

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Russell King - ARM Linux &lt;linux@arm.linux.org.uk&gt;
Cc: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: nicolas.ferre@atmel.com
Cc: Marc Pignat &lt;marc.pignat@hevs.ch&gt;
Cc: john.stultz@linaro.org
Cc: kernel@pengutronix.de
Cc: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Cc: LAK &lt;linux-arm-kernel@lists.infradead.org&gt;
Cc: Ludovic Desroches &lt;ludovic.desroches@atmel.com&gt;
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1380052223-24139-1-git-send-email-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>time: Fix signedness bug in sysfs_get_uname() and its callers</title>
<updated>2013-10-18T23:45:58Z</updated>
<author>
<name>Patrick Palka</name>
<email>patrick@parcs.ath.cx</email>
</author>
<published>2013-10-11T17:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=891292a767c2453af0e5be9465e95b06b4b29ebe'/>
<id>urn:sha1:891292a767c2453af0e5be9465e95b06b4b29ebe</id>
<content type='text'>
sysfs_get_uname() is erroneously declared as returning size_t even
though it may return a negative value, specifically -EINVAL.  Its
callers then check whether its return value is less than zero and indeed
that is never the case for size_t.

This patch changes sysfs_get_uname() to return ssize_t and makes sure
its callers use ssize_t accordingly.

Signed-off-by: Patrick Palka &lt;patrick@parcs.ath.cx&gt;
[jstultz: Didn't apply cleanly, as a similar partial fix was also applied
so had to resolve the collisions]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>timekeeping: Fix some trivial typos in comments</title>
<updated>2013-10-18T23:30:17Z</updated>
<author>
<name>Xie XiuQi</name>
<email>xiexiuqi@huawei.com</email>
</author>
<published>2013-10-18T01:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b7bc50e45111e59419474154736f419a555158d9'/>
<id>urn:sha1:b7bc50e45111e59419474154736f419a555158d9</id>
<content type='text'>
Fix some typos in timekeeping comments.

Signed-off-by: Xie XiuQi &lt;xiexiuqi@huawei.com&gt;
[jstultz: Commit message tweaks]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist</title>
<updated>2013-10-18T23:23:58Z</updated>
<author>
<name>KOSAKI Motohiro</name>
<email>kosaki.motohiro@jp.fujitsu.com</email>
</author>
<published>2013-10-14T21:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=98d6f4dd84a134d942827584a3c5f67ffd8ec35f'/>
<id>urn:sha1:98d6f4dd84a134d942827584a3c5f67ffd8ec35f</id>
<content type='text'>
Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide
on ARM. (http://bugs.ruby-lang.org/issues/9008)

Because of, commit 1c6b39ad3f (alarmtimers: Return -ENOTSUPP if no
RTC device is present) intruduced to return ENOTSUPP when
clock_get{time,res} can't find a RTC device. However this is incorrect.

First, ENOTSUPP isn't exported to userland (ENOTSUP or EOPNOTSUP are the
closest userland equivlents).

Second, Posix and Linux man pages agree that clock_gettime and
clock_getres should return EINVAL if clk_id argument is invalid.
While the arugment that the clockid is valid, but just not supported
on this hardware could be made, this is just a technicality that
doesn't help userspace applicaitons, and only complicates error
handling.

Thus, this patch changes the code to use EINVAL.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;  #3.0 and up
Reported-by: Vit Ondruch &lt;v.ondruch@tiscali.cz&gt;
Signed-off-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
[jstultz: Tweaks to commit message to include full rational]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>timer stats: Add a 'Collection: active/inactive' line to timer usage statistics</title>
<updated>2013-10-10T07:59:25Z</updated>
<author>
<name>Dong Zhu</name>
<email>bluezhudong@gmail.com</email>
</author>
<published>2013-10-10T07:56:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2cb763614c1c5baef58045af9304265075f22d0a'/>
<id>urn:sha1:2cb763614c1c5baef58045af9304265075f22d0a</id>
<content type='text'>
We can enable/disable timer statistics collection via:

  echo [1|0] &gt; /proc/timers_stats

and it would be nice if apps had the ability to check
what the current collection status is.

This patch adds a 'Collection: active/inactive' line to display the
current timer collection status.

Also bump up the timer stats version to v0.3.

Signed-off-by: Dong Zhu &lt;bluezhudong@gmail.com&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Link: http://lkml.kernel.org/r/20131010075618.GH2139@zhudong.nay.redhat.com
[ Improved the changelog and the code. ]
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fortglx/3.13/time' of git://git.linaro.org/people/jstultz/linux into timers/core</title>
<updated>2013-10-10T04:25:23Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2013-10-10T04:25:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8a749de5e32d2b72def93f7bd7a2745580d75872'/>
<id>urn:sha1:8a749de5e32d2b72def93f7bd7a2745580d75872</id>
<content type='text'>
Pull more timekeeping items for v3.13 from John Stultz:

  * Small cleanup in the clocksource code.

  * Fix for rtc-pl031 to let it work with alarmtimers.

  * Move arm64 to using the generic sched_clock framework &amp; resulting
    cleanup in the generic sched_clock code.

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched_clock: Remove sched_clock_func() hook</title>
<updated>2013-10-09T23:54:39Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-07-18T23:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b4042ceaabbd913bc5b397ddd1e396eeb312d72f'/>
<id>urn:sha1:b4042ceaabbd913bc5b397ddd1e396eeb312d72f</id>
<content type='text'>
Nobody is using sched_clock_func() anymore now that sched_clock
supports up to 64 bits. Remove the hook so that new code only
uses sched_clock_register().

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'clockevents/3.13' of git://git.linaro.org/people/dlezcano/linux into timers/core</title>
<updated>2013-10-03T05:57:02Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2013-10-03T05:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=68e90740284c69292881cd38c7ece6f09a18a58f'/>
<id>urn:sha1:68e90740284c69292881cd38c7ece6f09a18a58f</id>
<content type='text'>
Pull (mostly) ARM clocksource driver updates from Daniel Lezcano:

" - Soren Brinkmann added FEAT_PERCPU to a clock device when it is local
    per cpu. This feature prevents the clock framework to choose a per cpu
    timer as a broadcast timer. This problem arised when the ARM global
    timer is used when switching to the broadcast timer which is the case
    now on Xillinx with its cpuidle driver.

  - Stephen Boyd extended the generic sched_clock code to support 64bit
    counters and removes the setup_sched_clock deprecation, as that causes
    lots of warnings since there's still users in the arch/arm tree. He
    added also the CLOCK_SOURCE_SUSPEND_NONSTOP flag on the architected
    timer as they continue counting during suspend.

  - Uwe Kleine-König added some missing __init sections and consolidated the
    code by moving the of_node_put call from the drivers to the function
    clocksource_of_init. "

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/core</title>
<updated>2013-10-03T05:53:25Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2013-10-03T05:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=19f29887a73e32c52171f2725ac2d7561adab62b'/>
<id>urn:sha1:19f29887a73e32c52171f2725ac2d7561adab62b</id>
<content type='text'>
Merge updated full dynticks support from Frederic Weisbecker:

   - support 32-bit systems (full dynticks was 64-bit only before)
   - support ARM

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
