pktgen: clean up ktime_t helpers

Some years ago, the ktime_t helper functions ktime_now() and ktime_lt()
have been introduced. Instead of defining them inside pktgen.c, they
should either use ktime_t library functions or, if not available, they
should be defined in ktime.h, so that also others can benefit from them.
ktime_compare() is introduced with a similar notion as in timespec_compare().

Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: MassStash <MassStash@gmail.com>
freezer: shorten freezer sleep time using exponential backoff

All tasks can easily be frozen in under 10 ms, switch to using
an initial 1 ms sleep followed by exponential backoff until
8 ms.  Also convert the printed time to ms instead of centiseconds.

Change-Id: I7b198b16eefb623c2b0fc45dce50d9bca320afdc
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: MassStash <MassStash@gmail.com>

Conflicts:
	kernel/power/process.c
freezer: convert freezable helpers to freezer_do_not_count()

Freezing tasks will wake up almost every userspace task from
where it is blocking and force it to run until it hits a
call to try_to_sleep(), generally on the exit path from the syscall
it is blocking in.  On resume each task will run again, usually
restarting the syscall and running until it hits the same
blocking call as it was originally blocked in.

Convert the existing wait_event_freezable* wrappers to use
freezer_do_not_count().  Combined with a previous patch,
these tasks will not run during suspend or resume unless they wake
up for another reason, in which case they will run until they hit
the try_to_freeze() in freezer_count(), and then continue processing
the wakeup after tasks are thawed.

This results in a small change in behavior, previously a race
between freezing and a normal wakeup would be won by the wakeup,
now the task will freeze and then handle the wakeup after thawing.

Change-Id: I532e62251f58c1a9ca488b3fb6220c53acf7d33d
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: MassStash <MassStash@gmail.com>

Conflicts:
	include/linux/freezer.h
freezer: add new freezable helpers using freezer_do_not_count()

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: MassStash <MassStash@gmail.com>

Conflicts:
	include/linux/freezer.h
process: fix derp.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: MassStash <MassStash@gmail.com>

Conflicts:
	kernel/power/process.c
Add a generic touchboost handler.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: add generic get_cpuidle_time to the cpufreq headers

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: interactive: squash everything from HH.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: MassStash <MassStash@gmail.com>
msm: remove any selection of RUN_QUEUE.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: MassStash <MassStash@gmail.com>
Add lionheart gov to defconfig