Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

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
This commit is contained in:
Linus Torvalds
2016-12-25 14:30:04 -08:00
227 changed files with 604 additions and 665 deletions

View 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);
}

View 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();
}

View 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);
}

View 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);

View 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 = {

View 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);
}

View 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();
}

View 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();
}

View 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 = {

View 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 = {

View 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)

View 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;

View 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;

View 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);
}