<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/clocksource/dw_apb_timer.c, branch v4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-08-10T09:40:53Z</updated>
<entry>
<title>clockevents/drivers/dw_apb_timer: Add dynamic irq flag to the timer</title>
<updated>2015-08-10T09:40:53Z</updated>
<author>
<name>Jisheng Zhang</name>
<email>jszhang@marvell.com</email>
</author>
<published>2015-07-04T05:06:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8b5f0010fe0d666bb8dfc74b881f2401324a0e89'/>
<id>urn:sha1:8b5f0010fe0d666bb8dfc74b881f2401324a0e89</id>
<content type='text'>
Commit d2348fb6fdc6 ("tick: Dynamically set broadcast irq affinity")
adds one excellent feature CLOCK_EVT_FEAT_DYNIRQ to let the core set the
interrupt affinity of the broadcast interrupt to the cpu which has the
earliest expiry time. This patch adds CLOCK_EVT_FEAT_DYNIRQ flag to
avoid unnecessary wakeups and IPIs when the dw_apb_timer is used as
broadcast timer.

A simple test:
~ # rm /tmp/test.sh
~ # cat &gt; /tmp/test.sh
cat /proc/interrupts
for i in `seq 10` ; do sleep $i; done
cat /proc/interrupts
~ # chmod +x /tmp/test.sh
~ # taskset 0x2 /tmp/test.sh

without the patch:

           CPU0       CPU1
 27:        115         36       GIC  27  arch_timer
 45:         62          0       GIC  45  mmc0
160:         88          0  interrupt-controller   8  timer
227:          0          0  interrupt-controller   4  f7e81400.i2c
228:          0          0  interrupt-controller   5  f7e81800.i2c
229:          0          0  interrupt-controller   7  dw_spi65535
230:          0          0  interrupt-controller  21  f7e84000.i2c
231:          0          0  interrupt-controller  20  f7e84800.i2c
265:        445          0  interrupt-controller   8  serial
IPI0:          0          0  CPU wakeup interrupts
IPI1:          0         11  Timer broadcast interrupts
IPI2:         56        104  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:          0          4  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:         25         27  IRQ work interrupts
IPI7:          0          0  completion interrupts
IPI8:          0          0  CPU backtrace
Err:          0
           CPU0       CPU1
 27:        115         38       GIC  27  arch_timer
 45:         62          0       GIC  45  mmc0
160:        160          0  interrupt-controller   8  timer
227:          0          0  interrupt-controller   4  f7e81400.i2c
228:          0          0  interrupt-controller   5  f7e81800.i2c
229:          0          0  interrupt-controller   7  dw_spi65535
230:          0          0  interrupt-controller  21  f7e84000.i2c
231:          0          0  interrupt-controller  20  f7e84800.i2c
265:        514          0  interrupt-controller   8  serial
IPI0:          0          0  CPU wakeup interrupts
IPI1:          0         83  Timer broadcast interrupts
IPI2:         56        104  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:          0          4  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:         25         46  IRQ work interrupts
IPI7:          0          0  completion interrupts
IPI8:          0          0  CPU backtrace
Err:          0

cpu0 get 160-88=72 timer interrupts, CPU1 got 83-11=72 broadcast timer
IPIs
So, overall system got 72+72=144 wake ups and 72 broadcast timer IPIs

With the patch:
           CPU0       CPU1
 27:        107         37       GIC  27  arch_timer
 45:         62          0       GIC  45  mmc0
160:         66          7  interrupt-controller   8  timer
227:          0          0  interrupt-controller   4  f7e81400.i2c
228:          0          0  interrupt-controller   5  f7e81800.i2c
229:          0          0  interrupt-controller   7  dw_spi65535
230:          0          0  interrupt-controller  21  f7e84000.i2c
231:          0          0  interrupt-controller  20  f7e84800.i2c
265:        311          0  interrupt-controller   8  serial
IPI0:          0          0  CPU wakeup interrupts
IPI1:          2          4  Timer broadcast interrupts
IPI2:         58        100  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:          0          4  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:         21         24  IRQ work interrupts
IPI7:          0          0  completion interrupts
IPI8:          0          0  CPU backtrace
Err:          0
           CPU0       CPU1
 27:        107         39       GIC  27  arch_timer
 45:         62          0       GIC  45  mmc0
160:         69         75  interrupt-controller   8  timer
227:          0          0  interrupt-controller   4  f7e81400.i2c
228:          0          0  interrupt-controller   5  f7e81800.i2c
229:          0          0  interrupt-controller   7  dw_spi65535
230:          0          0  interrupt-controller  21  f7e84000.i2c
231:          0          0  interrupt-controller  20  f7e84800.i2c
265:        380          0  interrupt-controller   8  serial
IPI0:          0          0  CPU wakeup interrupts
IPI1:          3          6  Timer broadcast interrupts
IPI2:         60        100  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:          0          4  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:         21         45  IRQ work interrupts
IPI7:          0          0  completion interrupts
IPI8:          0          0  CPU backtrace
Err:          0

cpu0 got 69-66=3, cpu1 got 75-7=68 timer interrupts. cpu0 got 3-2=1
broadcast timer IPIs, cpu1 got 6-4=2 broadcast timer IPIs.
So, overall system got 3+68+1+2=74 wakeups and 1+2=3 broadcast timer
IPIs

This patch removes 50% wakeups and almost 100% broadcast timer IPIs!

Signed-off-by: Jisheng Zhang &lt;jszhang@marvell.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clockevents/drivers/dw_apb: Migrate to new 'set-state' interface</title>
<updated>2015-08-10T09:40:28Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-06-18T10:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=226be92b3e6ec2412cd29520fa09fb41a2606cb6'/>
<id>urn:sha1:226be92b3e6ec2412cd29520fa09fb41a2606cb6</id>
<content type='text'>
Migrate dw_apb driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.

This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.

Cc: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Cc: Jamie Iles &lt;jamie@jamieiles.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>drivers: fix up obsolete cpu function usage.</title>
<updated>2015-03-05T03:07:02Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2015-03-05T00:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f9b531fe14a539ec2ad802b73c9638f324e4a4ff'/>
<id>urn:sha1:f9b531fe14a539ec2ad802b73c9638f324e4a4ff</id>
<content type='text'>
Thanks to spatch, plus manual removal of "&amp;*".  Then a sweep for
for_each_cpu_mask =&gt; for_each_cpu.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
Cc: netdev@vger.kernel.org
</content>
</entry>
<entry>
<title>clocksource: misc drivers: Remove deprecated IRQF_DISABLED</title>
<updated>2013-12-11T10:40:27Z</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@free-electrons.com</email>
</author>
<published>2013-12-09T09:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38c30a8421ce8b06492121deee422ba7ecfaeef2'/>
<id>urn:sha1:38c30a8421ce8b06492121deee422ba7ecfaeef2</id>
<content type='text'>
This patch removes the use of the IRQF_DISABLED flag

It's a NOOP since 2.6.35 and it will be removed one day.

[dlezcano] : slightly changed the changelog

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>Revert "dw_apb_timer_of.c: Remove parts that were picoxcell-specific"</title>
<updated>2013-06-18T23:02:04Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2013-06-18T02:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3d8fee4138a06b4b9ca172d25b8412fc33ad3f3'/>
<id>urn:sha1:d3d8fee4138a06b4b9ca172d25b8412fc33ad3f3</id>
<content type='text'>
This reverts commit 55a68c23e0a675b2b8ac2656fd6edbf98b78e4c6.

In order to avoid a collision with dw_apb_timer changes in
the arm-soc tree, revert this change.

I'm leaving it to the arm-soc folks to sort out if they want
to keep the other side of the collision or if they're just going
to back it all out and try again during the next release cycle.

Reported-by: Dinh Nguyen &lt;dinguyen@altera.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>dw_apb_timer_of.c: Remove parts that were picoxcell-specific</title>
<updated>2013-05-28T21:00:58Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@denx.de</email>
</author>
<published>2013-05-07T20:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55a68c23e0a675b2b8ac2656fd6edbf98b78e4c6'/>
<id>urn:sha1:55a68c23e0a675b2b8ac2656fd6edbf98b78e4c6</id>
<content type='text'>
It seems we made a mistake when creating dw_apb_timer_of.c:
picoxcell sched_clock had parts that were not related to
dw_apb_timer, yet we moved them to dw_apb_timer_of, and tried to
use them on socfpga.

This results in system where user/system time is not measured
properly, as demonstrated by

    time dd if=/dev/urandom of=/dev/zero bs=100000 count=100

So this patch switches sched_clock to hardware that exists on both
platforms, and adds missing of_node_put() in dw_apb_timer_init().

Signed-off-by: Pavel Machek &lt;pavel@denx.de&gt;
Acked-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: apb_timer: Remove unsused function</title>
<updated>2013-05-16T09:09:13Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-04-25T20:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc1f7d5606487ae28d6c84e95401952927d7379e'/>
<id>urn:sha1:fc1f7d5606487ae28d6c84e95401952927d7379e</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Magnus Damm &lt;magnus.damm@gmail.com&gt;
Acked-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Link: http://lkml.kernel.org/r/20130425143435.558006195@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>dw_apb_timer: constify clocksource name</title>
<updated>2011-10-04T20:08:18Z</updated>
<author>
<name>Jamie Iles</name>
<email>jamie@jamieiles.com</email>
</author>
<published>2011-07-25T15:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1330228f9eec7e355d41f45c17e1297d681f40d'/>
<id>urn:sha1:a1330228f9eec7e355d41f45c17e1297d681f40d</id>
<content type='text'>
The clocksource name should be const for correctness.

Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: apb: Share APB timer code with other platforms</title>
<updated>2011-06-27T22:16:21Z</updated>
<author>
<name>Jamie Iles</name>
<email>jamie@jamieiles.com</email>
</author>
<published>2011-06-06T11:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=06c3df49521c1b112b777cc4946e5de057c814ba'/>
<id>urn:sha1:06c3df49521c1b112b777cc4946e5de057c814ba</id>
<content type='text'>
The APB timers are an IP block from Synopsys (DesignWare APB timers)
and are also found in other systems including ARM SoC's.  This patch
adds functions for creating clock_event_devices and clocksources from
APB timers but does not do the resource allocation.  This is handled
in a higher layer to allow the timers to be created from multiple
methods such as platform_devices.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Signed-off-by: Jamie Iles &lt;jamie@jamieiles.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
</feed>
