]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 25 Dec 2016 22:30:04 +0000 (14:30 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 25 Dec 2016 22:30:04 +0000 (14:30 -0800)
Pull timer type cleanups from Thomas Gleixner:
 "This series does a tree wide cleanup of types related to
  timers/timekeeping.

   - Get rid of cycles_t and use a plain u64. The type is not really
     helpful and caused more confusion than clarity

   - Get rid of the ktime union. The union has become useless as we use
     the scalar nanoseconds storage unconditionally now. The 32bit
     timespec alike storage got removed due to the Y2038 limitations
     some time ago.

     That leaves the odd union access around for no reason. Clean it up.

  Both changes have been done with coccinelle and a small amount of
  manual mopping up"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  ktime: Get rid of ktime_equal()
  ktime: Cleanup ktime_set() usage
  ktime: Get rid of the union
  clocksource: Use a plain u64 instead of cycle_t

227 files changed:
arch/alpha/kernel/time.c
arch/arm/mach-davinci/time.c
arch/arm/mach-ep93xx/timer-ep93xx.c
arch/arm/mach-footbridge/dc21285-timer.c
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-mmp/time.c
arch/arm/mach-omap2/timer.c
arch/arm/plat-iop/time.c
arch/avr32/kernel/time.c
arch/blackfin/kernel/time-ts.c
arch/c6x/kernel/time.c
arch/hexagon/kernel/time.c
arch/ia64/kernel/cyclone.c
arch/ia64/kernel/fsyscall_gtod_data.h
arch/ia64/kernel/time.c
arch/ia64/sn/kernel/sn2/timer.c
arch/m68k/68000/timers.c
arch/m68k/coldfire/dma_timer.c
arch/m68k/coldfire/pit.c
arch/m68k/coldfire/sltimers.c
arch/m68k/coldfire/timers.c
arch/microblaze/kernel/timer.c
arch/mips/alchemy/common/time.c
arch/mips/cavium-octeon/csrc-octeon.c
arch/mips/jz4740/time.c
arch/mips/kernel/cevt-txx9.c
arch/mips/kernel/csrc-bcm1480.c
arch/mips/kernel/csrc-ioasic.c
arch/mips/kernel/csrc-r4k.c
arch/mips/kernel/csrc-sb1250.c
arch/mips/loongson32/common/time.c
arch/mips/loongson64/common/cs5536/cs5536_mfgpt.c
arch/mips/loongson64/loongson-3/hpet.c
arch/mips/mti-malta/malta-time.c
arch/mips/netlogic/common/time.c
arch/mips/sgi-ip27/ip27-timer.c
arch/mn10300/kernel/csrc-mn10300.c
arch/nios2/kernel/time.c
arch/openrisc/kernel/time.c
arch/parisc/kernel/time.c
arch/powerpc/kernel/time.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/oprofile/cell/spu_profiler.c
arch/s390/kernel/time.c
arch/s390/kvm/interrupt.c
arch/sparc/kernel/time_32.c
arch/sparc/kernel/time_64.c
arch/um/kernel/time.c
arch/unicore32/kernel/time.c
arch/x86/entry/vdso/vclock_gettime.c
arch/x86/include/asm/kvm_host.h
arch/x86/include/asm/pvclock.h
arch/x86/include/asm/tsc.h
arch/x86/include/asm/vgtod.h
arch/x86/kernel/apb_timer.c
arch/x86/kernel/cpu/mshyperv.c
arch/x86/kernel/hpet.c
arch/x86/kernel/kvmclock.c
arch/x86/kernel/pvclock.c
arch/x86/kernel/tsc.c
arch/x86/kvm/lapic.c
arch/x86/kvm/x86.c
arch/x86/lguest/boot.c
arch/x86/platform/uv/uv_time.c
arch/x86/xen/time.c
arch/x86/xen/xen-ops.h
arch/xtensa/kernel/time.c
block/blk-mq.c
drivers/base/power/main.c
drivers/base/power/wakeup.c
drivers/block/null_blk.c
drivers/char/hpet.c
drivers/clocksource/acpi_pm.c
drivers/clocksource/arc_timer.c
drivers/clocksource/arm_arch_timer.c
drivers/clocksource/arm_global_timer.c
drivers/clocksource/cadence_ttc_timer.c
drivers/clocksource/clksrc-dbx500-prcmu.c
drivers/clocksource/dw_apb_timer.c
drivers/clocksource/em_sti.c
drivers/clocksource/exynos_mct.c
drivers/clocksource/h8300_timer16.c
drivers/clocksource/h8300_tpu.c
drivers/clocksource/i8253.c
drivers/clocksource/jcore-pit.c
drivers/clocksource/metag_generic.c
drivers/clocksource/mips-gic-timer.c
drivers/clocksource/mmio.c
drivers/clocksource/mxs_timer.c
drivers/clocksource/qcom-timer.c
drivers/clocksource/samsung_pwm_timer.c
drivers/clocksource/scx200_hrt.c
drivers/clocksource/sh_cmt.c
drivers/clocksource/sh_tmu.c
drivers/clocksource/tcb_clksrc.c
drivers/clocksource/time-pistachio.c
drivers/clocksource/timer-atlas7.c
drivers/clocksource/timer-atmel-pit.c
drivers/clocksource/timer-atmel-st.c
drivers/clocksource/timer-nps.c
drivers/clocksource/timer-prima2.c
drivers/clocksource/timer-sun5i.c
drivers/clocksource/timer-ti-32k.c
drivers/clocksource/vt8500_timer.c
drivers/dma/dmatest.c
drivers/gpu/drm/amd/amdgpu/dce_virtual.c
drivers/gpu/drm/i915/intel_uncore.c
drivers/gpu/drm/nouveau/nouveau_fence.c
drivers/gpu/drm/tilcdc/tilcdc_crtc.c
drivers/hv/hv.c
drivers/iio/trigger/iio-trig-hrtimer.c
drivers/input/joystick/walkera0701.c
drivers/irqchip/irq-mips-gic.c
drivers/mailbox/mailbox.c
drivers/media/dvb-core/dmxdev.c
drivers/media/pci/cx88/cx88-input.c
drivers/media/pci/pt3/pt3.c
drivers/media/rc/ir-rx51.c
drivers/net/can/softing/softing_fw.c
drivers/net/can/softing/softing_main.c
drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/ec_bhf.c
drivers/net/ethernet/freescale/fec_ptp.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/e1000e/ptp.c
drivers/net/ethernet/intel/igb/igb_ptp.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
drivers/net/ethernet/marvell/mvpp2.c
drivers/net/ethernet/mellanox/mlx4/en_clock.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/ti/cpts.c
drivers/net/ethernet/tile/tilegx.c
drivers/net/ieee802154/at86rf230.c
drivers/net/usb/cdc_ncm.c
drivers/net/wireless/ralink/rt2x00/rt2800usb.c
drivers/pci/quirks.c
drivers/platform/x86/msi-wmi.c
drivers/power/reset/ltc2952-poweroff.c
drivers/rtc/interface.c
drivers/s390/crypto/ap_bus.c
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
drivers/scsi/scsi_debug.c
drivers/scsi/ufs/ufshcd.c
drivers/usb/chipidea/otg_fsm.c
drivers/usb/gadget/function/f_ncm.c
drivers/usb/host/ehci-timer.c
drivers/usb/host/fotg210-hcd.c
drivers/usb/musb/musb_cppi41.c
fs/aio.c
fs/dlm/lock.c
fs/gfs2/glock.c
fs/nfs/flexfilelayout/flexfilelayout.c
fs/ocfs2/cluster/heartbeat.c
fs/timerfd.c
include/kvm/arm_arch_timer.h
include/linux/clocksource.h
include/linux/dw_apb_timer.h
include/linux/futex.h
include/linux/hrtimer.h
include/linux/irqchip/mips-gic.h
include/linux/ktime.h
include/linux/mlx4/device.h
include/linux/skbuff.h
include/linux/tick.h
include/linux/timecounter.h
include/linux/timekeeper_internal.h
include/linux/timekeeping.h
include/linux/types.h
include/linux/wait.h
include/net/red.h
include/net/sock.h
include/trace/events/alarmtimer.h
include/trace/events/timer.h
kernel/futex.c
kernel/sched/core.c
kernel/signal.c
kernel/time/alarmtimer.c
kernel/time/clockevents.c
kernel/time/clocksource.c
kernel/time/hrtimer.c
kernel/time/itimer.c
kernel/time/jiffies.c
kernel/time/ntp.c
kernel/time/posix-timers.c
kernel/time/tick-broadcast-hrtimer.c
kernel/time/tick-broadcast.c
kernel/time/tick-common.c
kernel/time/tick-oneshot.c
kernel/time/tick-sched.c
kernel/time/timecounter.c
kernel/time/timekeeping.c
kernel/time/timekeeping_internal.h
kernel/trace/ftrace.c
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_irqsoff.c
kernel/trace/trace_sched_wakeup.c
lib/timerqueue.c
net/can/bcm.c
net/can/gw.c
net/core/dev.c
net/core/skbuff.c
net/ipv4/tcp_output.c
net/ipv6/exthdrs.c
net/ipv6/mip6.c
net/ipx/af_ipx.c
net/mac802154/util.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c
net/netfilter/xt_time.c
net/sched/sch_cbq.c
net/sched/sch_netem.c
net/sctp/transport.c
net/socket.c
net/sunrpc/svcsock.c
net/xfrm/xfrm_state.c
sound/core/hrtimer.c
sound/drivers/pcsp/pcsp_lib.c
sound/firewire/lib.c
sound/hda/hdac_stream.c
sound/sh/sh_dac_audio.c
virt/kvm/arm/arch_timer.c

index 992000e3d9e4dcec51e5b82bfc64256a563f0ff0..3bfe058d75d996796ff8992962a1fcb2632b6311 100644 (file)
@@ -133,7 +133,7 @@ init_rtc_clockevent(void)
  * The QEMU clock as a clocksource primitive.
  */
 
-static cycle_t
+static u64
 qemu_cs_read(struct clocksource *cs)
 {
        return qemu_get_vmtime();
@@ -260,7 +260,7 @@ common_init_rtc(void)
  * use this method when WTINT is in use.
  */
 
-static cycle_t read_rpcc(struct clocksource *cs)
+static u64 read_rpcc(struct clocksource *cs)
 {
        return rpcc();
 }
index 6c18445a4639b169dc2dd24ad0b6d0475870486f..034f865fe78e8f19b42ae941965cd98ddc971270 100644 (file)
@@ -268,7 +268,7 @@ static void __init timer_init(void)
 /*
  * clocksource
  */
-static cycle_t read_cycles(struct clocksource *cs)
+static u64 read_cycles(struct clocksource *cs)
 {
        struct timer_s *t = &timers[TID_CLOCKSOURCE];
 
index e5f791145bd00dc4cb9424101564ef60c0c2f6bb..874cbc91b66944e09e64f66d0bb833e684586cba 100644 (file)
@@ -59,13 +59,13 @@ static u64 notrace ep93xx_read_sched_clock(void)
        return ret;
 }
 
-cycle_t ep93xx_clocksource_read(struct clocksource *c)
+u64 ep93xx_clocksource_read(struct clocksource *c)
 {
        u64 ret;
 
        ret = readl(EP93XX_TIMER4_VALUE_LOW);
        ret |= ((u64) (readl(EP93XX_TIMER4_VALUE_HIGH) & 0xff) << 32);
-       return (cycle_t) ret;
+       return (u64) ret;
 }
 
 static int ep93xx_clkevt_set_next_event(unsigned long next,
index 810edc78c8172a7fc24f7121418cae34d67f73a5..75395a720e6338b49636bef9157ea330f133025c 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "common.h"
 
-static cycle_t cksrc_dc21285_read(struct clocksource *cs)
+static u64 cksrc_dc21285_read(struct clocksource *cs)
 {
        return cs->mask - *CSR_TIMER2_VALUE;
 }
index 0f08f611c1a69e4ff3ed73c0a238562f156f6376..846e033c56fa74a6a6873534255653b8593b3382 100644 (file)
@@ -493,7 +493,7 @@ static u64 notrace ixp4xx_read_sched_clock(void)
  * clocksource
  */
 
-static cycle_t ixp4xx_clocksource_read(struct clocksource *c)
+static u64 ixp4xx_clocksource_read(struct clocksource *c)
 {
        return *IXP4XX_OSTS;
 }
index 3c2c92aaa0aecc8eea9147478bcda5fcc513ea4e..96ad1db0b04bef7c59a191ffec822a5e84ae7686 100644 (file)
@@ -144,7 +144,7 @@ static struct clock_event_device ckevt = {
        .set_state_oneshot      = timer_set_shutdown,
 };
 
-static cycle_t clksrc_read(struct clocksource *cs)
+static u64 clksrc_read(struct clocksource *cs)
 {
        return timer_read();
 }
index 5e2e2218a4023a28b25657f2174735d908fd2a68..56128da23c3a1531994e37522a05e625764cc6ee 100644 (file)
@@ -369,9 +369,9 @@ static bool use_gptimer_clksrc __initdata;
 /*
  * clocksource
  */
-static cycle_t clocksource_read_cycles(struct clocksource *cs)
+static u64 clocksource_read_cycles(struct clocksource *cs)
 {
-       return (cycle_t)__omap_dm_timer_read_counter(&clksrc,
+       return (u64)__omap_dm_timer_read_counter(&clksrc,
                                                     OMAP_TIMER_NONPOSTED);
 }
 
index ed8d129d4beab1e174371a8d37e9171b1f853ea4..2cff0010f677fe9a54fd12c4a3954fa61d0a2990 100644 (file)
@@ -38,7 +38,7 @@
 /*
  * IOP clocksource (free-running timer 1).
  */
-static cycle_t notrace iop_clocksource_read(struct clocksource *unused)
+static u64 notrace iop_clocksource_read(struct clocksource *unused)
 {
        return 0xffffffffu - read_tcr1();
 }
index a124c55733dbf7dc19e61aacbf74671ff149de83..4d9b69615979cfc33de7efe8b724fbe60a49cc54 100644 (file)
@@ -20,9 +20,9 @@
 
 static bool disable_cpu_idle_poll;
 
-static cycle_t read_cycle_count(struct clocksource *cs)
+static u64 read_cycle_count(struct clocksource *cs)
 {
-       return (cycle_t)sysreg_read(COUNT);
+       return (u64)sysreg_read(COUNT);
 }
 
 /*
index fb9e95f1b719efaabcbc627eede3662f5db21d95..0e9fcf841d67c24fb77230e1a0d97d7a1c1b0272 100644 (file)
@@ -26,7 +26,7 @@
 
 #if defined(CONFIG_CYCLES_CLOCKSOURCE)
 
-static notrace cycle_t bfin_read_cycles(struct clocksource *cs)
+static notrace u64 bfin_read_cycles(struct clocksource *cs)
 {
 #ifdef CONFIG_CPU_FREQ
        return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod);
@@ -80,7 +80,7 @@ void __init setup_gptimer0(void)
        enable_gptimers(TIMER0bit);
 }
 
-static cycle_t bfin_read_gptimer0(struct clocksource *cs)
+static u64 bfin_read_gptimer0(struct clocksource *cs)
 {
        return bfin_read_TIMER0_COUNTER();
 }
index 04845aaf59858f81feebeeca6c45096b48c313d8..6a8e00a1f6d56b74f294586de606b707b642db00 100644 (file)
@@ -26,7 +26,7 @@
 static u32 sched_clock_multiplier;
 #define SCHED_CLOCK_SHIFT 16
 
-static cycle_t tsc_read(struct clocksource *cs)
+static u64 tsc_read(struct clocksource *cs)
 {
        return get_cycles();
 }
index a6a1d1f8309a40918e0e884715a09380d45c6d18..ff4e9bf995e91cec460232ebdb9a878f073957c9 100644 (file)
@@ -72,9 +72,9 @@ struct adsp_hw_timer_struct {
 /*  Look for "TCX0" for related constants.  */
 static __iomem struct adsp_hw_timer_struct *rtos_timer;
 
-static cycle_t timer_get_cycles(struct clocksource *cs)
+static u64 timer_get_cycles(struct clocksource *cs)
 {
-       return (cycle_t) __vmgettime();
+       return (u64) __vmgettime();
 }
 
 static struct clocksource hexagon_clocksource = {
index 5fa3848ba22497c34d68e4f0e3f4069f79c73d09..ee1a4afbf9da0167ffa80e9bd8a775c4cffd71c8 100644 (file)
@@ -21,9 +21,9 @@ void __init cyclone_setup(void)
 
 static void __iomem *cyclone_mc;
 
-static cycle_t read_cyclone(struct clocksource *cs)
+static u64 read_cyclone(struct clocksource *cs)
 {
-       return (cycle_t)readq((void __iomem *)cyclone_mc);
+       return (u64)readq((void __iomem *)cyclone_mc);
 }
 
 static struct clocksource clocksource_cyclone = {
index 146b15b5fec30f34d4c78df1a390870b34781aaa..dcc5149177315a4a4aabcb78a70298cbc9eb1f72 100644 (file)
@@ -9,15 +9,15 @@ struct fsyscall_gtod_data_t {
        seqcount_t      seq;
        struct timespec wall_time;
        struct timespec monotonic_time;
-       cycle_t         clk_mask;
+       u64             clk_mask;
        u32             clk_mult;
        u32             clk_shift;
        void            *clk_fsys_mmio;
-       cycle_t         clk_cycle_last;
+       u64             clk_cycle_last;
 } ____cacheline_aligned;
 
 struct itc_jitter_data_t {
        int             itc_jitter;
-       cycle_t         itc_lastcycle;
+       u64             itc_lastcycle;
 } ____cacheline_aligned;
 
index 021f44ab4bfb84493bde9dec03183463bd899b7e..71775b95d6cc06cd9d8d8e9cadbf3fdb5333f967 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "fsyscall_gtod_data.h"
 
-static cycle_t itc_get_cycles(struct clocksource *cs);
+static u64 itc_get_cycles(struct clocksource *cs);
 
 struct fsyscall_gtod_data_t fsyscall_gtod_data;
 
@@ -323,7 +323,7 @@ void ia64_init_itm(void)
        }
 }
 
-static cycle_t itc_get_cycles(struct clocksource *cs)
+static u64 itc_get_cycles(struct clocksource *cs)
 {
        unsigned long lcycle, now, ret;
 
@@ -397,7 +397,7 @@ void update_vsyscall_tz(void)
 }
 
 void update_vsyscall_old(struct timespec *wall, struct timespec *wtm,
-                        struct clocksource *c, u32 mult, cycle_t cycle_last)
+                        struct clocksource *c, u32 mult, u64 cycle_last)
 {
        write_seqcount_begin(&fsyscall_gtod_data.seq);
 
index abab8f99e9139a7822b22f166ffe3c6e03700863..66edc36426edecfd69649c542572fae469e526fe 100644 (file)
@@ -22,9 +22,9 @@
 
 extern unsigned long sn_rtc_cycles_per_second;
 
-static cycle_t read_sn2(struct clocksource *cs)
+static u64 read_sn2(struct clocksource *cs)
 {
-       return (cycle_t)readq(RTC_COUNTER_ADDR);
+       return (u64)readq(RTC_COUNTER_ADDR);
 }
 
 static struct clocksource clocksource_sn2 = {
index 99a98698bc959035fb89c2d004a02800abcf81a4..252455bce1446b5c3734b054b27afaa85733c9ef 100644 (file)
@@ -76,7 +76,7 @@ static struct irqaction m68328_timer_irq = {
 
 /***************************************************************************/
 
-static cycle_t m68328_read_clk(struct clocksource *cs)
+static u64 m68328_read_clk(struct clocksource *cs)
 {
        unsigned long flags;
        u32 cycles;
index 235ad57c470798c9538fab0fab7fef4936bd7a3c..8273eea5787455d34e93f281b9c368d490bde9e3 100644 (file)
@@ -34,7 +34,7 @@
 #define DMA_DTMR_CLK_DIV_16    (2 << 1)
 #define DMA_DTMR_ENABLE                (1 << 0)
 
-static cycle_t cf_dt_get_cycles(struct clocksource *cs)
+static u64 cf_dt_get_cycles(struct clocksource *cs)
 {
        return __raw_readl(DTCN0);
 }
index d86a9ffb3f13eadde3ee66380945b8932622dc93..175553d5b8ed8ff3d65a1501a662f75498853c51 100644 (file)
@@ -118,7 +118,7 @@ static struct irqaction pit_irq = {
 
 /***************************************************************************/
 
-static cycle_t pit_read_clk(struct clocksource *cs)
+static u64 pit_read_clk(struct clocksource *cs)
 {
        unsigned long flags;
        u32 cycles;
index 831a08cf6f40d7e6e6c28594035a75e0c6a8b1c7..3292c0d68b18b69ddbdce8a37d24dfa06d6d8c27 100644 (file)
@@ -97,7 +97,7 @@ static struct irqaction mcfslt_timer_irq = {
        .handler = mcfslt_tick,
 };
 
-static cycle_t mcfslt_read_clk(struct clocksource *cs)
+static u64 mcfslt_read_clk(struct clocksource *cs)
 {
        unsigned long flags;
        u32 cycles, scnt;
index cd496a20fcc7ced7b802e705badcae2417eb2256..2dc7a58204f654b69af1b6323927dd5cf2934071 100644 (file)
@@ -89,7 +89,7 @@ static struct irqaction mcftmr_timer_irq = {
 
 /***************************************************************************/
 
-static cycle_t mcftmr_read_clk(struct clocksource *cs)
+static u64 mcftmr_read_clk(struct clocksource *cs)
 {
        unsigned long flags;
        u32 cycles;
index 9e954959f60504cd7cf04d1c8c58f897bf6cea76..1d6fad50fa76f60f89fc15f244f767d5846c3471 100644 (file)
@@ -190,17 +190,17 @@ static u64 xilinx_clock_read(void)
        return read_fn(timer_baseaddr + TCR1);
 }
 
-static cycle_t xilinx_read(struct clocksource *cs)
+static u64 xilinx_read(struct clocksource *cs)
 {
        /* reading actual value of timer 1 */
-       return (cycle_t)xilinx_clock_read();
+       return (u64)xilinx_clock_read();
 }
 
 static struct timecounter xilinx_tc = {
        .cc = NULL,
 };
 
-static cycle_t xilinx_cc_read(const struct cyclecounter *cc)
+static u64 xilinx_cc_read(const struct cyclecounter *cc)
 {
        return xilinx_read(NULL);
 }
index f99d3ec17a459237a05dd76253ed7ef26d5bbca9..e1bec5a77c3941ee17cdcc114b8981a6c3c188cf 100644 (file)
@@ -44,7 +44,7 @@
 /* 32kHz clock enabled and detected */
 #define CNTR_OK (SYS_CNTRL_E0 | SYS_CNTRL_32S)
 
-static cycle_t au1x_counter1_read(struct clocksource *cs)
+static u64 au1x_counter1_read(struct clocksource *cs)
 {
        return alchemy_rdsys(AU1000_SYS_RTCREAD);
 }
index 23c2344a35525fa9a0badfb3bbca9a89d60293c5..39f153fe0022a349791fcc2c605b83b5a8fc027b 100644 (file)
@@ -98,7 +98,7 @@ void octeon_init_cvmcount(void)
        local_irq_restore(flags);
 }
 
-static cycle_t octeon_cvmcount_read(struct clocksource *cs)
+static u64 octeon_cvmcount_read(struct clocksource *cs)
 {
        return read_c0_cvmcount();
 }
index 1f7ca2c9f26259c52382e091dbef166a41e046f6..bcf8f8c6273774f63e56efcbb6e423cb7b6bf5b2 100644 (file)
@@ -34,7 +34,7 @@
 
 static uint16_t jz4740_jiffies_per_tick;
 
-static cycle_t jz4740_clocksource_read(struct clocksource *cs)
+static u64 jz4740_clocksource_read(struct clocksource *cs)
 {
        return jz4740_timer_get_count(TIMER_CLOCKSOURCE);
 }
index 537eefdf838fec40cc0a947008c01ea0084ca0b3..aaca60d6ffc31f4320e740ac27b6b986065772b5 100644 (file)
@@ -27,7 +27,7 @@ struct txx9_clocksource {
        struct txx9_tmr_reg __iomem *tmrptr;
 };
 
-static cycle_t txx9_cs_read(struct clocksource *cs)
+static u64 txx9_cs_read(struct clocksource *cs)
 {
        struct txx9_clocksource *txx9_cs =
                container_of(cs, struct txx9_clocksource, cs);
index 7f65b53d1b242eda3a67c889c731956ddcdf5e1a..f011261e95061860c4590036f96670336eb3ea91 100644 (file)
@@ -25,9 +25,9 @@
 
 #include <asm/sibyte/sb1250.h>
 
-static cycle_t bcm1480_hpt_read(struct clocksource *cs)
+static u64 bcm1480_hpt_read(struct clocksource *cs)
 {
-       return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
+       return (u64) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
 }
 
 struct clocksource bcm1480_clocksource = {
index 722f5589cd1dcdb1ec8440ca5fa93af219deb7ce..f6acd1e58c26103b5ad13c0e6368523b7c375265 100644 (file)
@@ -22,7 +22,7 @@
 #include <asm/dec/ioasic.h>
 #include <asm/dec/ioasic_addrs.h>
 
-static cycle_t dec_ioasic_hpt_read(struct clocksource *cs)
+static u64 dec_ioasic_hpt_read(struct clocksource *cs)
 {
        return ioasic_read(IO_REG_FCTR);
 }
index d76275da54cb89df684a9575dd33461fd22da3d8..eed099f35bf13af6e1e05122017c90dd5ae283d3 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <asm/time.h>
 
-static cycle_t c0_hpt_read(struct clocksource *cs)
+static u64 c0_hpt_read(struct clocksource *cs)
 {
        return read_c0_count();
 }
index d915652b4d56f88585fdb16428c2761a85e32c11..b07b7310d3f422cd91c1a20f96b8a72c9cfa44f5 100644 (file)
@@ -30,7 +30,7 @@
  * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
  * again.
  */
-static inline cycle_t sb1250_hpt_get_cycles(void)
+static inline u64 sb1250_hpt_get_cycles(void)
 {
        unsigned int count;
        void __iomem *addr;
@@ -41,7 +41,7 @@ static inline cycle_t sb1250_hpt_get_cycles(void)
        return SB1250_HPT_VALUE - count;
 }
 
-static cycle_t sb1250_hpt_read(struct clocksource *cs)
+static u64 sb1250_hpt_read(struct clocksource *cs)
 {
        return sb1250_hpt_get_cycles();
 }
index ff224f0020e504da5e45f6c0e0264eba526b1669..e6f972d35252cabc0c41b0e8a26bd994e5631351 100644 (file)
@@ -63,7 +63,7 @@ void __init ls1x_pwmtimer_init(void)
        ls1x_pwmtimer_restart();
 }
 
-static cycle_t ls1x_clocksource_read(struct clocksource *cs)
+static u64 ls1x_clocksource_read(struct clocksource *cs)
 {
        unsigned long flags;
        int count;
@@ -107,7 +107,7 @@ static cycle_t ls1x_clocksource_read(struct clocksource *cs)
 
        raw_spin_unlock_irqrestore(&ls1x_timer_lock, flags);
 
-       return (cycle_t) (jifs * ls1x_jiffies_per_tick) + count;
+       return (u64) (jifs * ls1x_jiffies_per_tick) + count;
 }
 
 static struct clocksource ls1x_clocksource = {
index da77d412514c03db21e6577466a9c8b8e8ac158b..9edfa55a0e7828d5f1b7ba10d91bb627650d7d00 100644 (file)
@@ -144,7 +144,7 @@ void __init setup_mfgpt0_timer(void)
  * to just read by itself. So use jiffies to emulate a free
  * running counter:
  */
-static cycle_t mfgpt_read(struct clocksource *cs)
+static u64 mfgpt_read(struct clocksource *cs)
 {
        unsigned long flags;
        int count;
@@ -188,7 +188,7 @@ static cycle_t mfgpt_read(struct clocksource *cs)
 
        raw_spin_unlock_irqrestore(&mfgpt_lock, flags);
 
-       return (cycle_t) (jifs * COMPARE) + count;
+       return (u64) (jifs * COMPARE) + count;
 }
 
 static struct clocksource clocksource_mfgpt = {
index 4788bea62a6ab1dfe411dac5122f834a68e3ec3e..24afe364637bc447909329f06f8d9aa9c2e351ff 100644 (file)
@@ -248,9 +248,9 @@ void __init setup_hpet_timer(void)
        pr_info("hpet clock event device register\n");
 }
 
-static cycle_t hpet_read_counter(struct clocksource *cs)
+static u64 hpet_read_counter(struct clocksource *cs)
 {
-       return (cycle_t)hpet_read(HPET_COUNTER);
+       return (u64)hpet_read(HPET_COUNTER);
 }
 
 static void hpet_suspend(struct clocksource *cs)
index 7407da04f8d6bc1cf0da21b4800530087f7d0c88..1829a9031eec7aaa2fd68727db9c111c0517ca81 100644 (file)
@@ -75,7 +75,7 @@ static void __init estimate_frequencies(void)
        unsigned int count, start;
        unsigned char secs1, secs2, ctrl;
        int secs;
-       cycle_t giccount = 0, gicstart = 0;
+       u64 giccount = 0, gicstart = 0;
 
 #if defined(CONFIG_KVM_GUEST) && CONFIG_KVM_GUEST_TIMER_FREQ
        mips_hpt_frequency = CONFIG_KVM_GUEST_TIMER_FREQ * 1000000;
index 5873c83e65be05bc0f07417c5d3929a4b41e61e2..cbbf0d48216be732ed3cc50ad01c5ee6fd36d3b5 100644 (file)
@@ -59,14 +59,14 @@ unsigned int get_c0_compare_int(void)
        return IRQ_TIMER;
 }
 
-static cycle_t nlm_get_pic_timer(struct clocksource *cs)
+static u64 nlm_get_pic_timer(struct clocksource *cs)
 {
        uint64_t picbase = nlm_get_node(0)->picbase;
 
        return ~nlm_pic_read_timer(picbase, PIC_CLOCK_TIMER);
 }
 
-static cycle_t nlm_get_pic_timer32(struct clocksource *cs)
+static u64 nlm_get_pic_timer32(struct clocksource *cs)
 {
        uint64_t picbase = nlm_get_node(0)->picbase;
 
index 42d6cb9f956e35500d5a1b3268685447ebd5f7f2..695c51bdd7dcb1ed84f1ce6f801c8dff3bcf874a 100644 (file)
@@ -140,7 +140,7 @@ static void __init hub_rt_clock_event_global_init(void)
        setup_irq(irq, &hub_rt_irqaction);
 }
 
-static cycle_t hub_rt_read(struct clocksource *cs)
+static u64 hub_rt_read(struct clocksource *cs)
 {
        return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
 }
index 45644cf18c41245904722c405d7faeff4861838a..6b74df3661f22aa1dbf13b77b7b68702da0fbe98 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/timex.h>
 #include "internal.h"
 
-static cycle_t mn10300_read(struct clocksource *cs)
+static u64 mn10300_read(struct clocksource *cs)
 {
        return read_timestamp_counter();
 }
index 746bf5caaffc7989884813b16bc3fd3fce85d0ef..6e2bdc9b8530e1745f01de61eab96d3fb660551c 100644 (file)
@@ -81,7 +81,7 @@ static inline unsigned long read_timersnapshot(struct nios2_timer *timer)
        return count;
 }
 
-static cycle_t nios2_timer_read(struct clocksource *cs)
+static u64 nios2_timer_read(struct clocksource *cs)
 {
        struct nios2_clocksource *nios2_cs = to_nios2_clksource(cs);
        unsigned long flags;
index 50e970183dcd7e996431fcfa8d6645f494128d8a..687c11d048d7c2493c7d302e3c0cd053f99ef360 100644 (file)
@@ -117,9 +117,9 @@ static __init void openrisc_clockevent_init(void)
  * is 32 bits wide and runs at the CPU clock frequency.
  */
 
-static cycle_t openrisc_timer_read(struct clocksource *cs)
+static u64 openrisc_timer_read(struct clocksource *cs)
 {
-       return (cycle_t) mfspr(SPR_TTCR);
+       return (u64) mfspr(SPR_TTCR);
 }
 
 static struct clocksource openrisc_timer = {
index 037d81f00520db1e7f5b41fb4150f1820ac2f9ea..da0d9cb63403d4b3b4f9647cf8415dd11db30fd3 100644 (file)
@@ -137,7 +137,7 @@ EXPORT_SYMBOL(profile_pc);
 
 /* clock source code */
 
-static cycle_t notrace read_cr16(struct clocksource *cs)
+static u64 notrace read_cr16(struct clocksource *cs)
 {
        return get_cycles();
 }
index 19397e2a8bf5a51ded5eb4f09907b0947631761d..bc2e08d415fa3af8fea6d6f3e63b75e2900c78ff 100644 (file)
@@ -80,7 +80,7 @@
 #include <linux/clockchips.h>
 #include <linux/timekeeper_internal.h>
 
-static cycle_t rtc_read(struct clocksource *);
+static u64 rtc_read(struct clocksource *);
 static struct clocksource clocksource_rtc = {
        .name         = "rtc",
        .rating       = 400,
@@ -89,7 +89,7 @@ static struct clocksource clocksource_rtc = {
        .read         = rtc_read,
 };
 
-static cycle_t timebase_read(struct clocksource *);
+static u64 timebase_read(struct clocksource *);
 static struct clocksource clocksource_timebase = {
        .name         = "timebase",
        .rating       = 400,
@@ -802,18 +802,18 @@ void read_persistent_clock(struct timespec *ts)
 }
 
 /* clocksource code */
-static cycle_t rtc_read(struct clocksource *cs)
+static u64 rtc_read(struct clocksource *cs)
 {
-       return (cycle_t)get_rtc();
+       return (u64)get_rtc();
 }
 
-static cycle_t timebase_read(struct clocksource *cs)
+static u64 timebase_read(struct clocksource *cs)
 {
-       return (cycle_t)get_tb();
+       return (u64)get_tb();
 }
 
 void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,
-                        struct clocksource *clock, u32 mult, cycle_t cycle_last)
+                        struct clocksource *clock, u32 mult, u64 cycle_last)
 {
        u64 new_tb_to_xs, new_stamp_xsec;
        u32 frac_sec;
index 66b2a35be424e0f158e93e273c11599e9de809aa..ec34e39471a78b3e60e2701f6a4e0bdf07b16de3 100644 (file)
@@ -1872,8 +1872,7 @@ static void kvmppc_set_timer(struct kvm_vcpu *vcpu)
        }
        dec_nsec = (vcpu->arch.dec_expires - now) * NSEC_PER_SEC
                   / tb_ticks_per_sec;
-       hrtimer_start(&vcpu->arch.dec_timer, ktime_set(0, dec_nsec),
-                     HRTIMER_MODE_REL);
+       hrtimer_start(&vcpu->arch.dec_timer, dec_nsec, HRTIMER_MODE_REL);
        vcpu->arch.timer_running = 1;
 }
 
index b19265de91784158abcb17c3e6fed4282c30bae6..5182f2936af2c8c718ee06e65a837d174fa88d19 100644 (file)
@@ -180,7 +180,7 @@ static enum hrtimer_restart profile_spus(struct hrtimer *timer)
        smp_wmb();      /* insure spu event buffer updates are written */
                        /* don't want events intermingled... */
 
-       kt = ktime_set(0, profiling_interval);
+       kt = profiling_interval;
        if (!spu_prof_running)
                goto stop;
        hrtimer_forward(timer, timer->base->get_time(), kt);
@@ -204,7 +204,7 @@ int start_spu_profiling_cycles(unsigned int cycles_reset)
        ktime_t kt;
 
        pr_debug("timer resolution: %lu\n", TICK_NSEC);
-       kt = ktime_set(0, profiling_interval);
+       kt = profiling_interval;
        hrtimer_init(&timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        hrtimer_set_expires(&timer, kt);
        timer.function = profile_spus;
index ec76315c9ee56e1db679850570b65b998e412242..52949df8852996985fd974c5f04d72c58d0e287d 100644 (file)
@@ -209,7 +209,7 @@ void read_boot_clock64(struct timespec64 *ts)
        tod_to_timeval(clock - TOD_UNIX_EPOCH, ts);
 }
 
-static cycle_t read_tod_clock(struct clocksource *cs)
+static u64 read_tod_clock(struct clocksource *cs)
 {
        unsigned long long now, adj;
 
index 6843dd5a1cbabba182b427e2ac74fc44a1f2fff6..0f8f14199734e94bd96ae0158be5c4a9a3c0333d 100644 (file)
@@ -1019,7 +1019,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
                return 0;
 
        __set_cpu_idle(vcpu);
-       hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL);
+       hrtimer_start(&vcpu->arch.ckc_timer, sltime, HRTIMER_MODE_REL);
        VCPU_EVENT(vcpu, 4, "enabled wait: %llu ns", sltime);
 no_timer:
        srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx);
index 1affabc96b087bb699a339372f0b0f963c92ecbd..244062bdaa564b9ea3471da9b6a9fe86125fa00e 100644 (file)
@@ -148,7 +148,7 @@ static unsigned int sbus_cycles_offset(void)
        return offset;
 }
 
-static cycle_t timer_cs_read(struct clocksource *cs)
+static u64 timer_cs_read(struct clocksource *cs)
 {
        unsigned int seq, offset;
        u64 cycles;
index 807f7e2ce014a18e68a9370a99efcb32d37ded10..12a6d3555cb84332a5755ad18c13eb84b62c60b6 100644 (file)
@@ -770,7 +770,7 @@ void udelay(unsigned long usecs)
 }
 EXPORT_SYMBOL(udelay);
 
-static cycle_t clocksource_tick_read(struct clocksource *cs)
+static u64 clocksource_tick_read(struct clocksource *cs)
 {
        return tick_ops->get_tick();
 }
index 25c23666d5924836c1ab19a95cbdefa1c70e7ab1..ba87a27d6715872d77723eff3c480cf587589d61 100644 (file)
@@ -83,7 +83,7 @@ static irqreturn_t um_timer(int irq, void *dev)
        return IRQ_HANDLED;
 }
 
-static cycle_t timer_read(struct clocksource *cs)
+static u64 timer_read(struct clocksource *cs)
 {
        return os_nsecs() / TIMER_MULTIPLIER;
 }
index ac4c5449bb88dad90a1f194088f84d724aa4c622..fceaa673f8614f0ef0a375ff9007c813bc8710fe 100644 (file)
@@ -62,7 +62,7 @@ static struct clock_event_device ckevt_puv3_osmr0 = {
        .set_state_oneshot      = puv3_osmr0_shutdown,
 };
 
-static cycle_t puv3_read_oscr(struct clocksource *cs)
+static u64 puv3_read_oscr(struct clocksource *cs)
 {
        return readl(OST_OSCR);
 }
index 02223cb4bcfd8155f041aac6ccd11a448ec5ebbe..9d4d6e1383117b5091a172b1c373eb2dc7ed3c2e 100644 (file)
@@ -92,10 +92,10 @@ static notrace const struct pvclock_vsyscall_time_info *get_pvti0(void)
        return (const struct pvclock_vsyscall_time_info *)&pvclock_page;
 }
 
-static notrace cycle_t vread_pvclock(int *mode)
+static notrace u64 vread_pvclock(int *mode)
 {
        const struct pvclock_vcpu_time_info *pvti = &get_pvti0()->pvti;
-       cycle_t ret;
+       u64 ret;
        u64 last;
        u32 version;
 
@@ -142,9 +142,9 @@ static notrace cycle_t vread_pvclock(int *mode)
 }
 #endif
 
-notrace static cycle_t vread_tsc(void)
+notrace static u64 vread_tsc(void)
 {
-       cycle_t ret = (cycle_t)rdtsc_ordered();
+       u64 ret = (u64)rdtsc_ordered();
        u64 last = gtod->cycle_last;
 
        if (likely(ret >= last))
index 2e25038dbd932cfec9381eccbc1f4c30fe0c7b2e..a7066dc1a7e9ca894784b3eeee328c214f1c6162 100644 (file)
@@ -768,7 +768,7 @@ struct kvm_arch {
        spinlock_t pvclock_gtod_sync_lock;
        bool use_master_clock;
        u64 master_kernel_ns;
-       cycle_t master_cycle_now;
+       u64 master_cycle_now;
        struct delayed_work kvmclock_update_work;
        struct delayed_work kvmclock_sync_work;
 
index 3ad741b84072b33f85c386c0abfda7eda649de39..448cfe1b48cf02b46c76b76cf2aa0be93b3df0bc 100644 (file)
@@ -14,7 +14,7 @@ static inline struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void)
 #endif
 
 /* some helper functions for xen and kvm pv clock sources */
-cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
+u64 pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
 u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src);
 void pvclock_set_flags(u8 flags);
 unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src);
@@ -87,11 +87,10 @@ static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
 }
 
 static __always_inline
-cycle_t __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src,
-                             u64 tsc)
+u64 __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src, u64 tsc)
 {
        u64 delta = tsc - src->tsc_timestamp;
-       cycle_t offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
+       u64 offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
                                             src->tsc_shift);
        return src->system_time + offset;
 }
index abb1fdcc545a530f59880b3e7e754cf6034bf9a2..f5e6f1c417df8724ad1f851f20259b75ecfc875f 100644 (file)
@@ -29,7 +29,7 @@ static inline cycles_t get_cycles(void)
        return rdtsc();
 }
 
-extern struct system_counterval_t convert_art_to_tsc(cycle_t art);
+extern struct system_counterval_t convert_art_to_tsc(u64 art);
 
 extern void tsc_init(void);
 extern void mark_tsc_unstable(char *reason);
index 3a01996db58fbf7bfa41ca52c86f323d4bb6c937..022e5971456260e108981ce451ea23099558d6ce 100644 (file)
@@ -17,8 +17,8 @@ struct vsyscall_gtod_data {
        unsigned seq;
 
        int vclock_mode;
-       cycle_t cycle_last;
-       cycle_t mask;
+       u64     cycle_last;
+       u64     mask;
        u32     mult;
        u32     shift;
 
index 202a7817beaf4a921c1d1115fdc881652ef42d78..65721dc73bd83b982154c5d5e0f52e06b0ccad29 100644 (file)
@@ -247,7 +247,7 @@ void apbt_setup_secondary_clock(void) {}
 static int apbt_clocksource_register(void)
 {
        u64 start, now;
-       cycle_t t1;
+       u64 t1;
 
        /* Start the counter, use timer 2 as source, timer 0/1 for event */
        dw_apb_clocksource_start(clocksource_apbt);
@@ -355,7 +355,7 @@ unsigned long apbt_quick_calibrate(void)
 {
        int i, scale;
        u64 old, new;
-       cycle_t t1, t2;
+       u64 t1, t2;
        unsigned long khz = 0;
        u32 loop, shift;
 
index f37e02e41a7755f68f9db3b2a9b95b6ecef9206e..65e20c97e04b1e2591a356eda4e922ed92ec0310 100644 (file)
@@ -133,9 +133,9 @@ static uint32_t  __init ms_hyperv_platform(void)
        return 0;
 }
 
-static cycle_t read_hv_clock(struct clocksource *arg)
+static u64 read_hv_clock(struct clocksource *arg)
 {
-       cycle_t current_tick;
+       u64 current_tick;
        /*
         * Read the partition counter to get the current tick count. This count
         * is set to 0 when the partition is created and is incremented in
index 38c8fd684d38b87bb1310a59215da8c9df57a251..85e87b46c318026ed28d87056c516aec3e5fb9ed 100644 (file)
@@ -791,7 +791,7 @@ static union hpet_lock hpet __cacheline_aligned = {
        { .lock = __ARCH_SPIN_LOCK_UNLOCKED, },
 };
 
-static cycle_t read_hpet(struct clocksource *cs)
+static u64 read_hpet(struct clocksource *cs)
 {
        unsigned long flags;
        union hpet_lock old, new;
@@ -802,7 +802,7 @@ static cycle_t read_hpet(struct clocksource *cs)
         * Read HPET directly if in NMI.
         */
        if (in_nmi())
-               return (cycle_t)hpet_readl(HPET_COUNTER);
+               return (u64)hpet_readl(HPET_COUNTER);
 
        /*
         * Read the current state of the lock and HPET value atomically.
@@ -821,7 +821,7 @@ static cycle_t read_hpet(struct clocksource *cs)
                WRITE_ONCE(hpet.value, new.value);
                arch_spin_unlock(&hpet.lock);
                local_irq_restore(flags);
-               return (cycle_t)new.value;
+               return (u64)new.value;
        }
        local_irq_restore(flags);
 
@@ -843,15 +843,15 @@ contended:
                new.lockval = READ_ONCE(hpet.lockval);
        } while ((new.value == old.value) && arch_spin_is_locked(&new.lock));
 
-       return (cycle_t)new.value;
+       return (u64)new.value;
 }
 #else
 /*
  * For UP or 32-bit.
  */
-static cycle_t read_hpet(struct clocksource *cs)
+static u64 read_hpet(struct clocksource *cs)
 {
-       return (cycle_t)hpet_readl(HPET_COUNTER);
+       return (u64)hpet_readl(HPET_COUNTER);
 }
 #endif
 
@@ -867,7 +867,7 @@ static struct clocksource clocksource_hpet = {
 static int hpet_clocksource_register(void)
 {
        u64 start, now;
-       cycle_t t1;
+       u64 t1;
 
        /* Start the counter */
        hpet_restart_counter();
index 60b9949f1e65129464ad717bf1381c0a14206645..2a5cafdf8808eee394039c30f0700c234e4a615b 100644 (file)
@@ -32,7 +32,7 @@
 static int kvmclock __ro_after_init = 1;
 static int msr_kvm_system_time = MSR_KVM_SYSTEM_TIME;
 static int msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK;
-static cycle_t kvm_sched_clock_offset;
+static u64 kvm_sched_clock_offset;
 
 static int parse_no_kvmclock(char *arg)
 {
@@ -79,10 +79,10 @@ static int kvm_set_wallclock(const struct timespec *now)
        return -1;
 }
 
-static cycle_t kvm_clock_read(void)
+static u64 kvm_clock_read(void)
 {
        struct pvclock_vcpu_time_info *src;
-       cycle_t ret;
+       u64 ret;
        int cpu;
 
        preempt_disable_notrace();
@@ -93,12 +93,12 @@ static cycle_t kvm_clock_read(void)
        return ret;
 }
 
-static cycle_t kvm_clock_get_cycles(struct clocksource *cs)
+static u64 kvm_clock_get_cycles(struct clocksource *cs)
 {
        return kvm_clock_read();
 }
 
-static cycle_t kvm_sched_clock_read(void)
+static u64 kvm_sched_clock_read(void)
 {
        return kvm_clock_read() - kvm_sched_clock_offset;
 }
index 5b2cc889ce346586527ff260f018b5d7d436ca8f..9e93fe5803b470676997cec46a5f05f6e3c1177c 100644 (file)
@@ -71,10 +71,10 @@ u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src)
        return flags & valid_flags;
 }
 
-cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
+u64 pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
 {
        unsigned version;
-       cycle_t ret;
+       u64 ret;
        u64 last;
        u8 flags;
 
index 0aed75a1e31b0e7f88d3f3f105ea4207f5bcade2..be3a49ee035650f1f1eac68c07ad0e8898c40585 100644 (file)
@@ -1101,9 +1101,9 @@ static void tsc_resume(struct clocksource *cs)
  * checking the result of read_tsc() - cycle_last for being negative.
  * That works because CLOCKSOURCE_MASK(64) does not mask out any bit.
  */
-static cycle_t read_tsc(struct clocksource *cs)
+static u64 read_tsc(struct clocksource *cs)
 {
-       return (cycle_t)rdtsc_ordered();
+       return (u64)rdtsc_ordered();
 }
 
 /*
@@ -1192,7 +1192,7 @@ int unsynchronized_tsc(void)
 /*
  * Convert ART to TSC given numerator/denominator found in detect_art()
  */
-struct system_counterval_t convert_art_to_tsc(cycle_t art)
+struct system_counterval_t convert_art_to_tsc(u64 art)
 {
        u64 tmp, res, rem;
 
index 34a66b2d47e656b5be5c91c6d9e6fe0c93616ada..5fe290c1b7d892729e7cfd637433b8171423f407 100644 (file)
@@ -1106,7 +1106,7 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic)
        now = ktime_get();
        remaining = ktime_sub(apic->lapic_timer.target_expiration, now);
        if (ktime_to_ns(remaining) < 0)
-               remaining = ktime_set(0, 0);
+               remaining = 0;
 
        ns = mod_64(ktime_to_ns(remaining), apic->lapic_timer.period);
        tmcct = div64_u64(ns,
@@ -2057,7 +2057,7 @@ void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu)
                        apic->lapic_timer.tscdeadline = 0;
                if (apic_lvtt_oneshot(apic)) {
                        apic->lapic_timer.tscdeadline = 0;
-                       apic->lapic_timer.target_expiration = ktime_set(0, 0);
+                       apic->lapic_timer.target_expiration = 0;
                }
                atomic_set(&apic->lapic_timer.pending, 0);
        }
index 6414fa6cb9fd561853fff141b333498c951c968b..51ccfe08e32ff0570517fda01277dc0085721e94 100644 (file)
@@ -1131,8 +1131,8 @@ struct pvclock_gtod_data {
 
        struct { /* extract of a clocksource struct */
                int vclock_mode;
-               cycle_t cycle_last;
-               cycle_t mask;
+               u64     cycle_last;
+               u64     mask;
                u32     mult;
                u32     shift;
        } clock;
@@ -1572,9 +1572,9 @@ static inline void adjust_tsc_offset_host(struct kvm_vcpu *vcpu, s64 adjustment)
 
 #ifdef CONFIG_X86_64
 
-static cycle_t read_tsc(void)
+static u64 read_tsc(void)
 {
-       cycle_t ret = (cycle_t)rdtsc_ordered();
+       u64 ret = (u64)rdtsc_ordered();
        u64 last = pvclock_gtod_data.clock.cycle_last;
 
        if (likely(ret >= last))
@@ -1592,7 +1592,7 @@ static cycle_t read_tsc(void)
        return last;
 }
 
-static inline u64 vgettsc(cycle_t *cycle_now)
+static inline u64 vgettsc(u64 *cycle_now)
 {
        long v;
        struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
@@ -1603,7 +1603,7 @@ static inline u64 vgettsc(cycle_t *cycle_now)
        return v * gtod->clock.mult;
 }
 
-static int do_monotonic_boot(s64 *t, cycle_t *cycle_now)
+static int do_monotonic_boot(s64 *t, u64 *cycle_now)
 {
        struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
        unsigned long seq;
@@ -1624,7 +1624,7 @@ static int do_monotonic_boot(s64 *t, cycle_t *cycle_now)
 }
 
 /* returns true if host is using tsc clocksource */
-static bool kvm_get_time_and_clockread(s64 *kernel_ns, cycle_t *cycle_now)
+static bool kvm_get_time_and_clockread(s64 *kernel_ns, u64 *cycle_now)
 {
        /* checked again under seqlock below */
        if (pvclock_gtod_data.clock.vclock_mode != VCLOCK_TSC)
index 4ca0d78adcf0832f7f722ef090dfa92d00824ab3..d3289d7e78fac8ac98a40e3b62b9dcd406402910 100644 (file)
@@ -916,7 +916,7 @@ static unsigned long lguest_tsc_khz(void)
  * If we can't use the TSC, the kernel falls back to our lower-priority
  * "lguest_clock", where we read the time value given to us by the Host.
  */
-static cycle_t lguest_clock_read(struct clocksource *cs)
+static u64 lguest_clock_read(struct clocksource *cs)
 {
        unsigned long sec, nsec;
 
index b333fc45f9ec8025e72b2ad29abfeffbc7285e4b..2ee7632d49162f18812f01ae78f5fbd081128845 100644 (file)
@@ -30,7 +30,7 @@
 
 #define RTC_NAME               "sgi_rtc"
 
-static cycle_t uv_read_rtc(struct clocksource *cs);
+static u64 uv_read_rtc(struct clocksource *cs);
 static int uv_rtc_next_event(unsigned long, struct clock_event_device *);
 static int uv_rtc_shutdown(struct clock_event_device *evt);
 
@@ -38,7 +38,7 @@ static struct clocksource clocksource_uv = {
        .name           = RTC_NAME,
        .rating         = 299,
        .read           = uv_read_rtc,
-       .mask           = (cycle_t)UVH_RTC_REAL_TIME_CLOCK_MASK,
+       .mask           = (u64)UVH_RTC_REAL_TIME_CLOCK_MASK,
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
@@ -296,7 +296,7 @@ static int uv_rtc_unset_timer(int cpu, int force)
  * cachelines of it's own page.  This allows faster simultaneous reads
  * from a given socket.
  */
-static cycle_t uv_read_rtc(struct clocksource *cs)
+static u64 uv_read_rtc(struct clocksource *cs)
 {
        unsigned long offset;
 
@@ -305,7 +305,7 @@ static cycle_t uv_read_rtc(struct clocksource *cs)
        else
                offset = (uv_blade_processor_id() * L1_CACHE_BYTES) % PAGE_SIZE;
 
-       return (cycle_t)uv_read_local_mmr(UVH_RTC | offset);
+       return (u64)uv_read_local_mmr(UVH_RTC | offset);
 }
 
 /*
index 33d8f6a7829d75c6673a8287d8a9d4be68401d9e..1e69956d7852bbfc8816acfb3bdd3d701ed99d59 100644 (file)
@@ -39,10 +39,10 @@ static unsigned long xen_tsc_khz(void)
        return pvclock_tsc_khz(info);
 }
 
-cycle_t xen_clocksource_read(void)
+u64 xen_clocksource_read(void)
 {
         struct pvclock_vcpu_time_info *src;
-       cycle_t ret;
+       u64 ret;
 
        preempt_disable_notrace();
        src = &__this_cpu_read(xen_vcpu)->time;
@@ -51,7 +51,7 @@ cycle_t xen_clocksource_read(void)
        return ret;
 }
 
-static cycle_t xen_clocksource_get_cycles(struct clocksource *cs)
+static u64 xen_clocksource_get_cycles(struct clocksource *cs)
 {
        return xen_clocksource_read();
 }
index 3cbce3b085e73519973d766a75c86520723c219a..ac0a2b0f9e626088fd44670c1709e0bf2da2900f 100644 (file)
@@ -67,7 +67,7 @@ void xen_init_irq_ops(void);
 void xen_setup_timer(int cpu);
 void xen_setup_runstate_info(int cpu);
 void xen_teardown_timer(int cpu);
-cycle_t xen_clocksource_read(void);
+u64 xen_clocksource_read(void);
 void xen_setup_cpu_clockevents(void);
 void __init xen_init_time_ops(void);
 void __init xen_hvm_init_time_ops(void);
index be81e69b25bc98e46514c46e4a5a030afb87ecca..668c1056f9e49bf8ca23234d16dc44fec9bec9b2 100644 (file)
@@ -34,9 +34,9 @@
 unsigned long ccount_freq;             /* ccount Hz */
 EXPORT_SYMBOL(ccount_freq);
 
-static cycle_t ccount_read(struct clocksource *cs)
+static u64 ccount_read(struct clocksource *cs)
 {
-       return (cycle_t)get_ccount();
+       return (u64)get_ccount();
 }
 
 static u64 notrace ccount_sched_clock_read(void)
index 4bf850e8d6b5abf5a1f5252ab3bfe6dd10de6111..a8e67a155d04f6d937e890473b1647fbe95d210f 100644 (file)
@@ -2569,7 +2569,7 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q,
         * This will be replaced with the stats tracking code, using
         * 'avg_completion_time / 2' as the pre-sleep target.
         */
-       kt = ktime_set(0, nsecs);
+       kt = nsecs;
 
        mode = HRTIMER_MODE_REL;
        hrtimer_init_on_stack(&hs.timer, CLOCK_MONOTONIC, mode);
index 48c6294e9c342850cbc602c247d4cb27f2a65970..249e0304597f5bb6e4e48a26725bc712b1a5120b 100644 (file)
@@ -194,7 +194,7 @@ void device_pm_move_last(struct device *dev)
 
 static ktime_t initcall_debug_start(struct device *dev)
 {
-       ktime_t calltime = ktime_set(0, 0);
+       ktime_t calltime = 0;
 
        if (pm_print_times_enabled) {
                pr_info("calling  %s+ @ %i, parent: %s\n",
index bf9ba26981a5590f97c6cf029bbf0ccb1fe31aa8..f546f8f107b06a456fc01738d1f8b2c6bcce1b53 100644 (file)
@@ -998,14 +998,14 @@ static int print_wakeup_source_stats(struct seq_file *m,
 
                active_time = ktime_sub(now, ws->last_time);
                total_time = ktime_add(total_time, active_time);
-               if (active_time.tv64 > max_time.tv64)
+               if (active_time > max_time)
                        max_time = active_time;
 
                if (ws->autosleep_enabled)
                        prevent_sleep_time = ktime_add(prevent_sleep_time,
                                ktime_sub(now, ws->start_prevent_time));
        } else {
-               active_time = ktime_set(0, 0);
+               active_time = 0;
        }
 
        seq_printf(m, "%-12s\t%lu\t\t%lu\t\t%lu\t\t%lu\t\t%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
index 4943ee22716e04a3b1427161f28ca9bafdd68a95..c0e14e54909b41b8f8e2f916be0d1169464ff643 100644 (file)
@@ -257,7 +257,7 @@ static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer)
 
 static void null_cmd_end_timer(struct nullb_cmd *cmd)
 {
-       ktime_t kt = ktime_set(0, completion_nsec);
+       ktime_t kt = completion_nsec;
 
        hrtimer_start(&cmd->timer, kt, HRTIMER_MODE_REL);
 }
index be54e5331a4517899e0e4ace0c48418cbb082a0e..20b32bb8c2aff5f57aa93e4eaa657e5275bf9313 100644 (file)
@@ -69,9 +69,9 @@ static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
 #ifdef CONFIG_IA64
 static void __iomem *hpet_mctr;
 
-static cycle_t read_hpet(struct clocksource *cs)
+static u64 read_hpet(struct clocksource *cs)
 {
-       return (cycle_t)read_counter((void __iomem *)hpet_mctr);
+       return (u64)read_counter((void __iomem *)hpet_mctr);
 }
 
 static struct clocksource clocksource_hpet = {
index 28037d0b8dcd133c4be8814bf609342c1520d0c4..1961e3539b5760fd78bd8c076ad790ffad729dc1 100644 (file)
@@ -58,16 +58,16 @@ u32 acpi_pm_read_verified(void)
        return v2;
 }
 
-static cycle_t acpi_pm_read(struct clocksource *cs)
+static u64 acpi_pm_read(struct clocksource *cs)
 {
-       return (cycle_t)read_pmtmr();
+       return (u64)read_pmtmr();
 }
 
 static struct clocksource clocksource_acpi_pm = {
        .name           = "acpi_pm",
        .rating         = 200,
        .read           = acpi_pm_read,
-       .mask           = (cycle_t)ACPI_PM_MASK,
+       .mask           = (u64)ACPI_PM_MASK,
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
@@ -81,9 +81,9 @@ static int __init acpi_pm_good_setup(char *__str)
 }
 __setup("acpi_pm_good", acpi_pm_good_setup);
 
-static cycle_t acpi_pm_read_slow(struct clocksource *cs)
+static u64 acpi_pm_read_slow(struct clocksource *cs)
 {
-       return (cycle_t)acpi_pm_read_verified();
+       return (u64)acpi_pm_read_verified();
 }
 
 static inline void acpi_pm_need_workaround(void)
@@ -145,7 +145,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE,
  */
 static int verify_pmtmr_rate(void)
 {
-       cycle_t value1, value2;
+       u64 value1, value2;
        unsigned long count, delta;
 
        mach_prepare_counter();
@@ -175,7 +175,7 @@ static int verify_pmtmr_rate(void)
 
 static int __init init_acpi_pm_clocksource(void)
 {
-       cycle_t value1, value2;
+       u64 value1, value2;
        unsigned int i, j = 0;
 
        if (!pmtmr_ioport)
index 2b7e87134d1a5631286aa921325e28bd57828d8f..7517f959cba762e484cdc1fb00a78cb95aee5fe0 100644 (file)
@@ -56,7 +56,7 @@ static int noinline arc_get_timer_clk(struct device_node *node)
 
 #ifdef CONFIG_ARC_TIMERS_64BIT
 
-static cycle_t arc_read_gfrc(struct clocksource *cs)
+static u64 arc_read_gfrc(struct clocksource *cs)
 {
        unsigned long flags;
        u32 l, h;
@@ -71,7 +71,7 @@ static cycle_t arc_read_gfrc(struct clocksource *cs)
 
        local_irq_restore(flags);
 
-       return (((cycle_t)h) << 32) | l;
+       return (((u64)h) << 32) | l;
 }
 
 static struct clocksource arc_counter_gfrc = {
@@ -105,7 +105,7 @@ CLOCKSOURCE_OF_DECLARE(arc_gfrc, "snps,archs-timer-gfrc", arc_cs_setup_gfrc);
 #define AUX_RTC_LOW    0x104
 #define AUX_RTC_HIGH   0x105
 
-static cycle_t arc_read_rtc(struct clocksource *cs)
+static u64 arc_read_rtc(struct clocksource *cs)
 {
        unsigned long status;
        u32 l, h;
@@ -122,7 +122,7 @@ static cycle_t arc_read_rtc(struct clocksource *cs)
                status = read_aux_reg(AUX_RTC_CTRL);
        } while (!(status & _BITUL(31)));
 
-       return (((cycle_t)h) << 32) | l;
+       return (((u64)h) << 32) | l;
 }
 
 static struct clocksource arc_counter_rtc = {
@@ -166,9 +166,9 @@ CLOCKSOURCE_OF_DECLARE(arc_rtc, "snps,archs-timer-rtc", arc_cs_setup_rtc);
  * 32bit TIMER1 to keep counting monotonically and wraparound
  */
 
-static cycle_t arc_read_timer1(struct clocksource *cs)
+static u64 arc_read_timer1(struct clocksource *cs)
 {
-       return (cycle_t) read_aux_reg(ARC_REG_TIMER1_CNT);
+       return (u64) read_aux_reg(ARC_REG_TIMER1_CNT);
 }
 
 static struct clocksource arc_counter_timer1 = {
index cdeca850f29e20d4c6f48be24d421557f20bc686..4c8c3fb2e8b248b3335d1c4f582f7faab1121d37 100644 (file)
@@ -562,12 +562,12 @@ static u64 arch_counter_get_cntvct_mem(void)
  */
 u64 (*arch_timer_read_counter)(void) = arch_counter_get_cntvct;
 
-static cycle_t arch_counter_read(struct clocksource *cs)
+static u64 arch_counter_read(struct clocksource *cs)
 {
        return arch_timer_read_counter();
 }
 
-static cycle_t arch_counter_read_cc(const struct cyclecounter *cc)
+static u64 arch_counter_read_cc(const struct cyclecounter *cc)
 {
        return arch_timer_read_counter();
 }
index bbfeb2800a94a582b52d5ffe57381cbc5dba72fa..123ed20ac2ffd406a4e9225ae0a23909066a2f1b 100644 (file)
@@ -195,7 +195,7 @@ static int gt_dying_cpu(unsigned int cpu)
        return 0;
 }
 
-static cycle_t gt_clocksource_read(struct clocksource *cs)
+static u64 gt_clocksource_read(struct clocksource *cs)
 {
        return gt_counter_read();
 }
index fbfbdec13b081837e3866ee06f8a9c231cce990c..44e5e951583bc38fc8c4a6a9b89ea91f7587af34 100644 (file)
@@ -158,11 +158,11 @@ static irqreturn_t ttc_clock_event_interrupt(int irq, void *dev_id)
  *
  * returns: Current timer counter register value
  **/
-static cycle_t __ttc_clocksource_read(struct clocksource *cs)
+static u64 __ttc_clocksource_read(struct clocksource *cs)
 {
        struct ttc_timer *timer = &to_ttc_timer_clksrc(cs)->ttc;
 
-       return (cycle_t)readl_relaxed(timer->base_addr +
+       return (u64)readl_relaxed(timer->base_addr +
                                TTC_COUNT_VAL_OFFSET);
 }
 
index 77a365f573d7f19a385f06ceffb16011a9159d98..c69e2772658d9318892ce377cebff1eb4118c793 100644 (file)
@@ -30,7 +30,7 @@
 
 static void __iomem *clksrc_dbx500_timer_base;
 
-static cycle_t notrace clksrc_dbx500_prcmu_read(struct clocksource *cs)
+static u64 notrace clksrc_dbx500_prcmu_read(struct clocksource *cs)
 {
        void __iomem *base = clksrc_dbx500_timer_base;
        u32 count, count2;
index 797505aa2ba41263f5f2080f9b777f383b744bfe..63e4f5519577bea8edbf6c023eef89d242ff0f34 100644 (file)
@@ -348,7 +348,7 @@ void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs)
        dw_apb_clocksource_read(dw_cs);
 }
 
-static cycle_t __apbt_read_clocksource(struct clocksource *cs)
+static u64 __apbt_read_clocksource(struct clocksource *cs)
 {
        u32 current_count;
        struct dw_apb_clocksource *dw_cs =
@@ -357,7 +357,7 @@ static cycle_t __apbt_read_clocksource(struct clocksource *cs)
        current_count = apbt_readl_relaxed(&dw_cs->timer,
                                        APBTMR_N_CURRENT_VALUE);
 
-       return (cycle_t)~current_count;
+       return (u64)~current_count;
 }
 
 static void apbt_restart_clocksource(struct clocksource *cs)
@@ -416,7 +416,7 @@ void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs)
  *
  * @dw_cs:     The clocksource to read.
  */
-cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs)
+u64 dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs)
 {
-       return (cycle_t)~apbt_readl(&dw_cs->timer, APBTMR_N_CURRENT_VALUE);
+       return (u64)~apbt_readl(&dw_cs->timer, APBTMR_N_CURRENT_VALUE);
 }
index 19bb1792d647dc8cca312248b5f2c7eef86099dd..aff87df07449d62d0fc0b401f4038463b18ab326 100644 (file)
@@ -110,9 +110,9 @@ static void em_sti_disable(struct em_sti_priv *p)
        clk_disable_unprepare(p->clk);
 }
 
-static cycle_t em_sti_count(struct em_sti_priv *p)
+static u64 em_sti_count(struct em_sti_priv *p)
 {
-       cycle_t ticks;
+       u64 ticks;
        unsigned long flags;
 
        /* the STI hardware buffers the 48-bit count, but to
@@ -121,14 +121,14 @@ static cycle_t em_sti_count(struct em_sti_priv *p)
         * Always read STI_COUNT_H before STI_COUNT_L.
         */
        raw_spin_lock_irqsave(&p->lock, flags);
-       ticks = (cycle_t)(em_sti_read(p, STI_COUNT_H) & 0xffff) << 32;
+       ticks = (u64)(em_sti_read(p, STI_COUNT_H) & 0xffff) << 32;
        ticks |= em_sti_read(p, STI_COUNT_L);
        raw_spin_unlock_irqrestore(&p->lock, flags);
 
        return ticks;
 }
 
-static cycle_t em_sti_set_next(struct em_sti_priv *p, cycle_t next)
+static u64 em_sti_set_next(struct em_sti_priv *p, u64 next)
 {
        unsigned long flags;
 
@@ -198,7 +198,7 @@ static struct em_sti_priv *cs_to_em_sti(struct clocksource *cs)
        return container_of(cs, struct em_sti_priv, cs);
 }
 
-static cycle_t em_sti_clocksource_read(struct clocksource *cs)
+static u64 em_sti_clocksource_read(struct clocksource *cs)
 {
        return em_sti_count(cs_to_em_sti(cs));
 }
@@ -271,7 +271,7 @@ static int em_sti_clock_event_next(unsigned long delta,
                                   struct clock_event_device *ced)
 {
        struct em_sti_priv *p = ced_to_em_sti(ced);
-       cycle_t next;
+       u64 next;
        int safe;
 
        next = em_sti_set_next(p, em_sti_count(p) + delta);
index b45b72b9586107e3c99d7ead9b964a47d35d1b23..4da1dc2278bd7fc34caa9e00d29f71ec1ebd015f 100644 (file)
@@ -183,7 +183,7 @@ static u64 exynos4_read_count_64(void)
                hi2 = readl_relaxed(reg_base + EXYNOS4_MCT_G_CNT_U);
        } while (hi != hi2);
 
-       return ((cycle_t)hi << 32) | lo;
+       return ((u64)hi << 32) | lo;
 }
 
 /**
@@ -199,7 +199,7 @@ static u32 notrace exynos4_read_count_32(void)
        return readl_relaxed(reg_base + EXYNOS4_MCT_G_CNT_L);
 }
 
-static cycle_t exynos4_frc_read(struct clocksource *cs)
+static u64 exynos4_frc_read(struct clocksource *cs)
 {
        return exynos4_read_count_32();
 }
@@ -266,7 +266,7 @@ static void exynos4_mct_comp0_stop(void)
 static void exynos4_mct_comp0_start(bool periodic, unsigned long cycles)
 {
        unsigned int tcon;
-       cycle_t comp_cycle;
+       u64 comp_cycle;
 
        tcon = readl_relaxed(reg_base + EXYNOS4_MCT_G_TCON);
 
index 07d9d5be9054a6e46aeef0a933e0344b1dcf84dc..5b27fb9997c22083cf602811d86864cd7e7cdb0e 100644 (file)
@@ -72,7 +72,7 @@ static inline struct timer16_priv *cs_to_priv(struct clocksource *cs)
        return container_of(cs, struct timer16_priv, cs);
 }
 
-static cycle_t timer16_clocksource_read(struct clocksource *cs)
+static u64 timer16_clocksource_read(struct clocksource *cs)
 {
        struct timer16_priv *p = cs_to_priv(cs);
        unsigned long raw, value;
index 7bdf1991c847448525c3dc9d6fddf4e758361375..72e1cf2b30962ee09bd04b3c4fbaaa5654c3f39b 100644 (file)
@@ -64,7 +64,7 @@ static inline struct tpu_priv *cs_to_priv(struct clocksource *cs)
        return container_of(cs, struct tpu_priv, cs);
 }
 
-static cycle_t tpu_clocksource_read(struct clocksource *cs)
+static u64 tpu_clocksource_read(struct clocksource *cs)
 {
        struct tpu_priv *p = cs_to_priv(cs);
        unsigned long flags;
index 0efd36e483ab416bf01c34e8250afc78faca035a..64f6490740d78b19b58f31178554630542685fc4 100644 (file)
@@ -25,7 +25,7 @@ EXPORT_SYMBOL(i8253_lock);
  * to just read by itself. So use jiffies to emulate a free
  * running counter:
  */
-static cycle_t i8253_read(struct clocksource *cs)
+static u64 i8253_read(struct clocksource *cs)
 {
        static int old_count;
        static u32 old_jifs;
@@ -83,7 +83,7 @@ static cycle_t i8253_read(struct clocksource *cs)
 
        count = (PIT_LATCH - 1) - count;
 
-       return (cycle_t)(jifs * PIT_LATCH) + count;
+       return (u64)(jifs * PIT_LATCH) + count;
 }
 
 static struct clocksource i8253_cs = {
index 4e4146f69845777bb7447cecd7e5c9e57c21da2c..7c61226f435918ca3a66d64a4c9f195ae8129994 100644 (file)
@@ -57,7 +57,7 @@ static notrace u64 jcore_sched_clock_read(void)
        return seclo * NSEC_PER_SEC + nsec;
 }
 
-static cycle_t jcore_clocksource_read(struct clocksource *cs)
+static u64 jcore_clocksource_read(struct clocksource *cs)
 {
        return jcore_sched_clock_read();
 }
index 172f43d4bc1af073af4329723b1fe290b963e9b3..6fcf96540631d2d9a53a1f64978e99d4cc2f26ab 100644 (file)
@@ -56,7 +56,7 @@ static int metag_timer_set_next_event(unsigned long delta,
        return 0;
 }
 
-static cycle_t metag_clocksource_read(struct clocksource *cs)
+static u64 metag_clocksource_read(struct clocksource *cs)
 {
        return __core_reg_get(TXTIMER);
 }
index d9278847ffb25070c4aaca5387319ccd2f0ea9e5..d9ef7a61e093964485e2f078c733a299b33cc409 100644 (file)
@@ -125,7 +125,7 @@ static int gic_clockevent_init(void)
        return 0;
 }
 
-static cycle_t gic_hpt_read(struct clocksource *cs)
+static u64 gic_hpt_read(struct clocksource *cs)
 {
        return gic_read_count();
 }
index c4f7d7a9b68987e861bb52ea807f919ca785a1c9..4c4df981d8ccc9fbe6a05f1de56dea642089f24a 100644 (file)
@@ -20,24 +20,24 @@ static inline struct clocksource_mmio *to_mmio_clksrc(struct clocksource *c)
        return container_of(c, struct clocksource_mmio, clksrc);
 }
 
-cycle_t clocksource_mmio_readl_up(struct clocksource *c)
+u64 clocksource_mmio_readl_up(struct clocksource *c)
 {
-       return (cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg);
+       return (u64)readl_relaxed(to_mmio_clksrc(c)->reg);
 }
 
-cycle_t clocksource_mmio_readl_down(struct clocksource *c)
+u64 clocksource_mmio_readl_down(struct clocksource *c)
 {
-       return ~(cycle_t)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
+       return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
 }
 
-cycle_t clocksource_mmio_readw_up(struct clocksource *c)
+u64 clocksource_mmio_readw_up(struct clocksource *c)
 {
-       return (cycle_t)readw_relaxed(to_mmio_clksrc(c)->reg);
+       return (u64)readw_relaxed(to_mmio_clksrc(c)->reg);
 }
 
-cycle_t clocksource_mmio_readw_down(struct clocksource *c)
+u64 clocksource_mmio_readw_down(struct clocksource *c)
 {
-       return ~(cycle_t)readw_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
+       return ~(u64)readw_relaxed(to_mmio_clksrc(c)->reg) & c->mask;
 }
 
 /**
@@ -51,7 +51,7 @@ cycle_t clocksource_mmio_readw_down(struct clocksource *c)
  */
 int __init clocksource_mmio_init(void __iomem *base, const char *name,
        unsigned long hz, int rating, unsigned bits,
-       cycle_t (*read)(struct clocksource *))
+       u64 (*read)(struct clocksource *))
 {
        struct clocksource_mmio *cs;
 
index 0ba0a913b41d113e7459b6dc21e07e00bb0d0648..99b77aff08395e887e824cf28cd373ce3a1e1560 100644 (file)
@@ -97,7 +97,7 @@ static void timrot_irq_acknowledge(void)
                     HW_TIMROT_TIMCTRLn(0) + STMP_OFFSET_REG_CLR);
 }
 
-static cycle_t timrotv1_get_cycles(struct clocksource *cs)
+static u64 timrotv1_get_cycles(struct clocksource *cs)
 {
        return ~((__raw_readl(mxs_timrot_base + HW_TIMROT_TIMCOUNTn(1))
                        & 0xffff0000) >> 16);
index 3bf65fff5c08bef6e8f41a1ee5577b4e0bbd6493..ee358cdf4a07b37e1952728fc22e21e2834d4864 100644 (file)
@@ -89,7 +89,7 @@ static struct clock_event_device __percpu *msm_evt;
 
 static void __iomem *source_base;
 
-static notrace cycle_t msm_read_timer_count(struct clocksource *cs)
+static notrace u64 msm_read_timer_count(struct clocksource *cs)
 {
        return readl_relaxed(source_base + TIMER_COUNT_VAL);
 }
index 54565bd0093bfc02673d6f27841315c589b8ad70..0093ece661fe613a1bb325b7df56ce48f246793e 100644 (file)
@@ -307,7 +307,7 @@ static void samsung_clocksource_resume(struct clocksource *cs)
        samsung_time_start(pwm.source_id, true);
 }
 
-static cycle_t notrace samsung_clocksource_read(struct clocksource *c)
+static u64 notrace samsung_clocksource_read(struct clocksource *c)
 {
        return ~readl_relaxed(pwm.source_reg);
 }
index 64f9e829443405e86bfdf154db3bceb53791d766..a46660bf65888d36d16ad6635b790ddd46789250 100644 (file)
@@ -43,10 +43,10 @@ MODULE_PARM_DESC(ppm, "+-adjust to actual XO freq (ppm)");
 /* The base timer frequency, * 27 if selected */
 #define HRT_FREQ   1000000
 
-static cycle_t read_hrt(struct clocksource *cs)
+static u64 read_hrt(struct clocksource *cs)
 {
        /* Read the timer value */
-       return (cycle_t) inl(scx200_cb_base + SCx200_TIMER_OFFSET);
+       return (u64) inl(scx200_cb_base + SCx200_TIMER_OFFSET);
 }
 
 static struct clocksource cs_hrt = {
index 103c49362c68f66f830587a6504e33ad428a1c14..28757edf6aca8ae8943bb01a02e4008b44efd6f1 100644 (file)
@@ -612,7 +612,7 @@ static struct sh_cmt_channel *cs_to_sh_cmt(struct clocksource *cs)
        return container_of(cs, struct sh_cmt_channel, cs);
 }
 
-static cycle_t sh_cmt_clocksource_read(struct clocksource *cs)
+static u64 sh_cmt_clocksource_read(struct clocksource *cs)
 {
        struct sh_cmt_channel *ch = cs_to_sh_cmt(cs);
        unsigned long flags, raw;
index 469e776ec17a5a2cf4528cc41c58d5542b9a0d53..1fbf2aadcfd41875751c57b73024ca541a430852 100644 (file)
@@ -255,7 +255,7 @@ static struct sh_tmu_channel *cs_to_sh_tmu(struct clocksource *cs)
        return container_of(cs, struct sh_tmu_channel, cs);
 }
 
-static cycle_t sh_tmu_clocksource_read(struct clocksource *cs)
+static u64 sh_tmu_clocksource_read(struct clocksource *cs)
 {
        struct sh_tmu_channel *ch = cs_to_sh_tmu(cs);
 
index 4da2af9694a23b267cebdfa52da624e9f43b61fe..d4ca9962a7595a0206710a0dd4a95656f426ae8e 100644 (file)
@@ -41,7 +41,7 @@
 
 static void __iomem *tcaddr;
 
-static cycle_t tc_get_cycles(struct clocksource *cs)
+static u64 tc_get_cycles(struct clocksource *cs)
 {
        unsigned long   flags;
        u32             lower, upper;
@@ -56,7 +56,7 @@ static cycle_t tc_get_cycles(struct clocksource *cs)
        return (upper << 16) | lower;
 }
 
-static cycle_t tc_get_cycles32(struct clocksource *cs)
+static u64 tc_get_cycles32(struct clocksource *cs)
 {
        return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV));
 }
index a8e6c7df853d2c64914c04af5785f61a51d56880..3710e4d9dcba065117e9b435e0f7428dea0d1f23 100644 (file)
@@ -67,7 +67,7 @@ static inline void gpt_writel(void __iomem *base, u32 value, u32 offset,
        writel(value, base + 0x20 * gpt_id + offset);
 }
 
-static cycle_t notrace
+static u64 notrace
 pistachio_clocksource_read_cycles(struct clocksource *cs)
 {
        struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
@@ -84,7 +84,7 @@ pistachio_clocksource_read_cycles(struct clocksource *cs)
        counter = gpt_readl(pcs->base, TIMER_CURRENT_VALUE, 0);
        raw_spin_unlock_irqrestore(&pcs->lock, flags);
 
-       return (cycle_t)~counter;
+       return (u64)~counter;
 }
 
 static u64 notrace pistachio_read_sched_clock(void)
index 3c23e1744f4a7b19db773885b5d9a6aab3b41c1f..3d8a181f02528346c5d99053cdd87ad6b6569e34 100644 (file)
@@ -85,7 +85,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
 }
 
 /* read 64-bit timer counter */
-static cycle_t sirfsoc_timer_read(struct clocksource *cs)
+static u64 sirfsoc_timer_read(struct clocksource *cs)
 {
        u64 cycles;
 
index 6555821bbdaec2c9f833bdd59dadf0498483dcab..c0b5df3167a0357cfd8f2df315a97426159acbfc 100644 (file)
@@ -73,7 +73,7 @@ static inline void pit_write(void __iomem *base, unsigned int reg_offset, unsign
  * Clocksource:  just a monotonic counter of MCK/16 cycles.
  * We don't care whether or not PIT irqs are enabled.
  */
-static cycle_t read_pit_clk(struct clocksource *cs)
+static u64 read_pit_clk(struct clocksource *cs)
 {
        struct pit_data *data = clksrc_to_pit_data(cs);
        unsigned long flags;
index e90ab5b63a9068ec3901b85cab9b230db67a837c..be4ac76041364fec5d7a5597dd52a286a2cccef3 100644 (file)
@@ -92,7 +92,7 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id)
        return IRQ_NONE;
 }
 
-static cycle_t read_clk32k(struct clocksource *cs)
+static u64 read_clk32k(struct clocksource *cs)
 {
        return read_CRTR();
 }
index 8da5e93b681041f6e1a26585f614b7c6b3b71a5c..da1f7986e477eb18a2a7cd8bef365cc72d07808c 100644 (file)
@@ -77,11 +77,11 @@ static int __init nps_get_timer_clk(struct device_node *node,
        return 0;
 }
 
-static cycle_t nps_clksrc_read(struct clocksource *clksrc)
+static u64 nps_clksrc_read(struct clocksource *clksrc)
 {
        int cluster = raw_smp_processor_id() >> NPS_CLUSTER_OFFSET;
 
-       return (cycle_t)ioread32be(nps_msu_reg_low_addr[cluster]);
+       return (u64)ioread32be(nps_msu_reg_low_addr[cluster]);
 }
 
 static int __init nps_setup_clocksource(struct device_node *node)
index c32148ec7a384dc58921c40515786491033ff5e8..bfa981ac1eaf5908c14614d40e714634e867c4b8 100644 (file)
@@ -72,7 +72,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
 }
 
 /* read 64-bit timer counter */
-static cycle_t notrace sirfsoc_timer_read(struct clocksource *cs)
+static u64 notrace sirfsoc_timer_read(struct clocksource *cs)
 {
        u64 cycles;
 
index 4f87f3e76d8328ec6ca462882f873a51b2f72995..a3e662b15964ef9be3669884f45b739a828edf47 100644 (file)
@@ -152,7 +152,7 @@ static irqreturn_t sun5i_timer_interrupt(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static cycle_t sun5i_clksrc_read(struct clocksource *clksrc)
+static u64 sun5i_clksrc_read(struct clocksource *clksrc)
 {
        struct sun5i_timer_clksrc *cs = to_sun5i_timer_clksrc(clksrc);
 
index cf5b14e442e43beac3a799a679cd863ca1a314fe..624067712ef0383b8805b39d164f33c42014a044 100644 (file)
@@ -65,11 +65,11 @@ static inline struct ti_32k *to_ti_32k(struct clocksource *cs)
        return container_of(cs, struct ti_32k, cs);
 }
 
-static cycle_t notrace ti_32k_read_cycles(struct clocksource *cs)
+static u64 notrace ti_32k_read_cycles(struct clocksource *cs)
 {
        struct ti_32k *ti = to_ti_32k(cs);
 
-       return (cycle_t)readl_relaxed(ti->counter);
+       return (u64)readl_relaxed(ti->counter);
 }
 
 static struct ti_32k ti_32k_timer = {
index b15069483fbde1b655fa0932b10a6d6be4fa3d44..d02b51075ad1d2bf1c0cf87bb0bf4eb3da960af4 100644 (file)
@@ -53,7 +53,7 @@
 
 static void __iomem *regbase;
 
-static cycle_t vt8500_timer_read(struct clocksource *cs)
+static u64 vt8500_timer_read(struct clocksource *cs)
 {
        int loops = msecs_to_loops(10);
        writel(3, regbase + TIMER_CTRL_VAL);
@@ -75,7 +75,7 @@ static int vt8500_timer_set_next_event(unsigned long cycles,
                                    struct clock_event_device *evt)
 {
        int loops = msecs_to_loops(10);
-       cycle_t alarm = clocksource.read(&clocksource) + cycles;
+       u64 alarm = clocksource.read(&clocksource) + cycles;
        while ((readl(regbase + TIMER_AS_VAL) & TIMER_MATCH_W_ACTIVE)
                                                && --loops)
                cpu_relax();
index 451f899f74e4cb0129336b333fd09b7090da965c..c9297605058c1aa68aa0fa6d90f9a0fc1a6cdc0d 100644 (file)
@@ -429,8 +429,8 @@ static int dmatest_func(void *data)
        int                     dst_cnt;
        int                     i;
        ktime_t                 ktime, start, diff;
-       ktime_t                 filltime = ktime_set(0, 0);
-       ktime_t                 comparetime = ktime_set(0, 0);
+       ktime_t                 filltime = 0;
+       ktime_t                 comparetime = 0;
        s64                     runtime = 0;
        unsigned long long      total_len = 0;
        u8                      align = 0;
index e4a5a5ac0ff3042075e3bf8600a93016f008f662..762f8e82ceb7465f56aa8cfcd7124ce0fc28acda 100644 (file)
@@ -752,7 +752,7 @@ static enum hrtimer_restart dce_virtual_vblank_timer_handle(struct hrtimer *vbla
 
        drm_handle_vblank(ddev, amdgpu_crtc->crtc_id);
        dce_virtual_pageflip(adev, amdgpu_crtc->crtc_id);
-       hrtimer_start(vblank_timer, ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD),
+       hrtimer_start(vblank_timer, DCE_VIRTUAL_VBLANK_PERIOD,
                      HRTIMER_MODE_REL);
 
        return HRTIMER_NORESTART;
@@ -772,11 +772,11 @@ static void dce_virtual_set_crtc_vblank_interrupt_state(struct amdgpu_device *ad
                hrtimer_init(&adev->mode_info.crtcs[crtc]->vblank_timer,
                             CLOCK_MONOTONIC, HRTIMER_MODE_REL);
                hrtimer_set_expires(&adev->mode_info.crtcs[crtc]->vblank_timer,
-                                   ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD));
+                                   DCE_VIRTUAL_VBLANK_PERIOD);
                adev->mode_info.crtcs[crtc]->vblank_timer.function =
                        dce_virtual_vblank_timer_handle;
                hrtimer_start(&adev->mode_info.crtcs[crtc]->vblank_timer,
-                             ktime_set(0, DCE_VIRTUAL_VBLANK_PERIOD), HRTIMER_MODE_REL);
+                             DCE_VIRTUAL_VBLANK_PERIOD, HRTIMER_MODE_REL);
        } else if (!state && adev->mode_info.crtcs[crtc]->vsync_timer_enabled) {
                DRM_DEBUG("Disable software vsync timer\n");
                hrtimer_cancel(&adev->mode_info.crtcs[crtc]->vblank_timer);
index d7be0d94ba4d1786443230d19b01b6df1fcc3cde..0bffd3f0c15d796627d5d89a5775e5da7a0bf572 100644 (file)
@@ -62,7 +62,7 @@ fw_domain_arm_timer(struct intel_uncore_forcewake_domain *d)
 {
        d->wake_count++;
        hrtimer_start_range_ns(&d->timer,
-                              ktime_set(0, NSEC_PER_MSEC),
+                              NSEC_PER_MSEC,
                               NSEC_PER_MSEC,
                               HRTIMER_MODE_REL);
 }
index f2f348f0160c845d628cfdb0fa85e76cf4f4f490..a6126c93f215b0118e2c152cd0ad18d87c6f62ea 100644 (file)
@@ -330,7 +330,7 @@ nouveau_fence_wait_legacy(struct dma_fence *f, bool intr, long wait)
                __set_current_state(intr ? TASK_INTERRUPTIBLE :
                                           TASK_UNINTERRUPTIBLE);
 
-               kt = ktime_set(0, sleep_time);
+               kt = sleep_time;
                schedule_hrtimeout(&kt, HRTIMER_MODE_REL);
                sleep_time *= 2;
                if (sleep_time > NSEC_PER_MSEC)
index 9942b0577d6e556a2fce45b1d66c3ac410bf5c37..725dffad5640cddf43d6aea4616cd90a035c40bc 100644 (file)
@@ -539,7 +539,7 @@ static void tilcdc_crtc_off(struct drm_crtc *crtc, bool shutdown)
        }
 
        drm_flip_work_commit(&tilcdc_crtc->unref_work, priv->wq);
-       tilcdc_crtc->last_vblank = ktime_set(0, 0);
+       tilcdc_crtc->last_vblank = 0;
 
        tilcdc_crtc->enabled = false;
        mutex_unlock(&tilcdc_crtc->enable_lock);
index 446802ae8f1bc6b72f41b468ee9e32c145378fb3..b44b32f21e61db00a2db56db81c4e4a1a04053db 100644 (file)
@@ -135,9 +135,9 @@ u64 hv_do_hypercall(u64 control, void *input, void *output)
 EXPORT_SYMBOL_GPL(hv_do_hypercall);
 
 #ifdef CONFIG_X86_64
-static cycle_t read_hv_clock_tsc(struct clocksource *arg)
+static u64 read_hv_clock_tsc(struct clocksource *arg)
 {
-       cycle_t current_tick;
+       u64 current_tick;
        struct ms_hyperv_tsc_page *tsc_pg = hv_context.tsc_page;
 
        if (tsc_pg->tsc_sequence != 0) {
@@ -146,7 +146,7 @@ static cycle_t read_hv_clock_tsc(struct clocksource *arg)
                 */
 
                while (1) {
-                       cycle_t tmp;
+                       u64 tmp;
                        u32 sequence = tsc_pg->tsc_sequence;
                        u64 cur_tsc;
                        u64 scale = tsc_pg->tsc_scale;
@@ -350,7 +350,7 @@ int hv_post_message(union hv_connection_id connection_id,
 static int hv_ce_set_next_event(unsigned long delta,
                                struct clock_event_device *evt)
 {
-       cycle_t current_tick;
+       u64 current_tick;
 
        WARN_ON(!clockevent_state_oneshot(evt));
 
index 5e6d451febebda26f97599f5c6c607561ef3e983..a1cad6cc2e0ff1bc70ca99d8d315eccdd5acb7d3 100644 (file)
@@ -63,7 +63,7 @@ ssize_t iio_hrtimer_store_sampling_frequency(struct device *dev,
                return -EINVAL;
 
        info->sampling_frequency = val;
-       info->period = ktime_set(0, NSEC_PER_SEC / val);
+       info->period = NSEC_PER_SEC / val;
 
        return len;
 }
@@ -141,8 +141,7 @@ static struct iio_sw_trigger *iio_trig_hrtimer_probe(const char *name)
        trig_info->timer.function = iio_hrtimer_trig_handler;
 
        trig_info->sampling_frequency = HRTIMER_DEFAULT_SAMPLING_FREQUENCY;
-       trig_info->period = ktime_set(0, NSEC_PER_SEC /
-                                     trig_info->sampling_frequency);
+       trig_info->period = NSEC_PER_SEC / trig_info->sampling_frequency;
 
        ret = iio_trigger_register(trig_info->swt.trigger);
        if (ret)
index 70a893a17467608a103a81546eb7cce4cdf44010..36a5b93156ed88b048159f4bc02ddc9d4242b9ef 100644 (file)
@@ -165,7 +165,7 @@ static void walkera0701_irq_handler(void *handler_data)
                                RESERVE + BIN1_PULSE - BIN0_PULSE)      /* frame sync .. */
                w->counter = 0;
 
-       hrtimer_start(&w->timer, ktime_set(0, BIN_SAMPLE), HRTIMER_MODE_REL);
+       hrtimer_start(&w->timer, BIN_SAMPLE, HRTIMER_MODE_REL);
 }
 
 static enum hrtimer_restart timer_handler(struct hrtimer
index c0178a1229402b6e2185d67d3481922ad4994916..c01c09e9916d3f87a6bdbdae79bebeb0f9fffd39 100644 (file)
@@ -152,12 +152,12 @@ static inline void gic_map_to_vpe(unsigned int intr, unsigned int vpe)
 }
 
 #ifdef CONFIG_CLKSRC_MIPS_GIC
-cycle_t gic_read_count(void)
+u64 gic_read_count(void)
 {
        unsigned int hi, hi2, lo;
 
        if (mips_cm_is64)
-               return (cycle_t)gic_read(GIC_REG(SHARED, GIC_SH_COUNTER));
+               return (u64)gic_read(GIC_REG(SHARED, GIC_SH_COUNTER));
 
        do {
                hi = gic_read32(GIC_REG(SHARED, GIC_SH_COUNTER_63_32));
@@ -165,7 +165,7 @@ cycle_t gic_read_count(void)
                hi2 = gic_read32(GIC_REG(SHARED, GIC_SH_COUNTER_63_32));
        } while (hi2 != hi);
 
-       return (((cycle_t) hi) << 32) + lo;
+       return (((u64) hi) << 32) + lo;
 }
 
 unsigned int gic_get_count_width(void)
@@ -179,7 +179,7 @@ unsigned int gic_get_count_width(void)
        return bits;
 }
 
-void gic_write_compare(cycle_t cnt)
+void gic_write_compare(u64 cnt)
 {
        if (mips_cm_is64) {
                gic_write(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE), cnt);
@@ -191,7 +191,7 @@ void gic_write_compare(cycle_t cnt)
        }
 }
 
-void gic_write_cpu_compare(cycle_t cnt, int cpu)
+void gic_write_cpu_compare(u64 cnt, int cpu)
 {
        unsigned long flags;
 
@@ -211,17 +211,17 @@ void gic_write_cpu_compare(cycle_t cnt, int cpu)
        local_irq_restore(flags);
 }
 
-cycle_t gic_read_compare(void)
+u64 gic_read_compare(void)
 {
        unsigned int hi, lo;
 
        if (mips_cm_is64)
-               return (cycle_t)gic_read(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE));
+               return (u64)gic_read(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE));
 
        hi = gic_read32(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_HI));
        lo = gic_read32(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE_LO));
 
-       return (((cycle_t) hi) << 32) + lo;
+       return (((u64) hi) << 32) + lo;
 }
 
 void gic_start_count(void)
index 4a36632c236f09ad9cdde06ff213961c712c3000..4671f8a128723010dafe2d2f6f48df75a492c9fb 100644 (file)
@@ -87,8 +87,7 @@ exit:
 
        if (!err && (chan->txdone_method & TXDONE_BY_POLL))
                /* kick start the timer immediately to avoid delays */
-               hrtimer_start(&chan->mbox->poll_hrt, ktime_set(0, 0),
-                             HRTIMER_MODE_REL);
+               hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL);
 }
 
 static void tx_tick(struct mbox_chan *chan, int r)
index 0c44479b556ec665ba4e84acd686a212b37c0484..0c16bb21310109050f461979306408f7ca42866b 100644 (file)
@@ -562,7 +562,7 @@ static int dvb_dmxdev_start_feed(struct dmxdev *dmxdev,
                                 struct dmxdev_filter *filter,
                                 struct dmxdev_feed *feed)
 {
-       ktime_t timeout = ktime_set(0, 0);
+       ktime_t timeout = 0;
        struct dmx_pes_filter_params *para = &filter->params.pes;
        dmx_output_t otype;
        int ret;
index dcfea3502e42c53d47f03f4112ba117fa03ab0ac..c7b3cb406499b0b7d0319f64cc0891e03bcd485a 100644 (file)
@@ -178,8 +178,7 @@ static enum hrtimer_restart cx88_ir_work(struct hrtimer *timer)
        struct cx88_IR *ir = container_of(timer, struct cx88_IR, timer);
 
        cx88_ir_handle_key(ir);
-       missed = hrtimer_forward_now(&ir->timer,
-                                    ktime_set(0, ir->polling * 1000000));
+       missed = hrtimer_forward_now(&ir->timer, ir->polling * 1000000);
        if (missed > 1)
                ir_dprintk("Missed ticks %ld\n", missed - 1);
 
@@ -199,8 +198,7 @@ static int __cx88_ir_start(void *priv)
        if (ir->polling) {
                hrtimer_init(&ir->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
                ir->timer.function = cx88_ir_work;
-               hrtimer_start(&ir->timer,
-                             ktime_set(0, ir->polling * 1000000),
+               hrtimer_start(&ir->timer, ir->polling * 1000000,
                              HRTIMER_MODE_REL);
        }
        if (ir->sampling) {
index 7fb649e523f46e543cdc18284068f47c3827c20f..77f4d15f322b2d73e4cf25691ced9fd8f65c261f 100644 (file)
@@ -463,7 +463,7 @@ static int pt3_fetch_thread(void *data)
 
                pt3_proc_dma(adap);
 
-               delay = ktime_set(0, PT3_FETCH_DELAY * NSEC_PER_MSEC);
+               delay = PT3_FETCH_DELAY * NSEC_PER_MSEC;
                set_current_state(TASK_UNINTERRUPTIBLE);
                freezable_schedule_hrtimeout_range(&delay,
                                        PT3_FETCH_DELAY_DELTA * NSEC_PER_MSEC,
index 82fb6f2ca01194f3ad593059fa7c84d13481f590..e6efa8c267a062b0aa28b7912e0999ac57ce7e9a 100644 (file)
@@ -109,7 +109,7 @@ static enum hrtimer_restart lirc_rx51_timer_cb(struct hrtimer *timer)
 
                now = timer->base->get_time();
 
-       } while (hrtimer_get_expires_tv64(timer) < now.tv64);
+       } while (hrtimer_get_expires_tv64(timer) < now);
 
        return HRTIMER_RESTART;
 end:
index 52fe50725d749665b629ad9a78e6447d14b60cf4..4063215c9b54b0bd4f6a4975037f2983e03f554c 100644 (file)
@@ -390,7 +390,7 @@ static void softing_initialize_timestamp(struct softing *card)
        ovf = 0x100000000ULL * 16;
        do_div(ovf, card->pdat->freq ?: 16);
 
-       card->ts_overflow = ktime_add_us(ktime_set(0, 0), ovf);
+       card->ts_overflow = ktime_add_us(0, ovf);
 }
 
 ktime_t softing_raw2ktime(struct softing *card, u32 raw)
@@ -647,7 +647,7 @@ int softing_startstop(struct net_device *dev, int up)
                open_candev(netdev);
                if (dev != netdev) {
                        /* notify other busses on the restart */
-                       softing_netdev_rx(netdev, &msg, ktime_set(0, 0));
+                       softing_netdev_rx(netdev, &msg, 0);
                        ++priv->can.can_stats.restarts;
                }
                netif_wake_queue(netdev);
index 7621f91a8a209e9de74d55de14fbb31947c449ee..5f64deec9f6c1c4d7ef2ca2eb64d385a3da41df4 100644 (file)
@@ -192,7 +192,7 @@ static int softing_handle_1(struct softing *card)
                                /* a dead bus has no overflows */
                                continue;
                        ++netdev->stats.rx_over_errors;
-                       softing_netdev_rx(netdev, &msg, ktime_set(0, 0));
+                       softing_netdev_rx(netdev, &msg, 0);
                }
                /* prepare for other use */
                memset(&msg, 0, sizeof(msg));
index b03e4f58d02ea550b4a19d7e4f7113ec3b48e4e0..a533a6cc2d530258c3875150565d35aa6fa55fc5 100644 (file)
 #include "xgbe.h"
 #include "xgbe-common.h"
 
-static cycle_t xgbe_cc_read(const struct cyclecounter *cc)
+static u64 xgbe_cc_read(const struct cyclecounter *cc)
 {
        struct xgbe_prv_data *pdata = container_of(cc,
                                                   struct xgbe_prv_data,
index 688617ac8c29b5b3db2d6ade057d3a79c360d998..d8d06fdfc42b9d685244513c1542b69bd78d7ca9 100644 (file)
@@ -15223,7 +15223,7 @@ void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb)
 }
 
 /* Read the PHC */
-static cycle_t bnx2x_cyclecounter_read(const struct cyclecounter *cc)
+static u64 bnx2x_cyclecounter_read(const struct cyclecounter *cc)
 {
        struct bnx2x *bp = container_of(cc, struct bnx2x, cyclecounter);
        int port = BP_PORT(bp);
index 57650953ff83e127ecdcb3e606114d619d49db18..7bf78a0d322cc0efe9c4c793359ae5980b55e29d 100644 (file)
@@ -253,7 +253,7 @@ static enum hrtimer_restart ec_bhf_timer_fun(struct hrtimer *timer)
        if (!netif_running(priv->net_dev))
                return HRTIMER_NORESTART;
 
-       hrtimer_forward_now(timer, ktime_set(0, polling_frequency));
+       hrtimer_forward_now(timer, polling_frequency);
        return HRTIMER_RESTART;
 }
 
@@ -427,8 +427,7 @@ static int ec_bhf_open(struct net_device *net_dev)
 
        hrtimer_init(&priv->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        priv->hrtimer.function = ec_bhf_timer_fun;
-       hrtimer_start(&priv->hrtimer, ktime_set(0, polling_frequency),
-                     HRTIMER_MODE_REL);
+       hrtimer_start(&priv->hrtimer, polling_frequency, HRTIMER_MODE_REL);
 
        return 0;
 
index f9e74461bdc0b089c64b751571e8a999a050433b..6ebad3fac81d17e3513de1f7c3d9eec31e56b71e 100644 (file)
@@ -230,7 +230,7 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
  * cyclecounter structure used to construct a ns counter from the
  * arbitrary fixed point registers
  */
-static cycle_t fec_ptp_read(const struct cyclecounter *cc)
+static u64 fec_ptp_read(const struct cyclecounter *cc)
 {
        struct fec_enet_private *fep =
                container_of(cc, struct fec_enet_private, cc);
index ffcf35af48814f44312561536090635a69473230..eccf1da9356badc85df416cca1a519bb1ec417bc 100644 (file)
@@ -4305,24 +4305,24 @@ void e1000e_reinit_locked(struct e1000_adapter *adapter)
 /**
  * e1000e_sanitize_systim - sanitize raw cycle counter reads
  * @hw: pointer to the HW structure
- * @systim: cycle_t value read, sanitized and returned
+ * @systim: time value read, sanitized and returned
  *
  * Errata for 82574/82583 possible bad bits read from SYSTIMH/L:
  * check to see that the time is incrementing at a reasonable
  * rate and is a multiple of incvalue.
  **/
-static cycle_t e1000e_sanitize_systim(struct e1000_hw *hw, cycle_t systim)
+static u64 e1000e_sanitize_systim(struct e1000_hw *hw, u64 systim)
 {
        u64 time_delta, rem, temp;
-       cycle_t systim_next;
+       u64 systim_next;
        u32 incvalue;
        int i;
 
        incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK;
        for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) {
                /* latch SYSTIMH on read of SYSTIML */
-               systim_next = (cycle_t)er32(SYSTIML);
-               systim_next |= (cycle_t)er32(SYSTIMH) << 32;
+               systim_next = (u64)er32(SYSTIML);
+               systim_next |= (u64)er32(SYSTIMH) << 32;
 
                time_delta = systim_next - systim;
                temp = time_delta;
@@ -4342,13 +4342,13 @@ static cycle_t e1000e_sanitize_systim(struct e1000_hw *hw, cycle_t systim)
  * e1000e_cyclecounter_read - read raw cycle counter (used by time counter)
  * @cc: cyclecounter structure
  **/
-static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
+static u64 e1000e_cyclecounter_read(const struct cyclecounter *cc)
 {
        struct e1000_adapter *adapter = container_of(cc, struct e1000_adapter,
                                                     cc);
        struct e1000_hw *hw = &adapter->hw;
        u32 systimel, systimeh;
-       cycle_t systim;
+       u64 systim;
        /* SYSTIMH latching upon SYSTIML read does not work well.
         * This means that if SYSTIML overflows after we read it but before
         * we read SYSTIMH, the value of SYSTIMH has been incremented and we
@@ -4368,8 +4368,8 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
                        systimel = systimel_2;
                }
        }
-       systim = (cycle_t)systimel;
-       systim |= (cycle_t)systimeh << 32;
+       systim = (u64)systimel;
+       systim |= (u64)systimeh << 32;
 
        if (adapter->flags2 & FLAG2_CHECK_SYSTIM_OVERFLOW)
                systim = e1000e_sanitize_systim(hw, systim);
index ad03763e009ae4d1e6796c78b865a9bdda6b8489..34cc3be0df8ed7a44e56d4187aef2747dd2620bd 100644 (file)
@@ -127,8 +127,8 @@ static int e1000e_phc_get_syncdevicetime(ktime_t *device,
        unsigned long flags;
        int i;
        u32 tsync_ctrl;
-       cycle_t dev_cycles;
-       cycle_t sys_cycles;
+       u64 dev_cycles;
+       u64 sys_cycles;
 
        tsync_ctrl = er32(TSYNCTXCTL);
        tsync_ctrl |= E1000_TSYNCTXCTL_START_SYNC |
index c30eea8399a7dfb4de23717d33e8169e054cd600..c4477552ce9ef2e153eb1678c783ff9e9fb08eb8 100644 (file)
@@ -77,7 +77,7 @@
 static void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter);
 
 /* SYSTIM read access for the 82576 */
-static cycle_t igb_ptp_read_82576(const struct cyclecounter *cc)
+static u64 igb_ptp_read_82576(const struct cyclecounter *cc)
 {
        struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc);
        struct e1000_hw *hw = &igb->hw;
@@ -94,7 +94,7 @@ static cycle_t igb_ptp_read_82576(const struct cyclecounter *cc)
 }
 
 /* SYSTIM read access for the 82580 */
-static cycle_t igb_ptp_read_82580(const struct cyclecounter *cc)
+static u64 igb_ptp_read_82580(const struct cyclecounter *cc)
 {
        struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc);
        struct e1000_hw *hw = &igb->hw;
index a92277683a649b4bf7f42987a7d0ecdad311f04c..1efb404431e95bb97752935b3061aca852133820 100644 (file)
@@ -245,7 +245,7 @@ static void ixgbe_ptp_setup_sdp_x540(struct ixgbe_adapter *adapter)
  * result of SYSTIME is 32bits of "billions of cycles" and 32 bits of
  * "cycles", rather than seconds and nanoseconds.
  */
-static cycle_t ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc)
+static u64 ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc)
 {
        struct ixgbe_adapter *adapter =
                        container_of(hw_cc, struct ixgbe_adapter, hw_cc);
@@ -282,7 +282,7 @@ static cycle_t ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc)
  * cyclecounter structure used to construct a ns counter from the
  * arbitrary fixed point registers
  */
-static cycle_t ixgbe_ptp_read_82599(const struct cyclecounter *cc)
+static u64 ixgbe_ptp_read_82599(const struct cyclecounter *cc)
 {
        struct ixgbe_adapter *adapter =
                container_of(cc, struct ixgbe_adapter, hw_cc);
index cda04b3126bc688222eaebed0fbe5c59aa76f89b..4fe430ceb194519ba87c2360479e27c7ceb0ebda 100644 (file)
@@ -4913,7 +4913,7 @@ static void mvpp2_timer_set(struct mvpp2_port_pcpu *port_pcpu)
 
        if (!port_pcpu->timer_scheduled) {
                port_pcpu->timer_scheduled = true;
-               interval = ktime_set(0, MVPP2_TXDONE_HRTIMER_PERIOD_NS);
+               interval = MVPP2_TXDONE_HRTIMER_PERIOD_NS;
                hrtimer_start(&port_pcpu->tx_done_timer, interval,
                              HRTIMER_MODE_REL_PINNED);
        }
index a5fc46bbcbe224373b768633f600f3d66d4865d5..015198c14fa8531589f4443cb770989d629f51e6 100644 (file)
@@ -38,7 +38,7 @@
 
 /* mlx4_en_read_clock - read raw cycle counter (to be used by time counter)
  */
-static cycle_t mlx4_en_read_clock(const struct cyclecounter *tc)
+static u64 mlx4_en_read_clock(const struct cyclecounter *tc)
 {
        struct mlx4_en_dev *mdev =
                container_of(tc, struct mlx4_en_dev, cycles);
index b2ca8a635b2e0b4e974acf649ba6c9be9cae00e2..5e7840a7a33b55e9dc89efa43b349823d5b2e003 100644 (file)
@@ -1823,10 +1823,10 @@ static void unmap_bf_area(struct mlx4_dev *dev)
                io_mapping_free(mlx4_priv(dev)->bf_mapping);
 }
 
-cycle_t mlx4_read_clock(struct mlx4_dev *dev)
+u64 mlx4_read_clock(struct mlx4_dev *dev)
 {
        u32 clockhi, clocklo, clockhi1;
-       cycle_t cycles;
+       u64 cycles;
        int i;
        struct mlx4_priv *priv = mlx4_priv(dev);
 
index 2cd8e56a573be122a1568687fe436ead5e75ceda..746a92c1364435da17275527f8a2c06f6f48624b 100644 (file)
@@ -49,7 +49,7 @@ void mlx5e_fill_hwstamp(struct mlx5e_tstamp *tstamp, u64 timestamp,
        hwts->hwtstamp = ns_to_ktime(nsec);
 }
 
-static cycle_t mlx5e_read_internal_timer(const struct cyclecounter *cc)
+static u64 mlx5e_read_internal_timer(const struct cyclecounter *cc)
 {
        struct mlx5e_tstamp *tstamp = container_of(cc, struct mlx5e_tstamp,
                                                   cycles);
index 7b4c339a8a9a233edd0be5b4dd04a09b975810fa..54e5a786f1915deadf3eb181beeef0bf325a178e 100644 (file)
@@ -557,7 +557,7 @@ int mlx5_core_disable_hca(struct mlx5_core_dev *dev, u16 func_id)
        return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
 }
 
-cycle_t mlx5_read_internal_timer(struct mlx5_core_dev *dev)
+u64 mlx5_read_internal_timer(struct mlx5_core_dev *dev)
 {
        u32 timer_h, timer_h1, timer_l;
 
@@ -567,7 +567,7 @@ cycle_t mlx5_read_internal_timer(struct mlx5_core_dev *dev)
        if (timer_h != timer_h1) /* wrap around */
                timer_l = ioread32be(&dev->iseg->internal_timer_l);
 
-       return (cycle_t)timer_l | (cycle_t)timer_h1 << 32;
+       return (u64)timer_l | (u64)timer_h1 << 32;
 }
 
 static int mlx5_irq_set_affinity_hint(struct mlx5_core_dev *mdev, int i)
index e0a8fbdd1446829e883352ad4cacb3c19f6ad7be..d4a99c9757cbef7bd0a102da9e5277088ef31720 100644 (file)
@@ -106,7 +106,7 @@ int mlx5_modify_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
 int mlx5_destroy_scheduling_element_cmd(struct mlx5_core_dev *dev, u8 hierarchy,
                                        u32 element_id);
 int mlx5_wait_for_vf_pages(struct mlx5_core_dev *dev);
-cycle_t mlx5_read_internal_timer(struct mlx5_core_dev *dev);
+u64 mlx5_read_internal_timer(struct mlx5_core_dev *dev);
 u32 mlx5_get_msix_vec(struct mlx5_core_dev *dev, int vecidx);
 struct mlx5_eq *mlx5_eqn2eq(struct mlx5_core_dev *dev, int eqn);
 void mlx5_cq_tasklet_cb(unsigned long data);
index 0c0d48e5bea4ee709764a3cecb22e2490ec0694a..32279d21c8363d4976c6d313599fbc0e015e6a36 100644 (file)
@@ -121,7 +121,7 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
        return type == match ? 0 : -1;
 }
 
-static cycle_t cpts_systim_read(const struct cyclecounter *cc)
+static u64 cpts_systim_read(const struct cyclecounter *cc)
 {
        u64 val = 0;
        struct cpts_event *event;
index 0aaf975bb3470cfdc6fb218058fc2d8f0e87959d..2255f9a6f3bc28ee0d712b464137ecc7784e1c2f 100644 (file)
@@ -751,7 +751,7 @@ static void tile_net_schedule_tx_wake_timer(struct net_device *dev,
                &info->mpipe[instance].tx_wake[priv->echannel];
 
        hrtimer_start(&tx_wake->timer,
-                     ktime_set(0, TX_TIMER_DELAY_USEC * 1000UL),
+                     TX_TIMER_DELAY_USEC * 1000UL,
                      HRTIMER_MODE_REL_PINNED);
 }
 
@@ -770,7 +770,7 @@ static void tile_net_schedule_egress_timer(void)
 
        if (!info->egress_timer_scheduled) {
                hrtimer_start(&info->egress_timer,
-                             ktime_set(0, EGRESS_TIMER_DELAY_USEC * 1000UL),
+                             EGRESS_TIMER_DELAY_USEC * 1000UL,
                              HRTIMER_MODE_REL_PINNED);
                info->egress_timer_scheduled = true;
        }
index 057025722e3d006f4e78b0a53c20bec0440a726b..46d53a6c8cf868a18ab82a27e730c36e1bc6fb0b 100644 (file)
@@ -510,7 +510,7 @@ at86rf230_async_state_delay(void *context)
        case STATE_TRX_OFF:
                switch (ctx->to_state) {
                case STATE_RX_AACK_ON:
-                       tim = ktime_set(0, c->t_off_to_aack * NSEC_PER_USEC);
+                       tim = c->t_off_to_aack * NSEC_PER_USEC;
                        /* state change from TRX_OFF to RX_AACK_ON to do a
                         * calibration, we need to reset the timeout for the
                         * next one.
@@ -519,7 +519,7 @@ at86rf230_async_state_delay(void *context)
                        goto change;
                case STATE_TX_ARET_ON:
                case STATE_TX_ON:
-                       tim = ktime_set(0, c->t_off_to_tx_on * NSEC_PER_USEC);
+                       tim = c->t_off_to_tx_on * NSEC_PER_USEC;
                        /* state change from TRX_OFF to TX_ON or ARET_ON to do
                         * a calibration, we need to reset the timeout for the
                         * next one.
@@ -539,8 +539,7 @@ at86rf230_async_state_delay(void *context)
                         * to TX_ON or TRX_OFF.
                         */
                        if (!force) {
-                               tim = ktime_set(0, (c->t_frame + c->t_p_ack) *
-                                                  NSEC_PER_USEC);
+                               tim = (c->t_frame + c->t_p_ack) * NSEC_PER_USEC;
                                goto change;
                        }
                        break;
@@ -552,7 +551,7 @@ at86rf230_async_state_delay(void *context)
        case STATE_P_ON:
                switch (ctx->to_state) {
                case STATE_TRX_OFF:
-                       tim = ktime_set(0, c->t_reset_to_off * NSEC_PER_USEC);
+                       tim = c->t_reset_to_off * NSEC_PER_USEC;
                        goto change;
                default:
                        break;
index 2d1a6f2e16ab811283b0864f6fa551a5572096f3..f317984f75360141ee606b8ca31b78baa853a1d5 100644 (file)
@@ -1282,7 +1282,7 @@ static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx)
        /* start timer, if not already started */
        if (!(hrtimer_active(&ctx->tx_timer) || atomic_read(&ctx->stop)))
                hrtimer_start(&ctx->tx_timer,
-                               ktime_set(0, ctx->timer_interval),
+                               ctx->timer_interval,
                                HRTIMER_MODE_REL);
 }
 
index 9f61293f1a5683fd6dc8042c273a64944d8061c8..f38c44061b5ba664f832d62b4a899b8a80568b1f 100644 (file)
@@ -177,7 +177,7 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,
        if (rt2800usb_txstatus_pending(rt2x00dev)) {
                /* Read register after 1 ms */
                hrtimer_start(&rt2x00dev->txstatus_timer,
-                             ktime_set(0, TXSTATUS_READ_INTERVAL),
+                             TXSTATUS_READ_INTERVAL,
                              HRTIMER_MODE_REL);
                return false;
        }
@@ -204,7 +204,7 @@ static void rt2800usb_async_read_tx_status(struct rt2x00_dev *rt2x00dev)
 
        /* Read TX_STA_FIFO register after 2 ms */
        hrtimer_start(&rt2x00dev->txstatus_timer,
-                     ktime_set(0, 2*TXSTATUS_READ_INTERVAL),
+                     2 * TXSTATUS_READ_INTERVAL,
                      HRTIMER_MODE_REL);
 }
 
index 9236e40ac05592f37eb895fe2b5ea5ef7bee6290..1800befa8b8baa1ca87052b7a4dc4e36cde9b2d8 100644 (file)
@@ -3044,7 +3044,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb);
 static ktime_t fixup_debug_start(struct pci_dev *dev,
                                 void (*fn)(struct pci_dev *dev))
 {
-       ktime_t calltime = ktime_set(0, 0);
+       ktime_t calltime = 0;
 
        dev_dbg(&dev->dev, "calling %pF\n", fn);
        if (initcall_debug) {
index 978e6d6405729cb32391f73c65ac23a1b0eeebef..9a32f8627eccfd2054e96ec895234c0ca29cd70d 100644 (file)
@@ -283,7 +283,7 @@ static int __init msi_wmi_input_setup(void)
        if (err)
                goto err_free_keymap;
 
-       last_pressed = ktime_set(0, 0);
+       last_pressed = 0;
 
        return 0;
 
index 15fed9d8f871a715dfada3dd22b8ca0e461dd66a..bfcd6fba6363bc01e5db313d6094dc1573424dd0 100644 (file)
@@ -169,7 +169,7 @@ static void ltc2952_poweroff_kill(void)
 
 static void ltc2952_poweroff_default(struct ltc2952_poweroff *data)
 {
-       data->wde_interval = ktime_set(0, 300L*1E6L);
+       data->wde_interval = 300L * 1E6L;
        data->trigger_delay = ktime_set(2, 500L*1E6L);
 
        hrtimer_init(&data->timer_trigger, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
index 84a52db9b05f905bae3c294b88d116e77327f8c5..fc0fa7577636dab1c02c3a34ea9e2c18b3255bfd 100644 (file)
@@ -363,7 +363,7 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
                rtc_timer_remove(rtc, &rtc->aie_timer);
 
        rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time);
-       rtc->aie_timer.period = ktime_set(0, 0);
+       rtc->aie_timer.period = 0;
        if (alarm->enabled)
                err = rtc_timer_enqueue(rtc, &rtc->aie_timer);
 
@@ -391,11 +391,11 @@ int rtc_initialize_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
                return err;
 
        rtc->aie_timer.node.expires = rtc_tm_to_ktime(alarm->time);
-       rtc->aie_timer.period = ktime_set(0, 0);
+       rtc->aie_timer.period = 0;
 
        /* Alarm has to be enabled & in the future for us to enqueue it */
-       if (alarm->enabled && (rtc_tm_to_ktime(now).tv64 <
-                        rtc->aie_timer.node.expires.tv64)) {
+       if (alarm->enabled && (rtc_tm_to_ktime(now) <
+                        rtc->aie_timer.node.expires)) {
 
                rtc->aie_timer.enabled = 1;
                timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node);
@@ -554,7 +554,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer)
        int count;
        rtc = container_of(timer, struct rtc_device, pie_timer);
 
-       period = ktime_set(0, NSEC_PER_SEC/rtc->irq_freq);
+       period = NSEC_PER_SEC / rtc->irq_freq;
        count = hrtimer_forward_now(timer, period);
 
        rtc_handle_legacy_irq(rtc, count, RTC_PF);
@@ -665,7 +665,7 @@ static int rtc_update_hrtimer(struct rtc_device *rtc, int enabled)
                return -1;
 
        if (enabled) {
-               ktime_t period = ktime_set(0, NSEC_PER_SEC / rtc->irq_freq);
+               ktime_t period = NSEC_PER_SEC / rtc->irq_freq;
 
                hrtimer_start(&rtc->pie_timer, period, HRTIMER_MODE_REL);
        }
@@ -766,7 +766,7 @@ static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer)
 
        /* Skip over expired timers */
        while (next) {
-               if (next->expires.tv64 >= now.tv64)
+               if (next->expires >= now)
                        break;
                next = timerqueue_iterate_next(next);
        }
@@ -858,7 +858,7 @@ again:
        __rtc_read_time(rtc, &tm);
        now = rtc_tm_to_ktime(tm);
        while ((next = timerqueue_getnext(&rtc->timerqueue))) {
-               if (next->expires.tv64 > now.tv64)
+               if (next->expires > now)
                        break;
 
                /* expire timer */
index 6d75984a3d85f29c464ddcc384839968a6633fb2..5fa6991928647971ef52047dad1294455219ada8 100644 (file)
@@ -333,7 +333,7 @@ void ap_wait(enum ap_wait wait)
        case AP_WAIT_TIMEOUT:
                spin_lock_bh(&ap_poll_timer_lock);
                if (!hrtimer_is_queued(&ap_poll_timer)) {
-                       hr_time = ktime_set(0, poll_timeout);
+                       hr_time = poll_timeout;
                        hrtimer_forward_now(&ap_poll_timer, hr_time);
                        hrtimer_restart(&ap_poll_timer);
                }
@@ -860,7 +860,7 @@ static ssize_t poll_timeout_store(struct bus_type *bus, const char *buf,
            time > 120000000000ULL)
                return -EINVAL;
        poll_timeout = time;
-       hr_time = ktime_set(0, poll_timeout);
+       hr_time = poll_timeout;
 
        spin_lock_bh(&ap_poll_timer_lock);
        hrtimer_cancel(&ap_poll_timer);
index 2583e8b50b21c2cfa6ec3d10e624adb8141d5c9d..3d3768aaab4f2bb79ccbaf40f1f569114e4f9b30 100644 (file)
@@ -1694,7 +1694,7 @@ static void srp_snd_msg_failed(struct scsi_info *vscsi, long rc)
                if (!vscsi->rsp_q_timer.started) {
                        if (vscsi->rsp_q_timer.timer_pops <
                            MAX_TIMER_POPS) {
-                               kt = ktime_set(0, WAIT_NANO_SECONDS);
+                               kt = WAIT_NANO_SECONDS;
                        } else {
                                /*
                                 * slide the timeslice if the maximum
index cf04a364fd8b35f869c31e44491d237ae1b3bc6e..03051e12a0721ec0632ebca9f66538c295844479 100644 (file)
@@ -4085,7 +4085,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip,
                        jiffies_to_timespec(delta_jiff, &ts);
                        kt = ktime_set(ts.tv_sec, ts.tv_nsec);
                } else
-                       kt = ktime_set(0, sdebug_ndelay);
+                       kt = sdebug_ndelay;
                if (NULL == sd_dp) {
                        sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC);
                        if (NULL == sd_dp)
index a2c2817fc566911e59f019d91639260d2df2fa09..20e5e5fb048cddbb3df34e06723adfa083083835 100644 (file)
@@ -930,7 +930,7 @@ static void ufshcd_clk_scaling_update_busy(struct ufs_hba *hba)
        if (!hba->outstanding_reqs && scaling->is_busy_started) {
                scaling->tot_busy_t += ktime_to_us(ktime_sub(ktime_get(),
                                        scaling->busy_start_t));
-               scaling->busy_start_t = ktime_set(0, 0);
+               scaling->busy_start_t = 0;
                scaling->is_busy_started = false;
        }
 }
@@ -6661,7 +6661,7 @@ start_window:
                scaling->busy_start_t = ktime_get();
                scaling->is_busy_started = true;
        } else {
-               scaling->busy_start_t = ktime_set(0, 0);
+               scaling->busy_start_t = 0;
                scaling->is_busy_started = false;
        }
        spin_unlock_irqrestore(hba->host->host_lock, flags);
index de8e22ec39024edf0cf7d5d04e5ab55547e2658e..93e24ce61a3ac6c3701ed117df2770287f63572a 100644 (file)
@@ -234,8 +234,8 @@ static void ci_otg_add_timer(struct ci_hdrc *ci, enum otg_fsm_timer t)
                                ktime_set(timer_sec, timer_nsec));
        ci->enabled_otg_timer_bits |= (1 << t);
        if ((ci->next_otg_timer == NUM_OTG_FSM_TIMERS) ||
-                       (ci->hr_timeouts[ci->next_otg_timer].tv64 >
-                                               ci->hr_timeouts[t].tv64)) {
+                       (ci->hr_timeouts[ci->next_otg_timer] >
+                                               ci->hr_timeouts[t])) {
                        ci->next_otg_timer = t;
                        hrtimer_start_range_ns(&ci->otg_fsm_hrtimer,
                                        ci->hr_timeouts[t], NSEC_PER_MSEC,
@@ -269,8 +269,8 @@ static void ci_otg_del_timer(struct ci_hdrc *ci, enum otg_fsm_timer t)
                        for_each_set_bit(cur_timer, &enabled_timer_bits,
                                                        NUM_OTG_FSM_TIMERS) {
                                if ((next_timer == NUM_OTG_FSM_TIMERS) ||
-                                       (ci->hr_timeouts[next_timer].tv64 <
-                                       ci->hr_timeouts[cur_timer].tv64))
+                                       (ci->hr_timeouts[next_timer] <
+                                        ci->hr_timeouts[cur_timer]))
                                        next_timer = cur_timer;
                        }
                }
@@ -397,14 +397,14 @@ static enum hrtimer_restart ci_otg_hrtimer_func(struct hrtimer *t)
 
        now = ktime_get();
        for_each_set_bit(cur_timer, &enabled_timer_bits, NUM_OTG_FSM_TIMERS) {
-               if (now.tv64 >= ci->hr_timeouts[cur_timer].tv64) {
+               if (now >= ci->hr_timeouts[cur_timer]) {
                        ci->enabled_otg_timer_bits &= ~(1 << cur_timer);
                        if (otg_timer_handlers[cur_timer])
                                ret = otg_timer_handlers[cur_timer](ci);
                } else {
                        if ((next_timer == NUM_OTG_FSM_TIMERS) ||
-                               (ci->hr_timeouts[cur_timer].tv64 <
-                                       ci->hr_timeouts[next_timer].tv64))
+                               (ci->hr_timeouts[cur_timer] <
+                                       ci->hr_timeouts[next_timer]))
                                next_timer = cur_timer;
                }
        }
index e8008fa35e1e69c354ba35c510b1019e7a560c44..224717e63a5300970867a663cd030d8cd62068f6 100644 (file)
@@ -1113,8 +1113,7 @@ static struct sk_buff *ncm_wrap_ntb(struct gether *port,
                }
 
                /* Delay the timer. */
-               hrtimer_start(&ncm->task_timer,
-                             ktime_set(0, TX_TIMEOUT_NSECS),
+               hrtimer_start(&ncm->task_timer, TX_TIMEOUT_NSECS,
                              HRTIMER_MODE_REL);
 
                /* Add the datagram position entries */
index 69f50e6533a6ec68fa3cefeeb43842964dc227f7..3893b5bafd8725a00ec4b32335a83c53fcef33a9 100644 (file)
@@ -88,8 +88,7 @@ static void ehci_enable_event(struct ehci_hcd *ehci, unsigned event,
        ktime_t         *timeout = &ehci->hr_timeouts[event];
 
        if (resched)
-               *timeout = ktime_add(ktime_get(),
-                               ktime_set(0, event_delays_ns[event]));
+               *timeout = ktime_add(ktime_get(), event_delays_ns[event]);
        ehci->enabled_hrtimer_events |= (1 << event);
 
        /* Track only the lowest-numbered pending event */
@@ -425,7 +424,7 @@ static enum hrtimer_restart ehci_hrtimer_func(struct hrtimer *t)
         */
        now = ktime_get();
        for_each_set_bit(e, &events, EHCI_HRTIMER_NUM_EVENTS) {
-               if (now.tv64 >= ehci->hr_timeouts[e].tv64)
+               if (now >= ehci->hr_timeouts[e])
                        event_handlers[e](ehci);
                else
                        ehci_enable_event(ehci, e, false);
index 66efa9a6768776f91407dd3e91b7499560301ac2..9d0b0518290a1d596f7018216bc694d5bbc037b1 100644 (file)
@@ -1080,8 +1080,7 @@ static void fotg210_enable_event(struct fotg210_hcd *fotg210, unsigned event,
        ktime_t *timeout = &fotg210->hr_timeouts[event];
 
        if (resched)
-               *timeout = ktime_add(ktime_get(),
-                               ktime_set(0, event_delays_ns[event]));
+               *timeout = ktime_add(ktime_get(), event_delays_ns[event]);
        fotg210->enabled_hrtimer_events |= (1 << event);
 
        /* Track only the lowest-numbered pending event */
@@ -1381,7 +1380,7 @@ static enum hrtimer_restart fotg210_hrtimer_func(struct hrtimer *t)
         */
        now = ktime_get();
        for_each_set_bit(e, &events, FOTG210_HRTIMER_NUM_EVENTS) {
-               if (now.tv64 >= fotg210->hr_timeouts[e].tv64)
+               if (now >= fotg210->hr_timeouts[e])
                        event_handlers[e](fotg210);
                else
                        fotg210_enable_event(fotg210, e, false);
index d4d7c56b48c7edf70aba49d6c2b9aa04347acd7c..16363852c0346b28b6452e04eddedfc630635428 100644 (file)
@@ -197,8 +197,7 @@ static enum hrtimer_restart cppi41_recheck_tx_req(struct hrtimer *timer)
        if (!list_empty(&controller->early_tx_list) &&
            !hrtimer_is_queued(&controller->early_tx)) {
                ret = HRTIMER_RESTART;
-               hrtimer_forward_now(&controller->early_tx,
-                               ktime_set(0, 20 * NSEC_PER_USEC));
+               hrtimer_forward_now(&controller->early_tx, 20 * NSEC_PER_USEC);
        }
 
        spin_unlock_irqrestore(&musb->lock, flags);
@@ -280,9 +279,9 @@ static void cppi41_dma_callback(void *private_data)
                unsigned long usecs = cppi41_channel->total_len / 10;
 
                hrtimer_start_range_ns(&controller->early_tx,
-                               ktime_set(0, usecs * NSEC_PER_USEC),
-                               20 * NSEC_PER_USEC,
-                               HRTIMER_MODE_REL);
+                                      usecs * NSEC_PER_USEC,
+                                      20 * NSEC_PER_USEC,
+                                      HRTIMER_MODE_REL);
        }
 
 out:
index 955c5241a8f2d065707651e914f05d7aec721013..4ab67e8cb776ac18fd12bfec2fa7816800f3f5fa 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1285,7 +1285,7 @@ static long read_events(struct kioctx *ctx, long min_nr, long nr,
                        struct io_event __user *event,
                        struct timespec __user *timeout)
 {
-       ktime_t until = { .tv64 = KTIME_MAX };
+       ktime_t until = KTIME_MAX;
        long ret = 0;
 
        if (timeout) {
@@ -1311,7 +1311,7 @@ static long read_events(struct kioctx *ctx, long min_nr, long nr,
         * the ringbuffer empty. So in practice we should be ok, but it's
         * something to be aware of when touching this code.
         */
-       if (until.tv64 == 0)
+       if (until == 0)
                aio_read_events(ctx, min_nr, nr, event, &ret);
        else
                wait_event_interruptible_hrtimeout(ctx->wait,
index 35502d4046f573fac4909cceec1117ef033338e6..6df332296c661a688289da35e890f89696bfdccb 100644 (file)
@@ -1395,7 +1395,6 @@ static int nodeid_warned(int nodeid, int num_nodes, int *warned)
 void dlm_scan_waiters(struct dlm_ls *ls)
 {
        struct dlm_lkb *lkb;
-       ktime_t zero = ktime_set(0, 0);
        s64 us;
        s64 debug_maxus = 0;
        u32 debug_scanned = 0;
@@ -1409,7 +1408,7 @@ void dlm_scan_waiters(struct dlm_ls *ls)
        mutex_lock(&ls->ls_waiters_mutex);
 
        list_for_each_entry(lkb, &ls->ls_waiters, lkb_wait_reply) {
-               if (ktime_equal(lkb->lkb_wait_time, zero))
+               if (!lkb->lkb_wait_time)
                        continue;
 
                debug_scanned++;
@@ -1419,7 +1418,7 @@ void dlm_scan_waiters(struct dlm_ls *ls)
                if (us < dlm_config.ci_waitwarn_us)
                        continue;
 
-               lkb->lkb_wait_time = zero;
+               lkb->lkb_wait_time = 0;
 
                debug_expired++;
                if (us > debug_maxus)
index f7b3ba61add59326e14bf9ddb6a011adae2dc4df..94f50cac91c617b03025d4d596d8d9d65d2c185b 100644 (file)
@@ -695,7 +695,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
        gl->gl_target = LM_ST_UNLOCKED;
        gl->gl_demote_state = LM_ST_EXCLUSIVE;
        gl->gl_ops = glops;
-       gl->gl_dstamp = ktime_set(0, 0);
+       gl->gl_dstamp = 0;
        preempt_disable();
        /* We use the global stats to estimate the initial per-glock stats */
        gl->gl_stats = this_cpu_ptr(sdp->sd_lkstats)->lkstats[glops->go_type];
index 45962fe5098c6ff9e87a1a23158409841ad02033..0ca4af8cca5d89f9d0ecb4d164c5164a62585b4f 100644 (file)
@@ -619,12 +619,11 @@ nfs4_ff_layoutstat_start_io(struct nfs4_ff_layout_mirror *mirror,
                            struct nfs4_ff_layoutstat *layoutstat,
                            ktime_t now)
 {
-       static const ktime_t notime = {0};
        s64 report_interval = FF_LAYOUTSTATS_REPORT_INTERVAL;
        struct nfs4_flexfile_layout *ffl = FF_LAYOUT_FROM_HDR(mirror->layout);
 
        nfs4_ff_start_busy_timer(&layoutstat->busy_timer, now);
-       if (ktime_equal(mirror->start_time, notime))
+       if (!mirror->start_time)
                mirror->start_time = now;
        if (mirror->report_interval != 0)
                report_interval = (s64)mirror->report_interval * 1000LL;
index 96a155ab5059455e81687f5590912b9c1ee1b0c9..f6e871760f8d97265f4974c159dca7a7b6439b7f 100644 (file)
@@ -1250,7 +1250,7 @@ static int o2hb_thread(void *data)
 
                mlog(ML_HEARTBEAT,
                     "start = %lld, end = %lld, msec = %u, ret = %d\n",
-                    before_hb.tv64, after_hb.tv64, elapsed_msec, ret);
+                    before_hb, after_hb, elapsed_msec, ret);
 
                if (!kthread_should_stop() &&
                    elapsed_msec < reg->hr_timeout_ms) {
index 9ae4abb4110b84ef286facc88e66be9d954a021d..c173cc196175b4e4f72a6553b0faba67cdead250 100644 (file)
@@ -55,7 +55,7 @@ static inline bool isalarm(struct timerfd_ctx *ctx)
 /*
  * This gets called when the timer event triggers. We set the "expired"
  * flag, but we do not re-arm the timer (in case it's necessary,
- * tintv.tv64 != 0) until the timer is accessed.
+ * tintv != 0) until the timer is accessed.
  */
 static void timerfd_triggered(struct timerfd_ctx *ctx)
 {
@@ -93,7 +93,7 @@ static enum alarmtimer_restart timerfd_alarmproc(struct alarm *alarm,
  */
 void timerfd_clock_was_set(void)
 {
-       ktime_t moffs = ktime_mono_to_real((ktime_t){ .tv64 = 0 });
+       ktime_t moffs = ktime_mono_to_real(0);
        struct timerfd_ctx *ctx;
        unsigned long flags;
 
@@ -102,8 +102,8 @@ void timerfd_clock_was_set(void)
                if (!ctx->might_cancel)
                        continue;
                spin_lock_irqsave(&ctx->wqh.lock, flags);
-               if (ctx->moffs.tv64 != moffs.tv64) {
-                       ctx->moffs.tv64 = KTIME_MAX;
+               if (ctx->moffs != moffs) {
+                       ctx->moffs = KTIME_MAX;
                        ctx->ticks++;
                        wake_up_locked(&ctx->wqh);
                }
@@ -124,9 +124,9 @@ static void timerfd_remove_cancel(struct timerfd_ctx *ctx)
 
 static bool timerfd_canceled(struct timerfd_ctx *ctx)
 {
-       if (!ctx->might_cancel || ctx->moffs.tv64 != KTIME_MAX)
+       if (!ctx->might_cancel || ctx->moffs != KTIME_MAX)
                return false;
-       ctx->moffs = ktime_mono_to_real((ktime_t){ .tv64 = 0 });
+       ctx->moffs = ktime_mono_to_real(0);
        return true;
 }
 
@@ -155,7 +155,7 @@ static ktime_t timerfd_get_remaining(struct timerfd_ctx *ctx)
        else
                remaining = hrtimer_expires_remaining_adjusted(&ctx->t.tmr);
 
-       return remaining.tv64 < 0 ? ktime_set(0, 0): remaining;
+       return remaining < 0 ? 0: remaining;
 }
 
 static int timerfd_setup(struct timerfd_ctx *ctx, int flags,
@@ -184,7 +184,7 @@ static int timerfd_setup(struct timerfd_ctx *ctx, int flags,
                ctx->t.tmr.function = timerfd_tmrproc;
        }
 
-       if (texp.tv64 != 0) {
+       if (texp != 0) {
                if (isalarm(ctx)) {
                        if (flags & TFD_TIMER_ABSTIME)
                                alarm_start(&ctx->t.alarm, texp);
@@ -261,9 +261,9 @@ static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count,
        if (ctx->ticks) {
                ticks = ctx->ticks;
 
-               if (ctx->expired && ctx->tintv.tv64) {
+               if (ctx->expired && ctx->tintv) {
                        /*
-                        * If tintv.tv64 != 0, this is a periodic timer that
+                        * If tintv != 0, this is a periodic timer that
                         * needs to be re-armed. We avoid doing it in the timer
                         * callback to avoid DoS attacks specifying a very
                         * short timer period.
@@ -410,7 +410,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags)
        else
                hrtimer_init(&ctx->t.tmr, clockid, HRTIMER_MODE_ABS);
 
-       ctx->moffs = ktime_mono_to_real((ktime_t){ .tv64 = 0 });
+       ctx->moffs = ktime_mono_to_real(0);
 
        ufd = anon_inode_getfd("[timerfd]", &timerfd_fops, ctx,
                               O_RDWR | (flags & TFD_SHARED_FCNTL_FLAGS));
@@ -469,7 +469,7 @@ static int do_timerfd_settime(int ufd, int flags,
         * We do not update "ticks" and "expired" since the timer will be
         * re-programmed again in the following timerfd_setup() call.
         */
-       if (ctx->expired && ctx->tintv.tv64) {
+       if (ctx->expired && ctx->tintv) {
                if (isalarm(ctx))
                        alarm_forward_now(&ctx->t.alarm, ctx->tintv);
                else
@@ -499,7 +499,7 @@ static int do_timerfd_gettime(int ufd, struct itimerspec *t)
        ctx = f.file->private_data;
 
        spin_lock_irq(&ctx->wqh.lock);
-       if (ctx->expired && ctx->tintv.tv64) {
+       if (ctx->expired && ctx->tintv) {
                ctx->expired = 0;
 
                if (isalarm(ctx)) {
index dda39d8fa189b50d897c7c59bbba5b1f8bdab649..b717ed9d2b755255cfafa76553b3823449f594c2 100644 (file)
 
 struct arch_timer_kvm {
        /* Virtual offset */
-       cycle_t                 cntvoff;
+       u64                     cntvoff;
 };
 
 struct arch_timer_cpu {
        /* Registers: control register, timer value */
        u32                             cntv_ctl;       /* Saved/restored */
-       cycle_t                         cntv_cval;      /* Saved/restored */
+       u64                             cntv_cval;      /* Saved/restored */
 
        /*
         * Anything that is not used directly from assembly code goes
index 65602d395a52a0b83aaeab8c42384f1a775afc44..e315d04a2fd91ceb94948949d3affd8e12d25748 100644 (file)
@@ -75,8 +75,8 @@ struct module;
  * structure.
  */
 struct clocksource {
-       cycle_t (*read)(struct clocksource *cs);
-       cycle_t mask;
+       u64 (*read)(struct clocksource *cs);
+       u64 mask;
        u32 mult;
        u32 shift;
        u64 max_idle_ns;
@@ -98,8 +98,8 @@ struct clocksource {
 #ifdef CONFIG_CLOCKSOURCE_WATCHDOG
        /* Watchdog related data, used by the framework */
        struct list_head wd_list;
-       cycle_t cs_last;
-       cycle_t wd_last;
+       u64 cs_last;
+       u64 wd_last;
 #endif
        struct module *owner;
 };
@@ -117,7 +117,7 @@ struct clocksource {
 #define CLOCK_SOURCE_RESELECT                  0x100
 
 /* simplify initialization of mask field */
-#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
+#define CLOCKSOURCE_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
 
 static inline u32 clocksource_freq2mult(u32 freq, u32 shift_constant, u64 from)
 {
@@ -176,7 +176,7 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant)
  *
  * XXX - This could use some mult_lxl_ll() asm optimization
  */
-static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift)
+static inline s64 clocksource_cyc2ns(u64 cycles, u32 mult, u32 shift)
 {
        return ((u64) cycles * mult) >> shift;
 }
@@ -236,13 +236,13 @@ static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz
 
 extern int timekeeping_notify(struct clocksource *clock);
 
-extern cycle_t clocksource_mmio_readl_up(struct clocksource *);
-extern cycle_t clocksource_mmio_readl_down(struct clocksource *);
-extern cycle_t clocksource_mmio_readw_up(struct clocksource *);
-extern cycle_t clocksource_mmio_readw_down(struct clocksource *);
+extern u64 clocksource_mmio_readl_up(struct clocksource *);
+extern u64 clocksource_mmio_readl_down(struct clocksource *);
+extern u64 clocksource_mmio_readw_up(struct clocksource *);
+extern u64 clocksource_mmio_readw_down(struct clocksource *);
 
 extern int clocksource_mmio_init(void __iomem *, const char *,
-       unsigned long, int, unsigned, cycle_t (*)(struct clocksource *));
+       unsigned long, int, unsigned, u64 (*)(struct clocksource *));
 
 extern int clocksource_i8253_init(void);
 
index 1f79b20918b1eed2b9b1598cf8a6ccf545b23952..4334106f44c3272c3c8622934c626a8147b136ff 100644 (file)
@@ -50,6 +50,6 @@ dw_apb_clocksource_init(unsigned rating, const char *name, void __iomem *base,
                        unsigned long freq);
 void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs);
 void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs);
-cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs);
+u64 dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs);
 
 #endif /* __DW_APB_TIMER_H__ */
index 6435f46d6e1319b71f52050144f3e871986196df..7c5b694864cd9a52d3c5cd4496e834c4e8c5e7aa 100644 (file)
@@ -1,14 +1,14 @@
 #ifndef _LINUX_FUTEX_H
 #define _LINUX_FUTEX_H
 
+#include <linux/ktime.h>
 #include <uapi/linux/futex.h>
 
 struct inode;
 struct mm_struct;
 struct task_struct;
-union ktime;
 
-long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout,
+long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
              u32 __user *uaddr2, u32 val2, u32 val3);
 
 extern int
index 5e00f80b1535e6b7487c1fbcd0949fad42bfea2e..cdab81ba29f899934794f1e7924f3dbb6d469d5f 100644 (file)
@@ -228,8 +228,8 @@ static inline void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t t
 
 static inline void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64)
 {
-       timer->node.expires.tv64 = tv64;
-       timer->_softexpires.tv64 = tv64;
+       timer->node.expires = tv64;
+       timer->_softexpires = tv64;
 }
 
 static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time)
@@ -256,11 +256,11 @@ static inline ktime_t hrtimer_get_softexpires(const struct hrtimer *timer)
 
 static inline s64 hrtimer_get_expires_tv64(const struct hrtimer *timer)
 {
-       return timer->node.expires.tv64;
+       return timer->node.expires;
 }
 static inline s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer)
 {
-       return timer->_softexpires.tv64;
+       return timer->_softexpires;
 }
 
 static inline s64 hrtimer_get_expires_ns(const struct hrtimer *timer)
@@ -297,7 +297,7 @@ extern void hrtimer_peek_ahead_timers(void);
  * this resolution values.
  */
 # define HIGH_RES_NSEC         1
-# define KTIME_HIGH_RES                (ktime_t) { .tv64 = HIGH_RES_NSEC }
+# define KTIME_HIGH_RES                (HIGH_RES_NSEC)
 # define MONOTONIC_RES_NSEC    HIGH_RES_NSEC
 # define KTIME_MONOTONIC_RES   KTIME_HIGH_RES
 
@@ -333,7 +333,7 @@ __hrtimer_expires_remaining_adjusted(const struct hrtimer *timer, ktime_t now)
         * hrtimer_start_range_ns() to prevent short timeouts.
         */
        if (IS_ENABLED(CONFIG_TIME_LOW_RES) && timer->is_rel)
-               rem.tv64 -= hrtimer_resolution;
+               rem -= hrtimer_resolution;
        return rem;
 }
 
index 81f930b0bca97daf7a05ca5b94c70f77a4fd3b2a..7b49c71c968ba0935a5482afb71055107563542b 100644 (file)
@@ -259,11 +259,11 @@ extern void gic_init(unsigned long gic_base_addr,
        unsigned long gic_addrspace_size, unsigned int cpu_vec,
        unsigned int irqbase);
 extern void gic_clocksource_init(unsigned int);
-extern cycle_t gic_read_count(void);
+extern u64 gic_read_count(void);
 extern unsigned int gic_get_count_width(void);
-extern cycle_t gic_read_compare(void);
-extern void gic_write_compare(cycle_t cnt);
-extern void gic_write_cpu_compare(cycle_t cnt, int cpu);
+extern u64 gic_read_compare(void);
+extern void gic_write_compare(u64 cnt);
+extern void gic_write_cpu_compare(u64 cnt, int cpu);
 extern void gic_start_count(void);
 extern void gic_stop_count(void);
 extern int gic_get_c0_compare_int(void);
index 0fb7ffb1775f117d1ebefd4315d4ca99b03be546..0c8bd45c820615eeaa3d50370f598c7f567ce51d 100644 (file)
 #include <linux/time.h>
 #include <linux/jiffies.h>
 
-/*
- * ktime_t:
- *
- * A single 64-bit variable is used to store the hrtimers
- * internal representation of time values in scalar nanoseconds. The
- * design plays out best on 64-bit CPUs, where most conversions are
- * NOPs and most arithmetic ktime_t operations are plain arithmetic
- * operations.
- *
- */
-union ktime {
-       s64     tv64;
-};
-
-typedef union ktime ktime_t;           /* Kill this */
+/* Nanosecond scalar representation for kernel time values */
+typedef s64    ktime_t;
 
 /**
  * ktime_set - Set a ktime_t variable from a seconds/nanoseconds value
@@ -50,39 +37,34 @@ typedef union ktime ktime_t;                /* Kill this */
 static inline ktime_t ktime_set(const s64 secs, const unsigned long nsecs)
 {
        if (unlikely(secs >= KTIME_SEC_MAX))
-               return (ktime_t){ .tv64 = KTIME_MAX };
+               return KTIME_MAX;
 
-       return (ktime_t) { .tv64 = secs * NSEC_PER_SEC + (s64)nsecs };
+       return secs * NSEC_PER_SEC + (s64)nsecs;
 }
 
 /* Subtract two ktime_t variables. rem = lhs -rhs: */
-#define ktime_sub(lhs, rhs) \
-               ({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
+#define ktime_sub(lhs, rhs)    ((lhs) - (rhs))
 
 /* Add two ktime_t variables. res = lhs + rhs: */
-#define ktime_add(lhs, rhs) \
-               ({ (ktime_t){ .tv64 = (lhs).tv64 + (rhs).tv64 }; })
+#define ktime_add(lhs, rhs)    ((lhs) + (rhs))
 
 /*
  * Same as ktime_add(), but avoids undefined behaviour on overflow; however,
  * this means that you must check the result for overflow yourself.
  */
-#define ktime_add_unsafe(lhs, rhs) \
-               ({ (ktime_t){ .tv64 = (u64) (lhs).tv64 + (rhs).tv64 }; })
+#define ktime_add_unsafe(lhs, rhs)     ((u64) (lhs) + (rhs))
 
 /*
  * Add a ktime_t variable and a scalar nanosecond value.
  * res = kt + nsval:
  */
-#define ktime_add_ns(kt, nsval) \
-               ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; })
+#define ktime_add_ns(kt, nsval)                ((kt) + (nsval))
 
 /*
  * Subtract a scalar nanosecod from a ktime_t variable
  * res = kt - nsval:
  */
-#define ktime_sub_ns(kt, nsval) \
-               ({ (ktime_t){ .tv64 = (kt).tv64 - (nsval) }; })
+#define ktime_sub_ns(kt, nsval)                ((kt) - (nsval))
 
 /* convert a timespec to ktime_t format: */
 static inline ktime_t timespec_to_ktime(struct timespec ts)
@@ -103,31 +85,16 @@ static inline ktime_t timeval_to_ktime(struct timeval tv)
 }
 
 /* Map the ktime_t to timespec conversion to ns_to_timespec function */
-#define ktime_to_timespec(kt)          ns_to_timespec((kt).tv64)
+#define ktime_to_timespec(kt)          ns_to_timespec((kt))
 
 /* Map the ktime_t to timespec conversion to ns_to_timespec function */
-#define ktime_to_timespec64(kt)                ns_to_timespec64((kt).tv64)
+#define ktime_to_timespec64(kt)                ns_to_timespec64((kt))
 
 /* Map the ktime_t to timeval conversion to ns_to_timeval function */
-#define ktime_to_timeval(kt)           ns_to_timeval((kt).tv64)
+#define ktime_to_timeval(kt)           ns_to_timeval((kt))
 
 /* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */
-#define ktime_to_ns(kt)                        ((kt).tv64)
-
-
-/**
- * ktime_equal - Compares two ktime_t variables to see if they are equal
- * @cmp1:      comparable1
- * @cmp2:      comparable2
- *
- * Compare two ktime_t variables.
- *
- * Return: 1 if equal.
- */
-static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
-{
-       return cmp1.tv64 == cmp2.tv64;
-}
+#define ktime_to_ns(kt)                        (kt)
 
 /**
  * ktime_compare - Compares two ktime_t variables for less, greater or equal
@@ -141,9 +108,9 @@ static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
  */
 static inline int ktime_compare(const ktime_t cmp1, const ktime_t cmp2)
 {
-       if (cmp1.tv64 < cmp2.tv64)
+       if (cmp1 < cmp2)
                return -1;
-       if (cmp1.tv64 > cmp2.tv64)
+       if (cmp1 > cmp2)
                return 1;
        return 0;
 }
@@ -182,7 +149,7 @@ static inline s64 ktime_divns(const ktime_t kt, s64 div)
         */
        BUG_ON(div < 0);
        if (__builtin_constant_p(div) && !(div >> 32)) {
-               s64 ns = kt.tv64;
+               s64 ns = kt;
                u64 tmp = ns < 0 ? -ns : ns;
 
                do_div(tmp, div);
@@ -199,7 +166,7 @@ static inline s64 ktime_divns(const ktime_t kt, s64 div)
         * so catch them on 64bit as well.
         */
        WARN_ON(div < 0);
-       return kt.tv64 / div;
+       return kt / div;
 }
 #endif
 
@@ -256,7 +223,7 @@ extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs);
 static inline __must_check bool ktime_to_timespec_cond(const ktime_t kt,
                                                       struct timespec *ts)
 {
-       if (kt.tv64) {
+       if (kt) {
                *ts = ktime_to_timespec(kt);
                return true;
        } else {
@@ -275,7 +242,7 @@ static inline __must_check bool ktime_to_timespec_cond(const ktime_t kt,
 static inline __must_check bool ktime_to_timespec64_cond(const ktime_t kt,
                                                       struct timespec64 *ts)
 {
-       if (kt.tv64) {
+       if (kt) {
                *ts = ktime_to_timespec64(kt);
                return true;
        } else {
@@ -290,20 +257,16 @@ static inline __must_check bool ktime_to_timespec64_cond(const ktime_t kt,
  * this resolution values.
  */
 #define LOW_RES_NSEC           TICK_NSEC
-#define KTIME_LOW_RES          (ktime_t){ .tv64 = LOW_RES_NSEC }
+#define KTIME_LOW_RES          (LOW_RES_NSEC)
 
 static inline ktime_t ns_to_ktime(u64 ns)
 {
-       static const ktime_t ktime_zero = { .tv64 = 0 };
-
-       return ktime_add_ns(ktime_zero, ns);
+       return ns;
 }
 
 static inline ktime_t ms_to_ktime(u64 ms)
 {
-       static const ktime_t ktime_zero = { .tv64 = 0 };
-
-       return ktime_add_ms(ktime_zero, ms);
+       return ms * NSEC_PER_MSEC;
 }
 
 # include <linux/timekeeping.h>
index c9f379689dd068beadbdb828fe8f09b521b28f12..93bdb3485192ff7f4094a649f6f98f4cdad02f51 100644 (file)
@@ -1460,7 +1460,7 @@ int mlx4_get_roce_gid_from_slave(struct mlx4_dev *dev, int port, int slave_id,
 int mlx4_FLOW_STEERING_IB_UC_QP_RANGE(struct mlx4_dev *dev, u32 min_range_qpn,
                                      u32 max_range_qpn);
 
-cycle_t mlx4_read_clock(struct mlx4_dev *dev);
+u64 mlx4_read_clock(struct mlx4_dev *dev);
 
 struct mlx4_active_ports {
        DECLARE_BITMAP(ports, MLX4_MAX_PORTS);
index ac7fa34db8a7183b0b68176f8d6748346c288207..b53c0cfd417e3bec1c5cfab76787901bafa5884c 100644 (file)
@@ -3227,7 +3227,7 @@ static inline ktime_t net_timedelta(ktime_t t)
 
 static inline ktime_t net_invalid_timestamp(void)
 {
-       return ktime_set(0, 0);
+       return 0;
 }
 
 struct sk_buff *skb_clone_sk(struct sk_buff *skb);
index 62be0786d6d0c6274017ff0e0cb3c002d6092f86..a04fea19676f30e07282231b6c14b4ce9ab40f1d 100644 (file)
@@ -127,9 +127,7 @@ static inline void tick_nohz_idle_exit(void) { }
 
 static inline ktime_t tick_nohz_get_sleep_length(void)
 {
-       ktime_t len = { .tv64 = NSEC_PER_SEC/HZ };
-
-       return len;
+       return NSEC_PER_SEC / HZ;
 }
 static inline u64 get_cpu_idle_time_us(int cpu, u64 *unused) { return -1; }
 static inline u64 get_cpu_iowait_time_us(int cpu, u64 *unused) { return -1; }
index 4382035a75bbcdc65d8099a9b3d2d384e31815ff..2496ad4cfc99d14ca609bd1c9c123f9de6d3b2e0 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/types.h>
 
 /* simplify initialization of mask field */
-#define CYCLECOUNTER_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
+#define CYCLECOUNTER_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
 
 /**
  * struct cyclecounter - hardware abstraction for a free running counter
@@ -37,8 +37,8 @@
  * @shift:             cycle to nanosecond divisor (power of two)
  */
 struct cyclecounter {
-       cycle_t (*read)(const struct cyclecounter *cc);
-       cycle_t mask;
+       u64 (*read)(const struct cyclecounter *cc);
+       u64 mask;
        u32 mult;
        u32 shift;
 };
@@ -63,7 +63,7 @@ struct cyclecounter {
  */
 struct timecounter {
        const struct cyclecounter *cc;
-       cycle_t cycle_last;
+       u64 cycle_last;
        u64 nsec;
        u64 mask;
        u64 frac;
@@ -77,7 +77,7 @@ struct timecounter {
  * @frac:      pointer to storage for the fractional nanoseconds.
  */
 static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc,
-                                     cycle_t cycles, u64 mask, u64 *frac)
+                                     u64 cycles, u64 mask, u64 *frac)
 {
        u64 ns = (u64) cycles;
 
@@ -134,6 +134,6 @@ extern u64 timecounter_read(struct timecounter *tc);
  * in the past.
  */
 extern u64 timecounter_cyc2time(struct timecounter *tc,
-                               cycle_t cycle_tstamp);
+                               u64 cycle_tstamp);
 
 #endif
index e88005459035e760cb2c3cf1dc8966a958191ef6..110f4532188c7b6c50cf1ce4dcd5dc525beae9a1 100644 (file)
@@ -29,9 +29,9 @@
  */
 struct tk_read_base {
        struct clocksource      *clock;
-       cycle_t                 (*read)(struct clocksource *cs);
-       cycle_t                 mask;
-       cycle_t                 cycle_last;
+       u64                     (*read)(struct clocksource *cs);
+       u64                     mask;
+       u64                     cycle_last;
        u32                     mult;
        u32                     shift;
        u64                     xtime_nsec;
@@ -97,7 +97,7 @@ struct timekeeper {
        struct timespec64       raw_time;
 
        /* The following members are for timekeeping internal use */
-       cycle_t                 cycle_interval;
+       u64                     cycle_interval;
        u64                     xtime_interval;
        s64                     xtime_remainder;
        u32                     raw_interval;
@@ -136,7 +136,7 @@ extern void update_vsyscall_tz(void);
 
 extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm,
                                struct clocksource *c, u32 mult,
-                               cycle_t cycle_last);
+                               u64 cycle_last);
 extern void update_vsyscall_tz(void);
 
 #else
index 361f8bf1429dfe28e63ad32d12561fab51c9e959..d2e804e15c3e46059b3401bed5dedfec3bd5dc2a 100644 (file)
@@ -293,7 +293,7 @@ extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw,
  * @cs_was_changed_seq:        The sequence number of clocksource change events
  */
 struct system_time_snapshot {
-       cycle_t         cycles;
+       u64             cycles;
        ktime_t         real;
        ktime_t         raw;
        unsigned int    clock_was_set_seq;
@@ -321,7 +321,7 @@ struct system_device_crosststamp {
  *     timekeeping code to verify comparibility of two cycle values
  */
 struct system_counterval_t {
-       cycle_t                 cycles;
+       u64                     cycles;
        struct clocksource      *cs;
 };
 
index d501ad3ba2478c6ef23e01c3449bb129c5b181aa..1e7bd24848fcb54cae26bdd10597f6ea80afd46f 100644 (file)
@@ -228,8 +228,5 @@ struct callback_head {
 typedef void (*rcu_callback_t)(struct rcu_head *head);
 typedef void (*call_rcu_func_t)(struct rcu_head *head, rcu_callback_t func);
 
-/* clocksource cycle base type */
-typedef u64 cycle_t;
-
 #endif /*  __ASSEMBLY__ */
 #endif /* _LINUX_TYPES_H */
index 2408e8d5c05ccbfc50713416f0473a478fa26bc4..1421132e90861be2112fdc22d511395ab933ae50 100644 (file)
@@ -510,7 +510,7 @@ do {                                                                        \
        hrtimer_init_on_stack(&__t.timer, CLOCK_MONOTONIC,              \
                              HRTIMER_MODE_REL);                        \
        hrtimer_init_sleeper(&__t, current);                            \
-       if ((timeout).tv64 != KTIME_MAX)                                \
+       if ((timeout) != KTIME_MAX)                             \
                hrtimer_start_range_ns(&__t.timer, timeout,             \
                                       current->timer_slack_ns,         \
                                       HRTIMER_MODE_REL);               \
index 76e0b5f922c6c475e7f47a73d072282dfec53149..208e718e16b96766a231752e5393d36b2ff76a32 100644 (file)
@@ -207,7 +207,7 @@ static inline void red_set_parms(struct red_parms *p,
 
 static inline int red_is_idling(const struct red_vars *v)
 {
-       return v->qidlestart.tv64 != 0;
+       return v->qidlestart != 0;
 }
 
 static inline void red_start_of_idle_period(struct red_vars *v)
@@ -217,7 +217,7 @@ static inline void red_start_of_idle_period(struct red_vars *v)
 
 static inline void red_end_of_idle_period(struct red_vars *v)
 {
-       v->qidlestart.tv64 = 0;
+       v->qidlestart = 0;
 }
 
 static inline void red_restart(struct red_vars *v)
index 282d065e286b7e2a49a6170343fe71309780e952..f0e867f58722f344494c98cbdbe49d7ec875099a 100644 (file)
@@ -2193,8 +2193,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
         */
        if (sock_flag(sk, SOCK_RCVTSTAMP) ||
            (sk->sk_tsflags & SOF_TIMESTAMPING_RX_SOFTWARE) ||
-           (kt.tv64 && sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE) ||
-           (hwtstamps->hwtstamp.tv64 &&
+           (kt && sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE) ||
+           (hwtstamps->hwtstamp &&
             (sk->sk_tsflags & SOF_TIMESTAMPING_RAW_HARDWARE)))
                __sock_recv_timestamp(msg, sk, skb);
        else
index a1c108c16c9cf995fd5dd48a81e2b1569af60773..ae4f358dd8e924831088bb05bceeb12c06b2d61c 100644 (file)
@@ -31,7 +31,7 @@ TRACE_EVENT(alarmtimer_suspend,
        ),
 
        TP_fast_assign(
-               __entry->expires = expires.tv64;
+               __entry->expires = expires;
                __entry->alarm_type = flag;
        ),
 
@@ -57,8 +57,8 @@ DECLARE_EVENT_CLASS(alarm_class,
        TP_fast_assign(
                __entry->alarm = alarm;
                __entry->alarm_type = alarm->type;
-               __entry->expires = alarm->node.expires.tv64;
-               __entry->now = now.tv64;
+               __entry->expires = alarm->node.expires;
+               __entry->now = now;
        ),
 
        TP_printk("alarmtimer:%p type:%s expires:%llu now:%llu",
index 28c5da6fdfac762e64f3d7ae26edcc9adbefe9ab..1448637616d648475d5ccd28945df6fce617bca0 100644 (file)
@@ -177,16 +177,14 @@ TRACE_EVENT(hrtimer_start,
        TP_fast_assign(
                __entry->hrtimer        = hrtimer;
                __entry->function       = hrtimer->function;
-               __entry->expires        = hrtimer_get_expires(hrtimer).tv64;
-               __entry->softexpires    = hrtimer_get_softexpires(hrtimer).tv64;
+               __entry->expires        = hrtimer_get_expires(hrtimer);
+               __entry->softexpires    = hrtimer_get_softexpires(hrtimer);
        ),
 
        TP_printk("hrtimer=%p function=%pf expires=%llu softexpires=%llu",
                  __entry->hrtimer, __entry->function,
-                 (unsigned long long)ktime_to_ns((ktime_t) {
-                                 .tv64 = __entry->expires }),
-                 (unsigned long long)ktime_to_ns((ktime_t) {
-                                 .tv64 = __entry->softexpires }))
+                 (unsigned long long) __entry->expires,
+                 (unsigned long long) __entry->softexpires)
 );
 
 /**
@@ -211,13 +209,13 @@ TRACE_EVENT(hrtimer_expire_entry,
 
        TP_fast_assign(
                __entry->hrtimer        = hrtimer;
-               __entry->now            = now->tv64;
+               __entry->now            = *now;
                __entry->function       = hrtimer->function;
        ),
 
        TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function,
-                 (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now }))
- );
+                 (unsigned long long) __entry->now)
+);
 
 DECLARE_EVENT_CLASS(hrtimer_class,
 
index 9246d9f593d16c11cdfbb8630286b5f6d5f9e1fa..0842c8ca534b6c7760b254163d88f58cb1229b12 100644 (file)
@@ -2459,7 +2459,7 @@ retry:
        restart->fn = futex_wait_restart;
        restart->futex.uaddr = uaddr;
        restart->futex.val = val;
-       restart->futex.time = abs_time->tv64;
+       restart->futex.time = *abs_time;
        restart->futex.bitset = bitset;
        restart->futex.flags = flags | FLAGS_HAS_TIMEOUT;
 
@@ -2480,7 +2480,7 @@ static long futex_wait_restart(struct restart_block *restart)
        ktime_t t, *tp = NULL;
 
        if (restart->futex.flags & FLAGS_HAS_TIMEOUT) {
-               t.tv64 = restart->futex.time;
+               t = restart->futex.time;
                tp = &t;
        }
        restart->fn = do_no_restart_syscall;
index 966556ebdbb3fd68c272c8bc1cbffde252d4de45..c56fb57f2991ef4f2a68395c534b32d3053ae208 100644 (file)
@@ -1456,7 +1456,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
                 * yield - it could be a while.
                 */
                if (unlikely(queued)) {
-                       ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ);
+                       ktime_t to = NSEC_PER_SEC / HZ;
 
                        set_current_state(TASK_UNINTERRUPTIBLE);
                        schedule_hrtimeout(&to, HRTIMER_MODE_REL);
index f5d4e275345ecb9abb9dde84f17857c5f050e1f1..ff046b73ff2d309ce00fbd3bd8949a8f6f5fd297 100644 (file)
@@ -587,7 +587,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
                        struct hrtimer *tmr = &tsk->signal->real_timer;
 
                        if (!hrtimer_is_queued(tmr) &&
-                           tsk->signal->it_real_incr.tv64 != 0) {
+                           tsk->signal->it_real_incr != 0) {
                                hrtimer_forward(tmr, tmr->base->get_time(),
                                                tsk->signal->it_real_incr);
                                hrtimer_restart(tmr);
@@ -2766,7 +2766,7 @@ int copy_siginfo_to_user(siginfo_t __user *to, const siginfo_t *from)
 int do_sigtimedwait(const sigset_t *which, siginfo_t *info,
                    const struct timespec *ts)
 {
-       ktime_t *to = NULL, timeout = { .tv64 = KTIME_MAX };
+       ktime_t *to = NULL, timeout = KTIME_MAX;
        struct task_struct *tsk = current;
        sigset_t mask = *which;
        int sig, ret = 0;
@@ -2786,7 +2786,7 @@ int do_sigtimedwait(const sigset_t *which, siginfo_t *info,
 
        spin_lock_irq(&tsk->sighand->siglock);
        sig = dequeue_signal(tsk, &mask, info);
-       if (!sig && timeout.tv64) {
+       if (!sig && timeout) {
                /*
                 * None ready, temporarily unblock those we're interested
                 * while we are sleeping in so that we'll be awakened when
index 3921cf7fea8e1fe7c656a7afbaae4f83b50e3a76..e6dc9a538efa21163186e7292a6c312b6a7bc82a 100644 (file)
@@ -234,7 +234,7 @@ static int alarmtimer_suspend(struct device *dev)
        min = freezer_delta;
        expires = freezer_expires;
        type = freezer_alarmtype;
-       freezer_delta = ktime_set(0, 0);
+       freezer_delta = 0;
        spin_unlock_irqrestore(&freezer_delta_lock, flags);
 
        rtc = alarmtimer_get_rtcdev();
@@ -254,13 +254,13 @@ static int alarmtimer_suspend(struct device *dev)
                if (!next)
                        continue;
                delta = ktime_sub(next->expires, base->gettime());
-               if (!min.tv64 || (delta.tv64 < min.tv64)) {
+               if (!min || (delta < min)) {
                        expires = next->expires;
                        min = delta;
                        type = i;
                }
        }
-       if (min.tv64 == 0)
+       if (min == 0)
                return 0;
 
        if (ktime_to_ns(min) < 2 * NSEC_PER_SEC) {
@@ -277,7 +277,7 @@ static int alarmtimer_suspend(struct device *dev)
        now = ktime_add(now, min);
 
        /* Set alarm, if in the past reject suspend briefly to handle */
-       ret = rtc_timer_start(rtc, &rtctimer, now, ktime_set(0, 0));
+       ret = rtc_timer_start(rtc, &rtctimer, now, 0);
        if (ret < 0)
                __pm_wakeup_event(ws, MSEC_PER_SEC);
        return ret;
@@ -328,7 +328,7 @@ static void alarmtimer_freezerset(ktime_t absexp, enum alarmtimer_type type)
        delta = ktime_sub(absexp, base->gettime());
 
        spin_lock_irqsave(&freezer_delta_lock, flags);
-       if (!freezer_delta.tv64 || (delta.tv64 < freezer_delta.tv64)) {
+       if (!freezer_delta || (delta < freezer_delta)) {
                freezer_delta = delta;
                freezer_expires = absexp;
                freezer_alarmtype = type;
@@ -453,10 +453,10 @@ u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval)
 
        delta = ktime_sub(now, alarm->node.expires);
 
-       if (delta.tv64 < 0)
+       if (delta < 0)
                return 0;
 
-       if (unlikely(delta.tv64 >= interval.tv64)) {
+       if (unlikely(delta >= interval)) {
                s64 incr = ktime_to_ns(interval);
 
                overrun = ktime_divns(delta, incr);
@@ -464,7 +464,7 @@ u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval)
                alarm->node.expires = ktime_add_ns(alarm->node.expires,
                                                        incr*overrun);
 
-               if (alarm->node.expires.tv64 > now.tv64)
+               if (alarm->node.expires > now)
                        return overrun;
                /*
                 * This (and the ktime_add() below) is the
@@ -522,7 +522,7 @@ static enum alarmtimer_restart alarm_handle_timer(struct alarm *alarm,
        }
 
        /* Re-add periodic timers */
-       if (ptr->it.alarm.interval.tv64) {
+       if (ptr->it.alarm.interval) {
                ptr->it_overrun += alarm_forward(alarm, now,
                                                ptr->it.alarm.interval);
                result = ALARMTIMER_RESTART;
@@ -730,7 +730,7 @@ static int update_rmtp(ktime_t exp, enum  alarmtimer_type type,
 
        rem = ktime_sub(exp, alarm_bases[type].gettime());
 
-       if (rem.tv64 <= 0)
+       if (rem <= 0)
                return 0;
        rmt = ktime_to_timespec(rem);
 
@@ -755,7 +755,7 @@ static long __sched alarm_timer_nsleep_restart(struct restart_block *restart)
        struct alarm alarm;
        int ret = 0;
 
-       exp.tv64 = restart->nanosleep.expires;
+       exp = restart->nanosleep.expires;
        alarm_init(&alarm, type, alarmtimer_nsleep_wakeup);
 
        if (alarmtimer_do_nsleep(&alarm, exp))
@@ -835,7 +835,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags,
        restart = &current->restart_block;
        restart->fn = alarm_timer_nsleep_restart;
        restart->nanosleep.clockid = type;
-       restart->nanosleep.expires = exp.tv64;
+       restart->nanosleep.expires = exp;
        restart->nanosleep.rmtp = rmtp;
        ret = -ERESTART_RESTARTBLOCK;
 
index 2c5bc77c0bb004fa5b9bd5e9ca60f60b40ba1b4f..97ac0951f164a386ca7199195607a1af90ed14ea 100644 (file)
@@ -179,7 +179,7 @@ void clockevents_switch_state(struct clock_event_device *dev,
 void clockevents_shutdown(struct clock_event_device *dev)
 {
        clockevents_switch_state(dev, CLOCK_EVT_STATE_SHUTDOWN);
-       dev->next_event.tv64 = KTIME_MAX;
+       dev->next_event = KTIME_MAX;
 }
 
 /**
@@ -213,7 +213,7 @@ static int clockevents_increase_min_delta(struct clock_event_device *dev)
        if (dev->min_delta_ns >= MIN_DELTA_LIMIT) {
                printk_deferred(KERN_WARNING
                                "CE: Reprogramming failure. Giving up\n");
-               dev->next_event.tv64 = KTIME_MAX;
+               dev->next_event = KTIME_MAX;
                return -ETIME;
        }
 
@@ -310,7 +310,7 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires,
        int64_t delta;
        int rc;
 
-       if (unlikely(expires.tv64 < 0)) {
+       if (unlikely(expires < 0)) {
                WARN_ON_ONCE(1);
                return -ETIME;
        }
index 150242ccfcd201a14e633357589d4c4f3327207e..665985b0a89afe88486fed0e2571771bdd4d94b5 100644 (file)
@@ -170,7 +170,7 @@ void clocksource_mark_unstable(struct clocksource *cs)
 static void clocksource_watchdog(unsigned long data)
 {
        struct clocksource *cs;
-       cycle_t csnow, wdnow, cslast, wdlast, delta;
+       u64 csnow, wdnow, cslast, wdlast, delta;
        int64_t wd_nsec, cs_nsec;
        int next_cpu, reset_pending;
 
index 161e340395d539a13048152fe9a213bd94010057..c6ecedd3b8393d4b3f4fc3b5cce41ebbffd375cd 100644 (file)
@@ -171,7 +171,7 @@ hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base)
                return 0;
 
        expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset);
-       return expires.tv64 <= new_base->cpu_base->expires_next.tv64;
+       return expires <= new_base->cpu_base->expires_next;
 #else
        return 0;
 #endif
@@ -313,7 +313,7 @@ ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs)
         * We use KTIME_SEC_MAX here, the maximum timeout which we can
         * return to user space in a timespec:
         */
-       if (res.tv64 < 0 || res.tv64 < lhs.tv64 || res.tv64 < rhs.tv64)
+       if (res < 0 || res < lhs || res < rhs)
                res = ktime_set(KTIME_SEC_MAX, 0);
 
        return res;
@@ -465,8 +465,8 @@ static inline void hrtimer_update_next_timer(struct hrtimer_cpu_base *cpu_base,
 static ktime_t __hrtimer_get_next_event(struct hrtimer_cpu_base *cpu_base)
 {
        struct hrtimer_clock_base *base = cpu_base->clock_base;
-       ktime_t expires, expires_next = { .tv64 = KTIME_MAX };
        unsigned int active = cpu_base->active_bases;
+       ktime_t expires, expires_next = KTIME_MAX;
 
        hrtimer_update_next_timer(cpu_base, NULL);
        for (; active; base++, active >>= 1) {
@@ -479,7 +479,7 @@ static ktime_t __hrtimer_get_next_event(struct hrtimer_cpu_base *cpu_base)
                next = timerqueue_getnext(&base->active);
                timer = container_of(next, struct hrtimer, node);
                expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
-               if (expires.tv64 < expires_next.tv64) {
+               if (expires < expires_next) {
                        expires_next = expires;
                        hrtimer_update_next_timer(cpu_base, timer);
                }
@@ -489,8 +489,8 @@ static ktime_t __hrtimer_get_next_event(struct hrtimer_cpu_base *cpu_base)
         * the clock bases so the result might be negative. Fix it up
         * to prevent a false positive in clockevents_program_event().
         */
-       if (expires_next.tv64 < 0)
-               expires_next.tv64 = 0;
+       if (expires_next < 0)
+               expires_next = 0;
        return expires_next;
 }
 #endif
@@ -561,10 +561,10 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
 
        expires_next = __hrtimer_get_next_event(cpu_base);
 
-       if (skip_equal && expires_next.tv64 == cpu_base->expires_next.tv64)
+       if (skip_equal && expires_next == cpu_base->expires_next)
                return;
 
-       cpu_base->expires_next.tv64 = expires_next.tv64;
+       cpu_base->expires_next = expires_next;
 
        /*
         * If a hang was detected in the last timer interrupt then we
@@ -622,10 +622,10 @@ static void hrtimer_reprogram(struct hrtimer *timer,
         * CLOCK_REALTIME timer might be requested with an absolute
         * expiry time which is less than base->offset. Set it to 0.
         */
-       if (expires.tv64 < 0)
-               expires.tv64 = 0;
+       if (expires < 0)
+               expires = 0;
 
-       if (expires.tv64 >= cpu_base->expires_next.tv64)
+       if (expires >= cpu_base->expires_next)
                return;
 
        /* Update the pointer to the next expiring timer */
@@ -653,7 +653,7 @@ static void hrtimer_reprogram(struct hrtimer *timer,
  */
 static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base)
 {
-       base->expires_next.tv64 = KTIME_MAX;
+       base->expires_next = KTIME_MAX;
        base->hres_active = 0;
 }
 
@@ -827,21 +827,21 @@ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
 
        delta = ktime_sub(now, hrtimer_get_expires(timer));
 
-       if (delta.tv64 < 0)
+       if (delta < 0)
                return 0;
 
        if (WARN_ON(timer->state & HRTIMER_STATE_ENQUEUED))
                return 0;
 
-       if (interval.tv64 < hrtimer_resolution)
-               interval.tv64 = hrtimer_resolution;
+       if (interval < hrtimer_resolution)
+               interval = hrtimer_resolution;
 
-       if (unlikely(delta.tv64 >= interval.tv64)) {
+       if (unlikely(delta >= interval)) {
                s64 incr = ktime_to_ns(interval);
 
                orun = ktime_divns(delta, incr);
                hrtimer_add_expires_ns(timer, incr * orun);
-               if (hrtimer_get_expires_tv64(timer) > now.tv64)
+               if (hrtimer_get_expires_tv64(timer) > now)
                        return orun;
                /*
                 * This (and the ktime_add() below) is the
@@ -955,7 +955,7 @@ static inline ktime_t hrtimer_update_lowres(struct hrtimer *timer, ktime_t tim,
         */
        timer->is_rel = mode & HRTIMER_MODE_REL;
        if (timer->is_rel)
-               tim = ktime_add_safe(tim, ktime_set(0, hrtimer_resolution));
+               tim = ktime_add_safe(tim, hrtimer_resolution);
 #endif
        return tim;
 }
@@ -1104,7 +1104,7 @@ u64 hrtimer_get_next_event(void)
        raw_spin_lock_irqsave(&cpu_base->lock, flags);
 
        if (!__hrtimer_hres_active(cpu_base))
-               expires = __hrtimer_get_next_event(cpu_base).tv64;
+               expires = __hrtimer_get_next_event(cpu_base);
 
        raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
 
@@ -1296,7 +1296,7 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now)
                         * are right-of a not yet expired timer, because that
                         * timer will have to trigger a wakeup anyway.
                         */
-                       if (basenow.tv64 < hrtimer_get_softexpires_tv64(timer))
+                       if (basenow < hrtimer_get_softexpires_tv64(timer))
                                break;
 
                        __run_hrtimer(cpu_base, base, timer, &basenow);
@@ -1318,7 +1318,7 @@ void hrtimer_interrupt(struct clock_event_device *dev)
 
        BUG_ON(!cpu_base->hres_active);
        cpu_base->nr_events++;
-       dev->next_event.tv64 = KTIME_MAX;
+       dev->next_event = KTIME_MAX;
 
        raw_spin_lock(&cpu_base->lock);
        entry_time = now = hrtimer_update_base(cpu_base);
@@ -1331,7 +1331,7 @@ retry:
         * timers which run their callback and need to be requeued on
         * this CPU.
         */
-       cpu_base->expires_next.tv64 = KTIME_MAX;
+       cpu_base->expires_next = KTIME_MAX;
 
        __hrtimer_run_queues(cpu_base, now);
 
@@ -1379,13 +1379,13 @@ retry:
        cpu_base->hang_detected = 1;
        raw_spin_unlock(&cpu_base->lock);
        delta = ktime_sub(now, entry_time);
-       if ((unsigned int)delta.tv64 > cpu_base->max_hang_time)
-               cpu_base->max_hang_time = (unsigned int) delta.tv64;
+       if ((unsigned int)delta > cpu_base->max_hang_time)
+               cpu_base->max_hang_time = (unsigned int) delta;
        /*
         * Limit it to a sensible value as we enforce a longer
         * delay. Give the CPU at least 100ms to catch up.
         */
-       if (delta.tv64 > 100 * NSEC_PER_MSEC)
+       if (delta > 100 * NSEC_PER_MSEC)
                expires_next = ktime_add_ns(now, 100 * NSEC_PER_MSEC);
        else
                expires_next = ktime_add(now, delta);
@@ -1495,7 +1495,7 @@ static int update_rmtp(struct hrtimer *timer, struct timespec __user *rmtp)
        ktime_t rem;
 
        rem = hrtimer_expires_remaining(timer);
-       if (rem.tv64 <= 0)
+       if (rem <= 0)
                return 0;
        rmt = ktime_to_timespec(rem);
 
@@ -1693,7 +1693,7 @@ schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta,
         * Optimize when a zero timeout value is given. It does not
         * matter whether this is an absolute or a relative time.
         */
-       if (expires && !expires->tv64) {
+       if (expires && *expires == 0) {
                __set_current_state(TASK_RUNNING);
                return 0;
        }
index a45afb7277c2cf59795f3a963b1bbf099c433d13..8c89143f9ebf19fb96ac47b9c22be08fbafdc583 100644 (file)
@@ -34,10 +34,10 @@ static struct timeval itimer_get_remtime(struct hrtimer *timer)
         * then we return 0 - which is correct.
         */
        if (hrtimer_active(timer)) {
-               if (rem.tv64 <= 0)
-                       rem.tv64 = NSEC_PER_USEC;
+               if (rem <= 0)
+                       rem = NSEC_PER_USEC;
        } else
-               rem.tv64 = 0;
+               rem = 0;
 
        return ktime_to_timeval(rem);
 }
@@ -216,12 +216,12 @@ again:
                        goto again;
                }
                expires = timeval_to_ktime(value->it_value);
-               if (expires.tv64 != 0) {
+               if (expires != 0) {
                        tsk->signal->it_real_incr =
                                timeval_to_ktime(value->it_interval);
                        hrtimer_start(timer, expires, HRTIMER_MODE_REL);
                } else
-                       tsk->signal->it_real_incr.tv64 = 0;
+                       tsk->signal->it_real_incr = 0;
 
                trace_itimer_state(ITIMER_REAL, value, 0);
                spin_unlock_irq(&tsk->sighand->siglock);
index 555e21f7b966c789f48ee4aa5fece85cc7db6768..a4a0e478e44d16208d4333248995bbac610fc75b 100644 (file)
@@ -59,9 +59,9 @@
 #define JIFFIES_SHIFT  8
 #endif
 
-static cycle_t jiffies_read(struct clocksource *cs)
+static u64 jiffies_read(struct clocksource *cs)
 {
-       return (cycle_t) jiffies;
+       return (u64) jiffies;
 }
 
 static struct clocksource clocksource_jiffies = {
index 6df8927c58a5bbedcab9efceac7c21985bec0bf0..edf19cc5314043590b988c9b3081c82a9fa60f01 100644 (file)
@@ -381,7 +381,7 @@ ktime_t ntp_get_next_leap(void)
 
        if ((time_state == TIME_INS) && (time_status & STA_INS))
                return ktime_set(ntp_next_leap_sec, 0);
-       ret.tv64 = KTIME_MAX;
+       ret = KTIME_MAX;
        return ret;
 }
 
index 42d7b9558741336ef9abfce229f24b17e3ed46ad..1e6623d7675019ae9c1dcc3dc273c03d761d5931 100644 (file)
@@ -359,7 +359,7 @@ static void schedule_next_timer(struct k_itimer *timr)
 {
        struct hrtimer *timer = &timr->it.real.timer;
 
-       if (timr->it.real.interval.tv64 == 0)
+       if (timr->it.real.interval == 0)
                return;
 
        timr->it_overrun += (unsigned int) hrtimer_forward(timer,
@@ -449,7 +449,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
        timr = container_of(timer, struct k_itimer, it.real.timer);
        spin_lock_irqsave(&timr->it_lock, flags);
 
-       if (timr->it.real.interval.tv64 != 0)
+       if (timr->it.real.interval != 0)
                si_private = ++timr->it_requeue_pending;
 
        if (posix_timer_event(timr, si_private)) {
@@ -458,7 +458,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
                 * we will not get a call back to restart it AND
                 * it should be restarted.
                 */
-               if (timr->it.real.interval.tv64 != 0) {
+               if (timr->it.real.interval != 0) {
                        ktime_t now = hrtimer_cb_get_time(timer);
 
                        /*
@@ -485,9 +485,9 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
                         */
 #ifdef CONFIG_HIGH_RES_TIMERS
                        {
-                               ktime_t kj = ktime_set(0, NSEC_PER_SEC / HZ);
+                               ktime_t kj = NSEC_PER_SEC / HZ;
 
-                               if (timr->it.real.interval.tv64 < kj.tv64)
+                               if (timr->it.real.interval < kj)
                                        now = ktime_add(now, kj);
                        }
 #endif
@@ -743,7 +743,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
        iv = timr->it.real.interval;
 
        /* interval timer ? */
-       if (iv.tv64)
+       if (iv)
                cur_setting->it_interval = ktime_to_timespec(iv);
        else if (!hrtimer_active(timer) &&
                 (timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE)
@@ -756,13 +756,13 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
         * timer move the expiry time forward by intervals, so
         * expiry is > now.
         */
-       if (iv.tv64 && (timr->it_requeue_pending & REQUEUE_PENDING ||
-           (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
+       if (iv && (timr->it_requeue_pending & REQUEUE_PENDING ||
+                  (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
                timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv);
 
        remaining = __hrtimer_expires_remaining_adjusted(timer, now);
        /* Return 0 only, when the timer is expired and not pending */
-       if (remaining.tv64 <= 0) {
+       if (remaining <= 0) {
                /*
                 * A single shot SIGEV_NONE timer must return 0, when
                 * it is expired !
@@ -839,7 +839,7 @@ common_timer_set(struct k_itimer *timr, int flags,
                common_timer_get(timr, old_setting);
 
        /* disable the timer */
-       timr->it.real.interval.tv64 = 0;
+       timr->it.real.interval = 0;
        /*
         * careful here.  If smp we could be in the "fire" routine which will
         * be spinning as we hold the lock.  But this is ONLY an SMP issue.
@@ -924,7 +924,7 @@ retry:
 
 static int common_timer_del(struct k_itimer *timer)
 {
-       timer->it.real.interval.tv64 = 0;
+       timer->it.real.interval = 0;
 
        if (hrtimer_try_to_cancel(&timer->it.real.timer) < 0)
                return TIMER_RETRY;
index 690b797f522e38945ec021cfabe799568448cd7a..a7bb8f33ae0703b2d0ebd1e65954f433c85dbde2 100644 (file)
@@ -97,7 +97,7 @@ static enum hrtimer_restart bc_handler(struct hrtimer *t)
        ce_broadcast_hrtimer.event_handler(&ce_broadcast_hrtimer);
 
        if (clockevent_state_oneshot(&ce_broadcast_hrtimer))
-               if (ce_broadcast_hrtimer.next_event.tv64 != KTIME_MAX)
+               if (ce_broadcast_hrtimer.next_event != KTIME_MAX)
                        return HRTIMER_RESTART;
 
        return HRTIMER_NORESTART;
index d2a20e83ebaed372ddb68d00bd8f44a50989b804..3109204c87cca83704d10326f8b179671577f3d6 100644 (file)
@@ -604,14 +604,14 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
        bool bc_local;
 
        raw_spin_lock(&tick_broadcast_lock);
-       dev->next_event.tv64 = KTIME_MAX;
-       next_event.tv64 = KTIME_MAX;
+       dev->next_event = KTIME_MAX;
+       next_event = KTIME_MAX;
        cpumask_clear(tmpmask);
        now = ktime_get();
        /* Find all expired events */
        for_each_cpu(cpu, tick_broadcast_oneshot_mask) {
                td = &per_cpu(tick_cpu_device, cpu);
-               if (td->evtdev->next_event.tv64 <= now.tv64) {
+               if (td->evtdev->next_event <= now) {
                        cpumask_set_cpu(cpu, tmpmask);
                        /*
                         * Mark the remote cpu in the pending mask, so
@@ -619,8 +619,8 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
                         * timer in tick_broadcast_oneshot_control().
                         */
                        cpumask_set_cpu(cpu, tick_broadcast_pending_mask);
-               } else if (td->evtdev->next_event.tv64 < next_event.tv64) {
-                       next_event.tv64 = td->evtdev->next_event.tv64;
+               } else if (td->evtdev->next_event < next_event) {
+                       next_event = td->evtdev->next_event;
                        next_cpu = cpu;
                }
        }
@@ -657,7 +657,7 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
         * - There are pending events on sleeping CPUs which were not
         * in the event mask
         */
-       if (next_event.tv64 != KTIME_MAX)
+       if (next_event != KTIME_MAX)
                tick_broadcast_set_event(dev, next_cpu, next_event);
 
        raw_spin_unlock(&tick_broadcast_lock);
@@ -672,7 +672,7 @@ static int broadcast_needs_cpu(struct clock_event_device *bc, int cpu)
 {
        if (!(bc->features & CLOCK_EVT_FEAT_HRTIMER))
                return 0;
-       if (bc->next_event.tv64 == KTIME_MAX)
+       if (bc->next_event == KTIME_MAX)
                return 0;
        return bc->bound_on == cpu ? -EBUSY : 0;
 }
@@ -688,7 +688,7 @@ static void broadcast_shutdown_local(struct clock_event_device *bc,
        if (bc->features & CLOCK_EVT_FEAT_HRTIMER) {
                if (broadcast_needs_cpu(bc, smp_processor_id()))
                        return;
-               if (dev->next_event.tv64 < bc->next_event.tv64)
+               if (dev->next_event < bc->next_event)
                        return;
        }
        clockevents_switch_state(dev, CLOCK_EVT_STATE_SHUTDOWN);
@@ -754,7 +754,7 @@ int __tick_broadcast_oneshot_control(enum tick_broadcast_state state)
                         */
                        if (cpumask_test_cpu(cpu, tick_broadcast_force_mask)) {
                                ret = -EBUSY;
-                       } else if (dev->next_event.tv64 < bc->next_event.tv64) {
+                       } else if (dev->next_event < bc->next_event) {
                                tick_broadcast_set_event(bc, cpu, dev->next_event);
                                /*
                                 * In case of hrtimer broadcasts the
@@ -789,7 +789,7 @@ int __tick_broadcast_oneshot_control(enum tick_broadcast_state state)
                        /*
                         * Bail out if there is no next event.
                         */
-                       if (dev->next_event.tv64 == KTIME_MAX)
+                       if (dev->next_event == KTIME_MAX)
                                goto out;
                        /*
                         * If the pending bit is not set, then we are
@@ -824,7 +824,7 @@ int __tick_broadcast_oneshot_control(enum tick_broadcast_state state)
                         * nohz fixups.
                         */
                        now = ktime_get();
-                       if (dev->next_event.tv64 <= now.tv64) {
+                       if (dev->next_event <= now) {
                                cpumask_set_cpu(cpu, tick_broadcast_force_mask);
                                goto out;
                        }
@@ -897,7 +897,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
                                                       tick_next_period);
                        tick_broadcast_set_event(bc, cpu, tick_next_period);
                } else
-                       bc->next_event.tv64 = KTIME_MAX;
+                       bc->next_event = KTIME_MAX;
        } else {
                /*
                 * The first cpu which switches to oneshot mode sets
index 4fcd99e12aa01ce3ce0fa24fb219d644a68417a3..49edc1c4f3e645894f839c40489ab81594a02398 100644 (file)
@@ -178,8 +178,8 @@ static void tick_setup_device(struct tick_device *td,
                              struct clock_event_device *newdev, int cpu,
                              const struct cpumask *cpumask)
 {
-       ktime_t next_event;
        void (*handler)(struct clock_event_device *) = NULL;
+       ktime_t next_event = 0;
 
        /*
         * First device setup ?
@@ -195,7 +195,7 @@ static void tick_setup_device(struct tick_device *td,
                        else
                                tick_do_timer_cpu = TICK_DO_TIMER_NONE;
                        tick_next_period = ktime_get();
-                       tick_period = ktime_set(0, NSEC_PER_SEC / HZ);
+                       tick_period = NSEC_PER_SEC / HZ;
                }
 
                /*
index b51344652330a2b12ebb4e72875515a791a8270f..6b009c2076718f284b455ea2b6c084b208a57e53 100644 (file)
@@ -28,7 +28,7 @@ int tick_program_event(ktime_t expires, int force)
 {
        struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev);
 
-       if (unlikely(expires.tv64 == KTIME_MAX)) {
+       if (unlikely(expires == KTIME_MAX)) {
                /*
                 * We don't need the clock event device any more, stop it.
                 */
index 71496a20e67015d9cd3d57da393c97384c048bba..2c115fdab39765f4ecbeaade9fa74008e711d08a 100644 (file)
@@ -58,21 +58,21 @@ static void tick_do_update_jiffies64(ktime_t now)
         * Do a quick check without holding jiffies_lock:
         */
        delta = ktime_sub(now, last_jiffies_update);
-       if (delta.tv64 < tick_period.tv64)
+       if (delta < tick_period)
                return;
 
        /* Reevaluate with jiffies_lock held */
        write_seqlock(&jiffies_lock);
 
        delta = ktime_sub(now, last_jiffies_update);
-       if (delta.tv64 >= tick_period.tv64) {
+       if (delta >= tick_period) {
 
                delta = ktime_sub(delta, tick_period);
                last_jiffies_update = ktime_add(last_jiffies_update,
                                                tick_period);
 
                /* Slow path for long timeouts */
-               if (unlikely(delta.tv64 >= tick_period.tv64)) {
+               if (unlikely(delta >= tick_period)) {
                        s64 incr = ktime_to_ns(tick_period);
 
                        ticks = ktime_divns(delta, incr);
@@ -101,7 +101,7 @@ static ktime_t tick_init_jiffy_update(void)
 
        write_seqlock(&jiffies_lock);
        /* Did we start the jiffies update yet ? */
-       if (last_jiffies_update.tv64 == 0)
+       if (last_jiffies_update == 0)
                last_jiffies_update = tick_next_period;
        period = last_jiffies_update;
        write_sequnlock(&jiffies_lock);
@@ -669,7 +669,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
        /* Read jiffies and the time when jiffies were updated last */
        do {
                seq = read_seqbegin(&jiffies_lock);
-               basemono = last_jiffies_update.tv64;
+               basemono = last_jiffies_update;
                basejiff = jiffies;
        } while (read_seqretry(&jiffies_lock, seq));
        ts->last_jiffies = basejiff;
@@ -697,7 +697,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
         */
        delta = next_tick - basemono;
        if (delta <= (u64)TICK_NSEC) {
-               tick.tv64 = 0;
+               tick = 0;
 
                /*
                 * Tell the timer code that the base is not idle, i.e. undo
@@ -764,10 +764,10 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
                expires = KTIME_MAX;
 
        expires = min_t(u64, expires, next_tick);
-       tick.tv64 = expires;
+       tick = expires;
 
        /* Skip reprogram of event if its not changed */
-       if (ts->tick_stopped && (expires == dev->next_event.tv64))
+       if (ts->tick_stopped && (expires == dev->next_event))
                goto out;
 
        /*
@@ -864,7 +864,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
        }
 
        if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) {
-               ts->sleep_length = (ktime_t) { .tv64 = NSEC_PER_SEC/HZ };
+               ts->sleep_length = NSEC_PER_SEC / HZ;
                return false;
        }
 
@@ -914,7 +914,7 @@ static void __tick_nohz_idle_enter(struct tick_sched *ts)
                ts->idle_calls++;
 
                expires = tick_nohz_stop_sched_tick(ts, now, cpu);
-               if (expires.tv64 > 0LL) {
+               if (expires > 0LL) {
                        ts->idle_sleeps++;
                        ts->idle_expires = expires;
                }
@@ -1051,7 +1051,7 @@ static void tick_nohz_handler(struct clock_event_device *dev)
        struct pt_regs *regs = get_irq_regs();
        ktime_t now = ktime_get();
 
-       dev->next_event.tv64 = KTIME_MAX;
+       dev->next_event = KTIME_MAX;
 
        tick_sched_do_timer(now);
        tick_sched_handle(ts, regs);
index 4687b3104baec19d578bf7d6aa3c06322dbea9f9..8afd78932bdf145d5609ed12494c72b924c351cd 100644 (file)
@@ -43,7 +43,7 @@ EXPORT_SYMBOL_GPL(timecounter_init);
  */
 static u64 timecounter_read_delta(struct timecounter *tc)
 {
-       cycle_t cycle_now, cycle_delta;
+       u64 cycle_now, cycle_delta;
        u64 ns_offset;
 
        /* read cycle counter: */
@@ -80,7 +80,7 @@ EXPORT_SYMBOL_GPL(timecounter_read);
  * time previous to the time stored in the cycle counter.
  */
 static u64 cc_cyc2ns_backwards(const struct cyclecounter *cc,
-                              cycle_t cycles, u64 mask, u64 frac)
+                              u64 cycles, u64 mask, u64 frac)
 {
        u64 ns = (u64) cycles;
 
@@ -90,7 +90,7 @@ static u64 cc_cyc2ns_backwards(const struct cyclecounter *cc,
 }
 
 u64 timecounter_cyc2time(struct timecounter *tc,
-                        cycle_t cycle_tstamp)
+                        u64 cycle_tstamp)
 {
        u64 delta = (cycle_tstamp - tc->cycle_last) & tc->cc->mask;
        u64 nsec = tc->nsec, frac = tc->frac;
index da233cdf89b0447efe2bce0a4a53ce87f87acb8c..db087d7e106d25f8c542f3252443d260d5618169 100644 (file)
@@ -104,7 +104,7 @@ static void tk_set_wall_to_mono(struct timekeeper *tk, struct timespec64 wtm)
         */
        set_normalized_timespec64(&tmp, -tk->wall_to_monotonic.tv_sec,
                                        -tk->wall_to_monotonic.tv_nsec);
-       WARN_ON_ONCE(tk->offs_real.tv64 != timespec64_to_ktime(tmp).tv64);
+       WARN_ON_ONCE(tk->offs_real != timespec64_to_ktime(tmp));
        tk->wall_to_monotonic = wtm;
        set_normalized_timespec64(&tmp, -wtm.tv_sec, -wtm.tv_nsec);
        tk->offs_real = timespec64_to_ktime(tmp);
@@ -119,10 +119,10 @@ static inline void tk_update_sleep_time(struct timekeeper *tk, ktime_t delta)
 #ifdef CONFIG_DEBUG_TIMEKEEPING
 #define WARNING_FREQ (HZ*300) /* 5 minute rate-limiting */
 
-static void timekeeping_check_update(struct timekeeper *tk, cycle_t offset)
+static void timekeeping_check_update(struct timekeeper *tk, u64 offset)
 {
 
-       cycle_t max_cycles = tk->tkr_mono.clock->max_cycles;
+       u64 max_cycles = tk->tkr_mono.clock->max_cycles;
        const char *name = tk->tkr_mono.clock->name;
 
        if (offset > max_cycles) {
@@ -158,10 +158,10 @@ static void timekeeping_check_update(struct timekeeper *tk, cycle_t offset)
        }
 }
 
-static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
+static inline u64 timekeeping_get_delta(struct tk_read_base *tkr)
 {
        struct timekeeper *tk = &tk_core.timekeeper;
-       cycle_t now, last, mask, max, delta;
+       u64 now, last, mask, max, delta;
        unsigned int seq;
 
        /*
@@ -199,12 +199,12 @@ static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
        return delta;
 }
 #else
-static inline void timekeeping_check_update(struct timekeeper *tk, cycle_t offset)
+static inline void timekeeping_check_update(struct timekeeper *tk, u64 offset)
 {
 }
-static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
+static inline u64 timekeeping_get_delta(struct tk_read_base *tkr)
 {
-       cycle_t cycle_now, delta;
+       u64 cycle_now, delta;
 
        /* read clocksource */
        cycle_now = tkr->read(tkr->clock);
@@ -229,7 +229,7 @@ static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
  */
 static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
 {
-       cycle_t interval;
+       u64 interval;
        u64 tmp, ntpinterval;
        struct clocksource *old_clock;
 
@@ -254,7 +254,7 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
        if (tmp == 0)
                tmp = 1;
 
-       interval = (cycle_t) tmp;
+       interval = (u64) tmp;
        tk->cycle_interval = interval;
 
        /* Go back from cycles -> shifted ns */
@@ -298,8 +298,7 @@ u32 (*arch_gettimeoffset)(void) = default_arch_gettimeoffset;
 static inline u32 arch_gettimeoffset(void) { return 0; }
 #endif
 
-static inline u64 timekeeping_delta_to_ns(struct tk_read_base *tkr,
-                                         cycle_t delta)
+static inline u64 timekeeping_delta_to_ns(struct tk_read_base *tkr, u64 delta)
 {
        u64 nsec;
 
@@ -312,16 +311,15 @@ static inline u64 timekeeping_delta_to_ns(struct tk_read_base *tkr,
 
 static inline u64 timekeeping_get_ns(struct tk_read_base *tkr)
 {
-       cycle_t delta;
+       u64 delta;
 
        delta = timekeeping_get_delta(tkr);
        return timekeeping_delta_to_ns(tkr, delta);
 }
 
-static inline u64 timekeeping_cycles_to_ns(struct tk_read_base *tkr,
-                                          cycle_t cycles)
+static inline u64 timekeeping_cycles_to_ns(struct tk_read_base *tkr, u64 cycles)
 {
-       cycle_t delta;
+       u64 delta;
 
        /* calculate the delta since the last update_wall_time */
        delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask);
@@ -454,9 +452,9 @@ u64 notrace ktime_get_boot_fast_ns(void)
 EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
 
 /* Suspend-time cycles value for halted fast timekeeper. */
-static cycle_t cycles_at_suspend;
+static u64 cycles_at_suspend;
 
-static cycle_t dummy_clock_read(struct clocksource *cs)
+static u64 dummy_clock_read(struct clocksource *cs)
 {
        return cycles_at_suspend;
 }
@@ -573,7 +571,7 @@ EXPORT_SYMBOL_GPL(pvclock_gtod_unregister_notifier);
 static inline void tk_update_leap_state(struct timekeeper *tk)
 {
        tk->next_leap_ktime = ntp_get_next_leap();
-       if (tk->next_leap_ktime.tv64 != KTIME_MAX)
+       if (tk->next_leap_ktime != KTIME_MAX)
                /* Convert to monotonic time */
                tk->next_leap_ktime = ktime_sub(tk->next_leap_ktime, tk->offs_real);
 }
@@ -650,7 +648,7 @@ static void timekeeping_update(struct timekeeper *tk, unsigned int action)
 static void timekeeping_forward_now(struct timekeeper *tk)
 {
        struct clocksource *clock = tk->tkr_mono.clock;
-       cycle_t cycle_now, delta;
+       u64 cycle_now, delta;
        u64 nsec;
 
        cycle_now = tk->tkr_mono.read(clock);
@@ -923,7 +921,7 @@ void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot)
        ktime_t base_real;
        u64 nsec_raw;
        u64 nsec_real;
-       cycle_t now;
+       u64 now;
 
        WARN_ON_ONCE(timekeeping_suspended);
 
@@ -982,8 +980,8 @@ static int scale64_check_overflow(u64 mult, u64 div, u64 *base)
  * interval is partial_history_cycles.
  */
 static int adjust_historical_crosststamp(struct system_time_snapshot *history,
-                                        cycle_t partial_history_cycles,
-                                        cycle_t total_history_cycles,
+                                        u64 partial_history_cycles,
+                                        u64 total_history_cycles,
                                         bool discontinuity,
                                         struct system_device_crosststamp *ts)
 {
@@ -1047,7 +1045,7 @@ static int adjust_historical_crosststamp(struct system_time_snapshot *history,
 /*
  * cycle_between - true if test occurs chronologically between before and after
  */
-static bool cycle_between(cycle_t before, cycle_t test, cycle_t after)
+static bool cycle_between(u64 before, u64 test, u64 after)
 {
        if (test > before && test < after)
                return true;
@@ -1077,7 +1075,7 @@ int get_device_system_crosststamp(int (*get_time_fn)
 {
        struct system_counterval_t system_counterval;
        struct timekeeper *tk = &tk_core.timekeeper;
-       cycle_t cycles, now, interval_start;
+       u64 cycles, now, interval_start;
        unsigned int clock_was_set_seq = 0;
        ktime_t base_real, base_raw;
        u64 nsec_real, nsec_raw;
@@ -1138,7 +1136,7 @@ int get_device_system_crosststamp(int (*get_time_fn)
         * current interval
         */
        if (do_interp) {
-               cycle_t partial_history_cycles, total_history_cycles;
+               u64 partial_history_cycles, total_history_cycles;
                bool discontinuity;
 
                /*
@@ -1644,7 +1642,7 @@ void timekeeping_resume(void)
        struct clocksource *clock = tk->tkr_mono.clock;
        unsigned long flags;
        struct timespec64 ts_new, ts_delta;
-       cycle_t cycle_now;
+       u64 cycle_now;
 
        sleeptime_injected = false;
        read_persistent_clock64(&ts_new);
@@ -2010,11 +2008,10 @@ static inline unsigned int accumulate_nsecs_to_secs(struct timekeeper *tk)
  *
  * Returns the unconsumed cycles.
  */
-static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset,
-                                               u32 shift,
-                                               unsigned int *clock_set)
+static u64 logarithmic_accumulation(struct timekeeper *tk, u64 offset,
+                                   u32 shift, unsigned int *clock_set)
 {
-       cycle_t interval = tk->cycle_interval << shift;
+       u64 interval = tk->cycle_interval << shift;
        u64 raw_nsecs;
 
        /* If the offset is smaller than a shifted interval, do nothing */
@@ -2055,7 +2052,7 @@ void update_wall_time(void)
 {
        struct timekeeper *real_tk = &tk_core.timekeeper;
        struct timekeeper *tk = &shadow_timekeeper;
-       cycle_t offset;
+       u64 offset;
        int shift = 0, maxshift;
        unsigned int clock_set = 0;
        unsigned long flags;
@@ -2253,7 +2250,7 @@ ktime_t ktime_get_update_offsets_now(unsigned int *cwsseq, ktime_t *offs_real,
                }
 
                /* Handle leapsecond insertion adjustments */
-               if (unlikely(base.tv64 >= tk->next_leap_ktime.tv64))
+               if (unlikely(base >= tk->next_leap_ktime))
                        *offs_real = ktime_sub(tk->offs_real, ktime_set(1, 0));
 
        } while (read_seqcount_retry(&tk_core.seq, seq));
index 5be76270ec4a8f155574aabe2812f9edefb80aec..9a18f121f3990b3a635c350506ada940e0c7f922 100644 (file)
@@ -13,9 +13,9 @@ extern void tk_debug_account_sleep_time(struct timespec64 *t);
 #endif
 
 #ifdef CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE
-static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
+static inline u64 clocksource_delta(u64 now, u64 last, u64 mask)
 {
-       cycle_t ret = (now - last) & mask;
+       u64 ret = (now - last) & mask;
 
        /*
         * Prevent time going backwards by checking the MSB of mask in
@@ -24,7 +24,7 @@ static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
        return ret & ~(mask >> 1) ? 0 : ret;
 }
 #else
-static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
+static inline u64 clocksource_delta(u64 now, u64 last, u64 mask)
 {
        return (now - last) & mask;
 }
index 1f0f547c54da2fee935a89316e6e2e74df7e6f34..eb230f06ba4123a1dc75dafb508789f6cd7afd25 100644 (file)
@@ -2847,7 +2847,7 @@ static void ftrace_shutdown_sysctl(void)
        }
 }
 
-static cycle_t         ftrace_update_time;
+static u64             ftrace_update_time;
 unsigned long          ftrace_update_tot_cnt;
 
 static inline int ops_traces_mod(struct ftrace_ops *ops)
@@ -2894,7 +2894,7 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs)
 {
        struct ftrace_page *pg;
        struct dyn_ftrace *p;
-       cycle_t start, stop;
+       u64 start, stop;
        unsigned long update_cnt = 0;
        unsigned long rec_flags = 0;
        int i;
index 66f829c47bec77c0dbfc1b9d45c92f303e21e5b3..d7449783987a2bee7dea147e02530f36ff23dfba 100644 (file)
@@ -236,7 +236,7 @@ static int __init set_tracepoint_printk(char *str)
 }
 __setup("tp_printk", set_tracepoint_printk);
 
-unsigned long long ns2usecs(cycle_t nsec)
+unsigned long long ns2usecs(u64 nsec)
 {
        nsec += 500;
        do_div(nsec, 1000);
@@ -573,7 +573,7 @@ int trace_pid_write(struct trace_pid_list *filtered_pids,
        return read;
 }
 
-static cycle_t buffer_ftrace_now(struct trace_buffer *buf, int cpu)
+static u64 buffer_ftrace_now(struct trace_buffer *buf, int cpu)
 {
        u64 ts;
 
@@ -587,7 +587,7 @@ static cycle_t buffer_ftrace_now(struct trace_buffer *buf, int cpu)
        return ts;
 }
 
-cycle_t ftrace_now(int cpu)
+u64 ftrace_now(int cpu)
 {
        return buffer_ftrace_now(&global_trace.trace_buffer, cpu);
 }
index c2234494f40c1c95e83414d1d50417cb5db2a416..1ea51ab53edf372924692e78c692f52302280bc1 100644 (file)
@@ -159,7 +159,7 @@ struct trace_array_cpu {
        unsigned long           policy;
        unsigned long           rt_priority;
        unsigned long           skipped_entries;
-       cycle_t                 preempt_timestamp;
+       u64                     preempt_timestamp;
        pid_t                   pid;
        kuid_t                  uid;
        char                    comm[TASK_COMM_LEN];
@@ -177,7 +177,7 @@ struct trace_buffer {
        struct trace_array              *tr;
        struct ring_buffer              *buffer;
        struct trace_array_cpu __percpu *data;
-       cycle_t                         time_start;
+       u64                             time_start;
        int                             cpu;
 };
 
@@ -689,7 +689,7 @@ static inline void __trace_stack(struct trace_array *tr, unsigned long flags,
 }
 #endif /* CONFIG_STACKTRACE */
 
-extern cycle_t ftrace_now(int cpu);
+extern u64 ftrace_now(int cpu);
 
 extern void trace_find_cmdline(int pid, char comm[]);
 extern void trace_event_follow_fork(struct trace_array *tr, bool enable);
@@ -736,7 +736,7 @@ extern int trace_selftest_startup_branch(struct tracer *trace,
 #endif /* CONFIG_FTRACE_STARTUP_TEST */
 
 extern void *head_page(struct trace_array_cpu *data);
-extern unsigned long long ns2usecs(cycle_t nsec);
+extern unsigned long long ns2usecs(u64 nsec);
 extern int
 trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
 extern int
index 86654d7e1afe26737cf68f2bfdd80f50cc73f9fd..7758bc0617cb15d8731defbc67912b5eb46246c2 100644 (file)
@@ -298,7 +298,7 @@ static void irqsoff_print_header(struct seq_file *s)
 /*
  * Should this new latency be reported/recorded?
  */
-static bool report_latency(struct trace_array *tr, cycle_t delta)
+static bool report_latency(struct trace_array *tr, u64 delta)
 {
        if (tracing_thresh) {
                if (delta < tracing_thresh)
@@ -316,7 +316,7 @@ check_critical_timing(struct trace_array *tr,
                      unsigned long parent_ip,
                      int cpu)
 {
-       cycle_t T0, T1, delta;
+       u64 T0, T1, delta;
        unsigned long flags;
        int pc;
 
index 5d0bb025bb21313dd15546f714a9fa4b1e3bc4e0..ddec53b6764617e8fe431d93bf9f970a5015b4be 100644 (file)
@@ -358,7 +358,7 @@ static void wakeup_print_header(struct seq_file *s)
 /*
  * Should this new latency be reported/recorded?
  */
-static bool report_latency(struct trace_array *tr, cycle_t delta)
+static bool report_latency(struct trace_array *tr, u64 delta)
 {
        if (tracing_thresh) {
                if (delta < tracing_thresh)
@@ -440,7 +440,7 @@ probe_wakeup_sched_switch(void *ignore, bool preempt,
                          struct task_struct *prev, struct task_struct *next)
 {
        struct trace_array_cpu *data;
-       cycle_t T0, T1, delta;
+       u64 T0, T1, delta;
        unsigned long flags;
        long disabled;
        int cpu;
index 782ae8ca2c06f2b3439b10592cef6a43c31223cd..adc6ee0a51267ab6691c6244cddbd5da69c059f9 100644 (file)
@@ -48,7 +48,7 @@ bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node)
        while (*p) {
                parent = *p;
                ptr = rb_entry(parent, struct timerqueue_node, node);
-               if (node->expires.tv64 < ptr->expires.tv64)
+               if (node->expires < ptr->expires)
                        p = &(*p)->rb_left;
                else
                        p = &(*p)->rb_right;
@@ -56,7 +56,7 @@ bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node)
        rb_link_node(&node->node, parent, p);
        rb_insert_color(&node->node, &head->head);
 
-       if (!head->next || node->expires.tv64 < head->next->expires.tv64) {
+       if (!head->next || node->expires < head->next->expires) {
                head->next = node;
                return true;
        }
index 436a7537e6a9d3ef065ec572568c42fd13331b5e..21ac75390e3d64f795faad074b515d34ce0bbfa3 100644 (file)
@@ -199,11 +199,11 @@ static int bcm_proc_show(struct seq_file *m, void *v)
 
                seq_printf(m, "%c ", (op->flags & RX_CHECK_DLC) ? 'd' : ' ');
 
-               if (op->kt_ival1.tv64)
+               if (op->kt_ival1)
                        seq_printf(m, "timeo=%lld ",
                                   (long long)ktime_to_us(op->kt_ival1));
 
-               if (op->kt_ival2.tv64)
+               if (op->kt_ival2)
                        seq_printf(m, "thr=%lld ",
                                   (long long)ktime_to_us(op->kt_ival2));
 
@@ -226,11 +226,11 @@ static int bcm_proc_show(struct seq_file *m, void *v)
                else
                        seq_printf(m, "[%u] ", op->nframes);
 
-               if (op->kt_ival1.tv64)
+               if (op->kt_ival1)
                        seq_printf(m, "t1=%lld ",
                                   (long long)ktime_to_us(op->kt_ival1));
 
-               if (op->kt_ival2.tv64)
+               if (op->kt_ival2)
                        seq_printf(m, "t2=%lld ",
                                   (long long)ktime_to_us(op->kt_ival2));
 
@@ -365,11 +365,11 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,
 
 static void bcm_tx_start_timer(struct bcm_op *op)
 {
-       if (op->kt_ival1.tv64 && op->count)
+       if (op->kt_ival1 && op->count)
                hrtimer_start(&op->timer,
                              ktime_add(ktime_get(), op->kt_ival1),
                              HRTIMER_MODE_ABS);
-       else if (op->kt_ival2.tv64)
+       else if (op->kt_ival2)
                hrtimer_start(&op->timer,
                              ktime_add(ktime_get(), op->kt_ival2),
                              HRTIMER_MODE_ABS);
@@ -380,7 +380,7 @@ static void bcm_tx_timeout_tsklet(unsigned long data)
        struct bcm_op *op = (struct bcm_op *)data;
        struct bcm_msg_head msg_head;
 
-       if (op->kt_ival1.tv64 && (op->count > 0)) {
+       if (op->kt_ival1 && (op->count > 0)) {
 
                op->count--;
                if (!op->count && (op->flags & TX_COUNTEVT)) {
@@ -398,7 +398,7 @@ static void bcm_tx_timeout_tsklet(unsigned long data)
                }
                bcm_can_tx(op);
 
-       } else if (op->kt_ival2.tv64)
+       } else if (op->kt_ival2)
                bcm_can_tx(op);
 
        bcm_tx_start_timer(op);
@@ -459,7 +459,7 @@ static void bcm_rx_update_and_send(struct bcm_op *op,
        lastdata->flags |= (RX_RECV|RX_THR);
 
        /* throttling mode inactive ? */
-       if (!op->kt_ival2.tv64) {
+       if (!op->kt_ival2) {
                /* send RX_CHANGED to the user immediately */
                bcm_rx_changed(op, lastdata);
                return;
@@ -470,7 +470,7 @@ static void bcm_rx_update_and_send(struct bcm_op *op,
                return;
 
        /* first reception with enabled throttling mode */
-       if (!op->kt_lastmsg.tv64)
+       if (!op->kt_lastmsg)
                goto rx_changed_settime;
 
        /* got a second frame inside a potential throttle period? */
@@ -537,7 +537,7 @@ static void bcm_rx_starttimer(struct bcm_op *op)
        if (op->flags & RX_NO_AUTOTIMER)
                return;
 
-       if (op->kt_ival1.tv64)
+       if (op->kt_ival1)
                hrtimer_start(&op->timer, op->kt_ival1, HRTIMER_MODE_REL);
 }
 
@@ -643,7 +643,7 @@ static enum hrtimer_restart bcm_rx_thr_handler(struct hrtimer *hrtimer)
                return HRTIMER_RESTART;
        } else {
                /* rearm throttle handling */
-               op->kt_lastmsg = ktime_set(0, 0);
+               op->kt_lastmsg = 0;
                return HRTIMER_NORESTART;
        }
 }
@@ -1005,7 +1005,7 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
                op->kt_ival2 = bcm_timeval_to_ktime(msg_head->ival2);
 
                /* disable an active timer due to zero values? */
-               if (!op->kt_ival1.tv64 && !op->kt_ival2.tv64)
+               if (!op->kt_ival1 && !op->kt_ival2)
                        hrtimer_cancel(&op->timer);
        }
 
@@ -1189,19 +1189,19 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
                        op->kt_ival2 = bcm_timeval_to_ktime(msg_head->ival2);
 
                        /* disable an active timer due to zero value? */
-                       if (!op->kt_ival1.tv64)
+                       if (!op->kt_ival1)
                                hrtimer_cancel(&op->timer);
 
                        /*
                         * In any case cancel the throttle timer, flush
                         * potentially blocked msgs and reset throttle handling
                         */
-                       op->kt_lastmsg = ktime_set(0, 0);
+                       op->kt_lastmsg = 0;
                        hrtimer_cancel(&op->thrtimer);
                        bcm_rx_thr_flush(op, 1);
                }
 
-               if ((op->flags & STARTTIMER) && op->kt_ival1.tv64)
+               if ((op->flags & STARTTIMER) && op->kt_ival1)
                        hrtimer_start(&op->timer, op->kt_ival1,
                                      HRTIMER_MODE_REL);
        }
index 455168718c2efb4fa6b9e396e945a3824437c65d..a54ab0c821048ab2034bf32cef3c1f35e0dc82a5 100644 (file)
@@ -429,7 +429,7 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
 
        /* clear the skb timestamp if not configured the other way */
        if (!(gwj->flags & CGW_FLAGS_CAN_SRC_TSTAMP))
-               nskb->tstamp.tv64 = 0;
+               nskb->tstamp = 0;
 
        /* send to netdevice */
        if (can_send(nskb, gwj->flags & CGW_FLAGS_CAN_ECHO))
index 037ffd27fcc2af4e50f718dabfada353e0f2bfa7..8db5a0b4b52061afe9cd44dead33cc69523d15df 100644 (file)
@@ -1731,14 +1731,14 @@ EXPORT_SYMBOL(net_disable_timestamp);
 
 static inline void net_timestamp_set(struct sk_buff *skb)
 {
-       skb->tstamp.tv64 = 0;
+       skb->tstamp = 0;
        if (static_key_false(&netstamp_needed))
                __net_timestamp(skb);
 }
 
 #define net_timestamp_check(COND, SKB)                 \
        if (static_key_false(&netstamp_needed)) {               \
-               if ((COND) && !(SKB)->tstamp.tv64)      \
+               if ((COND) && !(SKB)->tstamp)   \
                        __net_timestamp(SKB);           \
        }                                               \
 
index e77f40616fea0ea4729a6f9b59295c68308ad49c..5a03730fbc1a84376985d4d68d8b80d8f38b0985 100644 (file)
@@ -4368,7 +4368,7 @@ EXPORT_SYMBOL(skb_try_coalesce);
  */
 void skb_scrub_packet(struct sk_buff *skb, bool xnet)
 {
-       skb->tstamp.tv64 = 0;
+       skb->tstamp = 0;
        skb->pkt_type = PACKET_HOST;
        skb->skb_iif = 0;
        skb->ignore_df = 0;
index 31a255b555ad86a3537c077862e3ea38f9b44284..1d5331a1b1dc2677316148ba9852c191e7ed0fd4 100644 (file)
@@ -1038,7 +1038,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
        skb_shinfo(skb)->gso_size = tcp_skb_mss(skb);
 
        /* Our usage of tstamp should remain private */
-       skb->tstamp.tv64 = 0;
+       skb->tstamp = 0;
 
        /* Cleanup our debris for IP stacks */
        memset(skb->cb, 0, max(sizeof(struct inet_skb_parm),
@@ -3203,7 +3203,7 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
 #endif
 
        /* Do not fool tcpdump (if any), clean our debris */
-       skb->tstamp.tv64 = 0;
+       skb->tstamp = 0;
        return skb;
 }
 EXPORT_SYMBOL(tcp_make_synack);
index 926818c331e524b4d24da321a076b634a7191f2c..e4198502fd98ce55c1ab6d4d9767b8506b2cf707 100644 (file)
@@ -232,7 +232,7 @@ static bool ipv6_dest_hao(struct sk_buff *skb, int optoff)
        ipv6h->saddr = hao->addr;
        hao->addr = tmp_addr;
 
-       if (skb->tstamp.tv64 == 0)
+       if (skb->tstamp == 0)
                __net_timestamp(skb);
 
        return true;
index 60c79a08e14a592006aabe8ac120afc32e81347d..64f0f7be9e5e267e9dc303c6b726d9b680e762a6 100644 (file)
@@ -191,7 +191,7 @@ static inline int mip6_report_rl_allow(ktime_t stamp,
        int allow = 0;
 
        spin_lock_bh(&mip6_report_rl.lock);
-       if (!ktime_equal(mip6_report_rl.stamp, stamp) ||
+       if (mip6_report_rl.stamp != stamp ||
            mip6_report_rl.iif != iif ||
            !ipv6_addr_equal(&mip6_report_rl.src, src) ||
            !ipv6_addr_equal(&mip6_report_rl.dst, dst)) {
index e07f22b0c58ad6518c42806f25ba92dd792748a8..8a9219ff2e77e0205de652974a44c5e4ba33b2c0 100644 (file)
@@ -1809,7 +1809,7 @@ static int ipx_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
        rc = skb_copy_datagram_msg(skb, sizeof(struct ipxhdr), msg, copied);
        if (rc)
                goto out_free;
-       if (skb->tstamp.tv64)
+       if (skb->tstamp)
                sk->sk_stamp = skb->tstamp;
 
        if (sipx) {
index f9fd0957ab67f256d10e80563bb68ce88334f911..7c03fb0ea34cb8b5d46cb68779fa24d6dc276bc7 100644 (file)
@@ -80,11 +80,11 @@ void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb,
 
                if (skb->len > max_sifs_size)
                        hrtimer_start(&local->ifs_timer,
-                                     ktime_set(0, hw->phy->lifs_period * NSEC_PER_USEC),
+                                     hw->phy->lifs_period * NSEC_PER_USEC,
                                      HRTIMER_MODE_REL);
                else
                        hrtimer_start(&local->ifs_timer,
-                                     ktime_set(0, hw->phy->sifs_period * NSEC_PER_USEC),
+                                     hw->phy->sifs_period * NSEC_PER_USEC,
                                      HRTIMER_MODE_REL);
        } else {
                ieee802154_wake_queue(hw);
index 6a0bbfa8e7020d8f2f004e6659141731dbf3342f..3a073cd9fcf49ed9cfd228a420cc2de928ca4459 100644 (file)
@@ -783,7 +783,7 @@ __nf_conntrack_confirm(struct sk_buff *skb)
        /* set conntrack timestamp, if enabled. */
        tstamp = nf_conn_tstamp_find(ct);
        if (tstamp) {
-               if (skb->tstamp.tv64 == 0)
+               if (skb->tstamp == 0)
                        __net_timestamp(skb);
 
                tstamp->start = ktime_to_ns(skb->tstamp);
index 200922bb20366a644e649ec99c736d0d77fda142..08247bf7d7b836828c8151ed07f438e05973c2c0 100644 (file)
@@ -538,7 +538,7 @@ __build_packet_message(struct nfnl_log_net *log,
                        goto nla_put_failure;
        }
 
-       if (skb->tstamp.tv64) {
+       if (skb->tstamp) {
                struct nfulnl_msg_packet_timestamp ts;
                struct timespec64 kts = ktime_to_timespec64(skb->tstamp);
                ts.sec = cpu_to_be64(kts.tv_sec);
index be7627b8040057c4b06b5961e7cae4c0c5b10d66..3ee0b8a000a41ec901faeb239e752a126428dc4d 100644 (file)
@@ -384,7 +384,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,
                + nla_total_size(sizeof(u_int32_t))     /* skbinfo */
                + nla_total_size(sizeof(u_int32_t));    /* cap_len */
 
-       if (entskb->tstamp.tv64)
+       if (entskb->tstamp)
                size += nla_total_size(sizeof(struct nfqnl_msg_packet_timestamp));
 
        size += nfqnl_get_bridge_size(entry);
@@ -555,7 +555,7 @@ nfqnl_build_packet_message(struct net *net, struct nfqnl_instance *queue,
        if (nfqnl_put_bridge(entry, skb) < 0)
                goto nla_put_failure;
 
-       if (entskb->tstamp.tv64) {
+       if (entskb->tstamp) {
                struct nfqnl_msg_packet_timestamp ts;
                struct timespec64 kts = ktime_to_timespec64(entskb->tstamp);
 
index 0ae55a36f492902ef19753c336160b453ef0cd34..1b01eec1fbda5368e31a8b3917286d8b05a4604c 100644 (file)
@@ -168,7 +168,7 @@ time_mt(const struct sk_buff *skb, struct xt_action_param *par)
         * may happen that the same packet matches both rules if
         * it arrived at the right moment before 13:00.
         */
-       if (skb->tstamp.tv64 == 0)
+       if (skb->tstamp == 0)
                __net_timestamp((struct sk_buff *)skb);
 
        stamp = ktime_to_ns(skb->tstamp);
index 9ffe1c220b02848032474fa7b9b2c2f09d40b110..f1207582cbf3005f08af70275d6c1b217f60f26a 100644 (file)
@@ -509,7 +509,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer)
        if (delay) {
                ktime_t time;
 
-               time = ktime_set(0, 0);
+               time = 0;
                time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay));
                hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS_PINNED);
        }
index b7e4097bfdab22dc0f43b314aadf3c001cc3b24f..bcfadfdea8e0928ba6f9615e919c5411dfd948d3 100644 (file)
@@ -627,7 +627,7 @@ deliver:
                         * from the network (tstamp will be updated).
                         */
                        if (G_TC_FROM(skb->tc_verd) & AT_INGRESS)
-                               skb->tstamp.tv64 = 0;
+                               skb->tstamp = 0;
 #endif
 
                        if (q->qdisc) {
index ce54dce13ddb2cba959bca080b06f9285f2fe16d..a1652ab63918940be605eaf002b5506f5e4e6673 100644 (file)
@@ -72,7 +72,7 @@ static struct sctp_transport *sctp_transport_init(struct net *net,
         */
        peer->rto = msecs_to_jiffies(net->sctp.rto_initial);
 
-       peer->last_time_heard = ktime_set(0, 0);
+       peer->last_time_heard = 0;
        peer->last_time_ecne_reduced = jiffies;
 
        peer->param_flags = SPP_HB_DISABLE |
index 5ff26c44db3314d5af3410773f5668403dc50b15..8487bf136e5c4f54801777c4ef0f4e51b765cd62 100644 (file)
@@ -668,7 +668,7 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
 
        /* Race occurred between timestamp enabling and packet
           receiving.  Fill in the current time for now. */
-       if (need_software_tstamp && skb->tstamp.tv64 == 0)
+       if (need_software_tstamp && skb->tstamp == 0)
                __net_timestamp(skb);
 
        if (need_software_tstamp) {
index a3e85ee28b5a872b8f269b0e6ead279fed2e5f4f..de066acdb34e322fd0ffa78da3e65d380c2f4fc2 100644 (file)
@@ -574,7 +574,7 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp)
        }
        len = svc_addr_len(svc_addr(rqstp));
        rqstp->rq_addrlen = len;
-       if (skb->tstamp.tv64 == 0) {
+       if (skb->tstamp == 0) {
                skb->tstamp = ktime_get_real();
                /* Don't enable netstamp, sunrpc doesn't
                   need that much accuracy */
index d4ab9a7f3d94cf2d9073aad6f59f708e643f4974..64e3c82eedf6bbe0e6817d008fd661bdef8cca91 100644 (file)
@@ -1404,7 +1404,7 @@ int xfrm_state_check_expire(struct xfrm_state *x)
        if (x->curlft.bytes >= x->lft.hard_byte_limit ||
            x->curlft.packets >= x->lft.hard_packet_limit) {
                x->km.state = XFRM_STATE_EXPIRED;
-               tasklet_hrtimer_start(&x->mtimer, ktime_set(0, 0), HRTIMER_MODE_REL);
+               tasklet_hrtimer_start(&x->mtimer, 0, HRTIMER_MODE_REL);
                return -EINVAL;
        }
 
index e2f27022b363c482ba2614a2579f87f2b19192e3..1ac0c423903e7f3f41a2045fd20b9707df4ac00f 100644 (file)
@@ -58,7 +58,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
 
        /* calculate the drift */
        delta = ktime_sub(hrt->base->get_time(), hrtimer_get_expires(hrt));
-       if (delta.tv64 > 0)
+       if (delta > 0)
                ticks += ktime_divns(delta, ticks * resolution);
 
        snd_timer_interrupt(stime->timer, ticks);
index 3689f5f6be6498b1aa19dfb72f6446987c591686..aca2d7d5f059568bfc485b906ac8a351f4f7159b 100644 (file)
@@ -166,7 +166,7 @@ static int pcsp_start_playing(struct snd_pcsp *chip)
        atomic_set(&chip->timer_active, 1);
        chip->thalf = 0;
 
-       hrtimer_start(&pcsp_chip.timer, ktime_set(0, 0), HRTIMER_MODE_REL);
+       hrtimer_start(&pcsp_chip.timer, 0, HRTIMER_MODE_REL);
        return 0;
 }
 
index ca4dfcf4317579158c1cc6178a40fcf7eeda1052..7683238283b6c528e2eafa18f64a877fcbbe02c3 100644 (file)
@@ -114,7 +114,7 @@ static void async_midi_port_callback(struct fw_card *card, int rcode,
                snd_rawmidi_transmit_ack(substream, port->consume_bytes);
        else if (!rcode_is_permanent_error(rcode))
                /* To start next transaction immediately for recovery. */
-               port->next_ktime = ktime_set(0, 0);
+               port->next_ktime = 0;
        else
                /* Don't continue processing. */
                port->error = true;
@@ -156,7 +156,7 @@ static void midi_port_work(struct work_struct *work)
        if (port->consume_bytes <= 0) {
                /* Do it in next chance, immediately. */
                if (port->consume_bytes == 0) {
-                       port->next_ktime = ktime_set(0, 0);
+                       port->next_ktime = 0;
                        schedule_work(&port->work);
                } else {
                        /* Fatal error. */
@@ -219,7 +219,7 @@ int snd_fw_async_midi_port_init(struct snd_fw_async_midi_port *port,
        port->addr = addr;
        port->fill = fill;
        port->idling = true;
-       port->next_ktime = ktime_set(0, 0);
+       port->next_ktime = 0;
        port->error = false;
 
        INIT_WORK(&port->work, midi_port_work);
index 38990a77d7b780081167fa14ded35745025553c1..c6994ebb4567bf7f6120f9d94405ce1b557a0970 100644 (file)
@@ -465,7 +465,7 @@ int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
 }
 EXPORT_SYMBOL_GPL(snd_hdac_stream_set_params);
 
-static cycle_t azx_cc_read(const struct cyclecounter *cc)
+static u64 azx_cc_read(const struct cyclecounter *cc)
 {
        struct hdac_stream *azx_dev = container_of(cc, struct hdac_stream, cc);
 
@@ -473,7 +473,7 @@ static cycle_t azx_cc_read(const struct cyclecounter *cc)
 }
 
 static void azx_timecounter_init(struct hdac_stream *azx_dev,
-                                bool force, cycle_t last)
+                                bool force, u64 last)
 {
        struct timecounter *tc = &azx_dev->tc;
        struct cyclecounter *cc = &azx_dev->cc;
@@ -523,7 +523,7 @@ void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
        struct snd_pcm_runtime *runtime = azx_dev->substream->runtime;
        struct hdac_stream *s;
        bool inited = false;
-       cycle_t cycle_last = 0;
+       u64 cycle_last = 0;
        int i = 0;
 
        list_for_each_entry(s, &bus->stream_list, list) {
index abf9c0cab1e2b69ac8256cd14fae066d9cad7c8f..461b310c7872d98adc8e37b86d30a53e77fd1f8c 100644 (file)
@@ -87,7 +87,7 @@ static void dac_audio_reset(struct snd_sh_dac *chip)
 
 static void dac_audio_set_rate(struct snd_sh_dac *chip)
 {
-       chip->wakeups_per_second = ktime_set(0, 1000000000 / chip->rate);
+       chip->wakeups_per_second = 1000000000 / chip->rate;
 }
 
 
index 5b4f60d433142bdd9ae9ceb31db38e9800bf1c0d..a2dbbccbb6a3fe96751fafde8cd01658aa1301a5 100644 (file)
@@ -39,7 +39,7 @@ void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu)
        vcpu->arch.timer_cpu.active_cleared_last = false;
 }
 
-static cycle_t kvm_phys_timer_read(void)
+static u64 kvm_phys_timer_read(void)
 {
        return timecounter->cc->read(timecounter->cc);
 }
@@ -102,7 +102,7 @@ static void kvm_timer_inject_irq_work(struct work_struct *work)
 
 static u64 kvm_timer_compute_delta(struct kvm_vcpu *vcpu)
 {
-       cycle_t cval, now;
+       u64 cval, now;
 
        cval = vcpu->arch.timer_cpu.cntv_cval;
        now = kvm_phys_timer_read() - vcpu->kvm->arch.timer.cntvoff;
@@ -155,7 +155,7 @@ static bool kvm_timer_irq_can_fire(struct kvm_vcpu *vcpu)
 bool kvm_timer_should_fire(struct kvm_vcpu *vcpu)
 {
        struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
-       cycle_t cval, now;
+       u64 cval, now;
 
        if (!kvm_timer_irq_can_fire(vcpu))
                return false;