On 05/19/2014 01:48 PM, Viresh Kumar wrote:
Hi Preeti/Daniel/others,
There is a requirement to add another mode: CLOCK_EVT_MODE_ONESHOT_STOPPED (lkml.org/lkml/2014/5/9/508) to clockevent devices and clockevent-drivers may or maynot support it. Drivers that don't support it can return failure codes on a call to ->set_mode(), which has a return type of 'void' currently.
Concerning the requirement. Did you notice an improvement ? Was it measurable ? Is it possible that adds an extra latency ?
Following steps are suggested (by tglx) to get this fixed:
- Add another callback ->set_dev_mode(), with return type 'int'.
- Covert clockevent drivers to use ->set_dev_mode() instead of ->set_mode().
- Once all are converted, remove support for ->set_mode().
These are implemented by three patches one by one.
I know that the second patch is quite big and I need to separate that into driver specific patches, but that would have made this series 100+ patches and so thought to get review with them merged.
Why not split the second patch per arch + clocksource dir ?
I know it would be hard to review the second patch, its way too big, but still see if you can get through it :) .. That would be very helpful to get these through tglx.
@Kevin: Can you please add my branch to your testing setup? I want this to get some testing before hitting mainline.
git://git.linaro.org/people/viresh.kumar/linux.git tick-ONESHOT-stopped
Viresh Kumar (3): clockevents: add ->set_dev_mode() to struct clock_event_device clockevents: migrate to ->set_dev_mode() clockevents: remove ->set_mode() from struct clock_event_device
arch/alpha/kernel/time.c | 32 +++++++++++++++++++++---- arch/arc/kernel/time.c | 11 +++++---- arch/arm/common/timer-sp.c | 9 ++++--- arch/arm/kernel/smp_twd.c | 10 +++++--- arch/arm/mach-at91/at91rm9200_time.c | 7 ++++-- arch/arm/mach-at91/at91sam926x_time.c | 11 +++++---- arch/arm/mach-clps711x/common.c | 11 +++++---- arch/arm/mach-cns3xxx/core.c | 10 +++++--- arch/arm/mach-davinci/time.c | 7 ++++-- arch/arm/mach-footbridge/dc21285-timer.c | 7 ++++-- arch/arm/mach-gemini/time.c | 7 +++--- arch/arm/mach-imx/epit.c | 14 ++++++----- arch/arm/mach-imx/time.c | 14 ++++++----- arch/arm/mach-integrator/integrator_ap.c | 8 +++---- arch/arm/mach-ixp4xx/common.c | 8 ++++--- arch/arm/mach-ks8695/time.c | 16 ++++++++++--- arch/arm/mach-lpc32xx/timer.c | 11 ++++----- arch/arm/mach-mmp/time.c | 12 ++++++---- arch/arm/mach-netx/time.c | 11 ++++----- arch/arm/mach-omap1/time.c | 7 ++++-- arch/arm/mach-omap1/timer32k.c | 8 ++++--- arch/arm/mach-omap2/timer.c | 8 ++++--- arch/arm/mach-pxa/time.c | 8 ++++--- arch/arm/mach-sa1100/time.c | 8 ++++--- arch/arm/mach-spear/time.c | 10 ++++---- arch/arm/mach-w90x900/time.c | 7 ++++-- arch/arm/plat-iop/time.c | 8 ++++--- arch/arm/plat-orion/time.c | 20 ++++++++++++---- arch/avr32/kernel/time.c | 7 +++--- arch/blackfin/kernel/time-ts.c | 14 +++++++---- arch/c6x/platforms/timer64.c | 7 ++++-- arch/hexagon/kernel/time.c | 11 ++++++--- arch/m68k/platform/coldfire/pit.c | 7 ++++-- arch/microblaze/kernel/timer.c | 7 ++++-- arch/mips/alchemy/common/time.c | 14 +++++++++-- arch/mips/include/asm/cevt-r4k.h | 2 +- arch/mips/jazz/irq.c | 14 +++++++++-- arch/mips/jz4740/time.c | 8 ++++--- arch/mips/kernel/cevt-bcm1480.c | 11 +++++---- arch/mips/kernel/cevt-ds1287.c | 12 +++++++--- arch/mips/kernel/cevt-gic.c | 14 +++++++++-- arch/mips/kernel/cevt-gt641xx.c | 12 +++++++--- arch/mips/kernel/cevt-r4k.c | 14 +++++++++-- arch/mips/kernel/cevt-sb1250.c | 11 +++++---- arch/mips/kernel/cevt-smtc.c | 2 +- arch/mips/kernel/cevt-txx9.c | 7 ++++-- arch/mips/loongson/common/cs5536/cs5536_mfgpt.c | 12 +++++----- arch/mips/ralink/cevt-rt3352.c | 13 ++++++---- arch/mips/sgi-ip27/ip27-timer.c | 14 +++++++++-- arch/mips/sni/time.c | 9 +++---- arch/mn10300/kernel/cevt-mn10300.c | 14 +++++++++-- arch/openrisc/kernel/time.c | 11 ++++----- arch/powerpc/kernel/time.c | 16 +++++++++---- arch/s390/kernel/time.c | 11 ++++++++- arch/score/kernel/time.c | 8 +++---- arch/sh/kernel/localtimer.c | 15 ++++++++++-- arch/sparc/kernel/time_32.c | 18 +++++++++----- arch/sparc/kernel/time_64.c | 11 ++++----- arch/tile/kernel/time.c | 16 ++++++++++--- arch/um/kernel/time.c | 7 ++++-- arch/unicore32/kernel/time.c | 8 ++++--- arch/x86/kernel/apic/apic.c | 10 +++++--- arch/x86/kernel/hpet.c | 19 ++++++++------- arch/x86/lguest/boot.c | 9 +++---- arch/x86/platform/uv/uv_time.c | 10 ++++---- arch/x86/xen/time.c | 23 ++++++++---------- arch/xtensa/kernel/time.c | 9 +++---- drivers/clocksource/arm_arch_timer.c | 32 ++++++++++++++----------- drivers/clocksource/arm_global_timer.c | 9 ++++--- drivers/clocksource/bcm2835_timer.c | 8 +++---- drivers/clocksource/bcm_kona_timer.c | 10 +++++--- drivers/clocksource/cadence_ttc_timer.c | 7 ++++-- drivers/clocksource/cs5535-clockevt.c | 17 ++++++++++--- drivers/clocksource/dummy_timer.c | 15 ++++++++++-- drivers/clocksource/dw_apb_timer.c | 7 ++++-- drivers/clocksource/em_sti.c | 9 ++++--- drivers/clocksource/exynos_mct.c | 14 +++++++---- drivers/clocksource/i8253.c | 8 +++++-- drivers/clocksource/metag_generic.c | 11 ++++----- drivers/clocksource/moxart_timer.c | 8 ++++--- drivers/clocksource/mxs_timer.c | 10 ++++---- drivers/clocksource/nomadik-mtu.c | 7 ++++-- drivers/clocksource/qcom-timer.c | 10 ++++---- drivers/clocksource/samsung_pwm_timer.c | 7 ++++-- drivers/clocksource/sh_cmt.c | 9 ++++--- drivers/clocksource/sh_mtu2.c | 9 ++++--- drivers/clocksource/sh_tmu.c | 9 ++++--- drivers/clocksource/sun4i_timer.c | 9 ++++--- drivers/clocksource/tcb_clksrc.c | 11 ++++++--- drivers/clocksource/tegra20_timer.c | 7 ++++-- drivers/clocksource/time-armada-370-xp.c | 20 +++++++++++----- drivers/clocksource/time-efm32.c | 7 ++++-- drivers/clocksource/time-orion.c | 17 +++++++++---- drivers/clocksource/timer-keystone.c | 9 ++++--- drivers/clocksource/timer-marco.c | 12 ++++++---- drivers/clocksource/timer-prima2.c | 10 ++++---- drivers/clocksource/timer-sun5i.c | 10 +++++--- drivers/clocksource/timer-u300.c | 7 ++++-- drivers/clocksource/vf_pit_timer.c | 12 +++++++--- drivers/clocksource/vt8500_timer.c | 8 ++++--- drivers/clocksource/zevio-timer.c | 9 ++++--- include/linux/clockchips.h | 6 ++--- kernel/time/clockevents.c | 21 ++++++++++++---- kernel/time/tick-broadcast-hrtimer.c | 11 ++++++--- kernel/time/timer_list.c | 4 ++-- 105 files changed, 767 insertions(+), 376 deletions(-)