Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b035b6de authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

[PATCH] Consolidate default sched_clock()

parent 5e07e1cc
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -90,17 +90,6 @@ static inline __u32 rpcc(void)
    return result;
}

/*
 * Scheduler clock - returns current time in nanosec units.
 *
 * Copied from ARM code for expediency... ;-}
 */
unsigned long long sched_clock(void)
{
        return (unsigned long long)jiffies * (1000000000 / HZ);
}


/*
 * timer_interrupt() needs to keep up the real-time clock,
 * as well as call the "do_timer()" routine every clocktick
+0 −10
Original line number Diff line number Diff line
@@ -77,16 +77,6 @@ static unsigned long dummy_gettimeoffset(void)
}
#endif

/*
 * Scheduler clock - returns current time in nanosec units.
 * This is the default implementation.  Sub-architecture
 * implementations can override this.
 */
unsigned long long __attribute__((weak)) sched_clock(void)
{
	return (unsigned long long)jiffies * (1000000000 / HZ);
}

/*
 * An implementation of printk_clock() independent from
 * sched_clock().  This avoids non-bootable kernels when
+0 −8
Original line number Diff line number Diff line
@@ -89,14 +89,6 @@ static unsigned long gettimeoffset(void)
        return (offset + LATCH/2) / LATCH;
}

/*
 * Scheduler clock - returns current time in nanosec units.
 */
unsigned long long sched_clock(void)
{
	return (unsigned long long)jiffies * (1000000000 / HZ);
}

static unsigned long next_rtc_update;

/*
+0 −9
Original line number Diff line number Diff line
@@ -109,15 +109,6 @@ static void avr32_hpt_init(unsigned int count)
	sysreg_write(COUNT, count);
}

/*
 * Scheduler clock - returns current time in nanosec units.
 */
unsigned long long sched_clock(void)
{
	/* There must be better ways...? */
	return (unsigned long long)jiffies * (1000000000 / HZ);
}

/*
 * local_timer_interrupt() does profiling and process accounting on a
 * per-CPU basis.
+0 −8
Original line number Diff line number Diff line
@@ -216,14 +216,6 @@ cris_do_profile(struct pt_regs* regs)
#endif
}

/*
 * Scheduler clock - returns current time in nanosec units.
 */
unsigned long long sched_clock(void)
{
	return (unsigned long long)jiffies * (1000000000 / HZ);
}

static int
__init init_udelay(void)
{
Loading