mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
Merge remote-tracking branch 'common/android-4.4' into android-4.4.y
This commit is contained in:
@@ -357,6 +357,26 @@ of ftrace. Here is a list of some of the key files:
|
||||
to correlate events across hypervisor/guest if
|
||||
tb_offset is known.
|
||||
|
||||
mono: This uses the fast monotonic clock (CLOCK_MONOTONIC)
|
||||
which is monotonic and is subject to NTP rate adjustments.
|
||||
|
||||
mono_raw:
|
||||
This is the raw monotonic clock (CLOCK_MONOTONIC_RAW)
|
||||
which is montonic but is not subject to any rate adjustments
|
||||
and ticks at the same rate as the hardware clocksource.
|
||||
|
||||
boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the
|
||||
fast monotonic clock, but also accounts for time spent in
|
||||
suspend. Since the clock access is designed for use in
|
||||
tracing in the suspend path, some side effects are possible
|
||||
if clock is accessed after the suspend time is accounted before
|
||||
the fast mono clock is updated. In this case, the clock update
|
||||
appears to happen slightly sooner than it normally would have.
|
||||
Also on 32-bit systems, its possible that the 64-bit boot offset
|
||||
sees a partial update. These effects are rare and post
|
||||
processing should be able to handle them. See comments on
|
||||
ktime_get_boot_fast_ns function for more information.
|
||||
|
||||
To set a clock, simply echo the clock name into this file.
|
||||
|
||||
echo global > trace_clock
|
||||
|
||||
12
build.config.goldfish.arm
Normal file
12
build.config.goldfish.arm
Normal file
@@ -0,0 +1,12 @@
|
||||
ARCH=arm
|
||||
BRANCH=android-4.4
|
||||
CROSS_COMPILE=arm-linux-androidkernel-
|
||||
DEFCONFIG=ranchu_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=goldfish
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin
|
||||
FILES="
|
||||
arch/arm/boot/zImage
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
12
build.config.goldfish.arm64
Normal file
12
build.config.goldfish.arm64
Normal file
@@ -0,0 +1,12 @@
|
||||
ARCH=arm64
|
||||
BRANCH=android-4.4
|
||||
CROSS_COMPILE=aarch64-linux-android-
|
||||
DEFCONFIG=ranchu64_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=goldfish
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
|
||||
FILES="
|
||||
arch/arm64/boot/Image
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
11
build.config.goldfish.mips
Normal file
11
build.config.goldfish.mips
Normal file
@@ -0,0 +1,11 @@
|
||||
ARCH=mips
|
||||
BRANCH=android-4.4
|
||||
CROSS_COMPILE=mips64el-linux-android-
|
||||
DEFCONFIG=ranchu_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=goldfish
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9/bin
|
||||
FILES="
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
11
build.config.goldfish.mips64
Normal file
11
build.config.goldfish.mips64
Normal file
@@ -0,0 +1,11 @@
|
||||
ARCH=mips
|
||||
BRANCH=android-4.4
|
||||
CROSS_COMPILE=mips64el-linux-android-
|
||||
DEFCONFIG=ranchu64_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=goldfish
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9/bin
|
||||
FILES="
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
12
build.config.goldfish.x86
Normal file
12
build.config.goldfish.x86
Normal file
@@ -0,0 +1,12 @@
|
||||
ARCH=x86
|
||||
BRANCH=android-4.4
|
||||
CROSS_COMPILE=x86_64-linux-android-
|
||||
DEFCONFIG=i386_ranchu_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=goldfish
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
|
||||
FILES="
|
||||
arch/x86/boot/bzImage
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
12
build.config.goldfish.x86_64
Normal file
12
build.config.goldfish.x86_64
Normal file
@@ -0,0 +1,12 @@
|
||||
ARCH=x86_64
|
||||
BRANCH=android-4.4
|
||||
CROSS_COMPILE=x86_64-linux-android-
|
||||
DEFCONFIG=x86_64_ranchu_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=goldfish
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
|
||||
FILES="
|
||||
arch/x86/boot/bzImage
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
@@ -2,4 +2,5 @@
|
||||
# Makefile for Goldfish platform specific drivers
|
||||
#
|
||||
obj-$(CONFIG_GOLDFISH_BUS) += pdev_bus.o
|
||||
obj-$(CONFIG_GOLDFISH_PIPE) += goldfish_pipe.o goldfish_pipe_v2.o
|
||||
obj-$(CONFIG_GOLDFISH_PIPE) += goldfish_pipe_all.o
|
||||
goldfish_pipe_all-objs := goldfish_pipe.o goldfish_pipe_v2.o
|
||||
|
||||
@@ -233,6 +233,7 @@ static inline u64 ktime_get_raw_ns(void)
|
||||
|
||||
extern u64 ktime_get_mono_fast_ns(void);
|
||||
extern u64 ktime_get_raw_fast_ns(void);
|
||||
extern u64 ktime_get_boot_fast_ns(void);
|
||||
|
||||
/*
|
||||
* Timespec interfaces utilizing the ktime based ones
|
||||
|
||||
@@ -725,6 +725,7 @@ schedtune_init_cgroups(void)
|
||||
for_each_possible_cpu(cpu) {
|
||||
bg = &per_cpu(cpu_boost_groups, cpu);
|
||||
memset(bg, 0, sizeof(struct boost_groups));
|
||||
raw_spin_lock_init(&bg->lock);
|
||||
}
|
||||
|
||||
pr_info("schedtune: configured to support %d boost groups\n",
|
||||
|
||||
@@ -424,6 +424,35 @@ u64 ktime_get_raw_fast_ns(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ktime_get_raw_fast_ns);
|
||||
|
||||
/**
|
||||
* ktime_get_boot_fast_ns - NMI safe and fast access to boot clock.
|
||||
*
|
||||
* To keep it NMI safe since we're accessing from tracing, we're not using a
|
||||
* separate timekeeper with updates to monotonic clock and boot offset
|
||||
* protected with seqlocks. This has the following minor side effects:
|
||||
*
|
||||
* (1) Its possible that a timestamp be taken after the boot offset is updated
|
||||
* but before the timekeeper is updated. If this happens, the new boot offset
|
||||
* is added to the old timekeeping making the clock appear to update slightly
|
||||
* earlier:
|
||||
* CPU 0 CPU 1
|
||||
* timekeeping_inject_sleeptime64()
|
||||
* __timekeeping_inject_sleeptime(tk, delta);
|
||||
* timestamp();
|
||||
* timekeeping_update(tk, TK_CLEAR_NTP...);
|
||||
*
|
||||
* (2) On 32-bit systems, the 64-bit boot offset (tk->offs_boot) may be
|
||||
* partially updated. Since the tk->offs_boot update is a rare event, this
|
||||
* should be a rare occurrence which postprocessing should be able to handle.
|
||||
*/
|
||||
u64 notrace ktime_get_boot_fast_ns(void)
|
||||
{
|
||||
struct timekeeper *tk = &tk_core.timekeeper;
|
||||
|
||||
return (ktime_get_mono_fast_ns() + ktime_to_ns(tk->offs_boot));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);
|
||||
|
||||
/* Suspend-time cycles value for halted fast timekeeper. */
|
||||
static cycle_t cycles_at_suspend;
|
||||
|
||||
|
||||
@@ -890,6 +890,7 @@ static struct {
|
||||
{ trace_clock, "perf", 1 },
|
||||
{ ktime_get_mono_fast_ns, "mono", 1 },
|
||||
{ ktime_get_raw_fast_ns, "mono_raw", 1 },
|
||||
{ ktime_get_boot_fast_ns, "boot", 1 },
|
||||
ARCH_TRACE_CLOCKS
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user