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

Commit 31bbb9b5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  itimers: Add tracepoints for itimer
  hrtimer: Add tracepoint for hrtimers
  timers: Add tracepoints for timer_list timers
  cputime: Optimize jiffies_to_cputime(1)
  itimers: Simplify arm_timer() code a bit
  itimers: Fix periodic tics precision
  itimers: Merge ITIMER_VIRT and ITIMER_PROF

Trivial header file include conflicts in kernel/fork.c
parents ff830b8e 3f0a525e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@ typedef u64 cputime_t;
typedef u64 cputime64_t;
typedef u64 cputime64_t;


#define cputime_zero			((cputime_t)0)
#define cputime_zero			((cputime_t)0)
#define cputime_one_jiffy		jiffies_to_cputime(1)
#define cputime_max			((~((cputime_t)0) >> 1) - 1)
#define cputime_max			((~((cputime_t)0) >> 1) - 1)
#define cputime_add(__a, __b)		((__a) +  (__b))
#define cputime_add(__a, __b)		((__a) +  (__b))
#define cputime_sub(__a, __b)		((__a) -  (__b))
#define cputime_sub(__a, __b)		((__a) -  (__b))
+13 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,9 @@


#ifndef CONFIG_VIRT_CPU_ACCOUNTING
#ifndef CONFIG_VIRT_CPU_ACCOUNTING
#include <asm-generic/cputime.h>
#include <asm-generic/cputime.h>
#ifdef __KERNEL__
static inline void setup_cputime_one_jiffy(void) { }
#endif
#else
#else


#include <linux/types.h>
#include <linux/types.h>
@@ -48,6 +51,11 @@ typedef u64 cputime64_t;


#ifdef __KERNEL__
#ifdef __KERNEL__


/*
 * One jiffy in timebase units computed during initialization
 */
extern cputime_t cputime_one_jiffy;

/*
/*
 * Convert cputime <-> jiffies
 * Convert cputime <-> jiffies
 */
 */
@@ -89,6 +97,11 @@ static inline cputime_t jiffies_to_cputime(const unsigned long jif)
	return ct;
	return ct;
}
}


static inline void setup_cputime_one_jiffy(void)
{
	cputime_one_jiffy = jiffies_to_cputime(1);
}

static inline cputime64_t jiffies64_to_cputime64(const u64 jif)
static inline cputime64_t jiffies64_to_cputime64(const u64 jif)
{
{
	cputime_t ct;
	cputime_t ct;
+4 −0
Original line number Original line Diff line number Diff line
@@ -193,6 +193,8 @@ EXPORT_SYMBOL(__cputime_clockt_factor);
DEFINE_PER_CPU(unsigned long, cputime_last_delta);
DEFINE_PER_CPU(unsigned long, cputime_last_delta);
DEFINE_PER_CPU(unsigned long, cputime_scaled_last_delta);
DEFINE_PER_CPU(unsigned long, cputime_scaled_last_delta);


cputime_t cputime_one_jiffy;

static void calc_cputime_factors(void)
static void calc_cputime_factors(void)
{
{
	struct div_result res;
	struct div_result res;
@@ -501,6 +503,7 @@ static int __init iSeries_tb_recal(void)
				tb_to_xs = divres.result_low;
				tb_to_xs = divres.result_low;
				vdso_data->tb_ticks_per_sec = tb_ticks_per_sec;
				vdso_data->tb_ticks_per_sec = tb_ticks_per_sec;
				vdso_data->tb_to_xs = tb_to_xs;
				vdso_data->tb_to_xs = tb_to_xs;
				setup_cputime_one_jiffy();
			}
			}
			else {
			else {
				printk( "Titan recalibrate: FAILED (difference > 4 percent)\n"
				printk( "Titan recalibrate: FAILED (difference > 4 percent)\n"
@@ -960,6 +963,7 @@ void __init time_init(void)
	tb_ticks_per_usec = ppc_tb_freq / 1000000;
	tb_ticks_per_usec = ppc_tb_freq / 1000000;
	tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000);
	tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000);
	calc_cputime_factors();
	calc_cputime_factors();
	setup_cputime_one_jiffy();


	/*
	/*
	 * Calculate the length of each tick in ns.  It will not be
	 * Calculate the length of each tick in ns.  It will not be
+1 −0
Original line number Original line Diff line number Diff line
@@ -42,6 +42,7 @@ __div(unsigned long long n, unsigned int base)
#endif /* __s390x__ */
#endif /* __s390x__ */


#define cputime_zero			(0ULL)
#define cputime_zero			(0ULL)
#define cputime_one_jiffy		jiffies_to_cputime(1)
#define cputime_max			((~0UL >> 1) - 1)
#define cputime_max			((~0UL >> 1) - 1)
#define cputime_add(__a, __b)		((__a) +  (__b))
#define cputime_add(__a, __b)		((__a) +  (__b))
#define cputime_sub(__a, __b)		((__a) -  (__b))
#define cputime_sub(__a, __b)		((__a) -  (__b))
+1 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@
typedef unsigned long cputime_t;
typedef unsigned long cputime_t;


#define cputime_zero			(0UL)
#define cputime_zero			(0UL)
#define cputime_one_jiffy		jiffies_to_cputime(1)
#define cputime_max			((~0UL >> 1) - 1)
#define cputime_max			((~0UL >> 1) - 1)
#define cputime_add(__a, __b)		((__a) +  (__b))
#define cputime_add(__a, __b)		((__a) +  (__b))
#define cputime_sub(__a, __b)		((__a) -  (__b))
#define cputime_sub(__a, __b)		((__a) -  (__b))
Loading