From: Greg Kroah-Hartman Date: Tue, 31 Dec 2013 06:10:09 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.4.76~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34d1bb623357b704bb1f4ccf502ec8b30450d433;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: ftrace-initialize-the-ftrace-profiler-for-each-possible-cpu.patch intel_idle-enable-ivb-xeon-support.patch intel_idle-initial-ivb-support.patch --- diff --git a/queue-3.4/ftrace-initialize-the-ftrace-profiler-for-each-possible-cpu.patch b/queue-3.4/ftrace-initialize-the-ftrace-profiler-for-each-possible-cpu.patch new file mode 100644 index 00000000000..2dde784db2d --- /dev/null +++ b/queue-3.4/ftrace-initialize-the-ftrace-profiler-for-each-possible-cpu.patch @@ -0,0 +1,60 @@ +From c4602c1c818bd6626178d6d3fcc152d9f2f48ac0 Mon Sep 17 00:00:00 2001 +From: Miao Xie +Date: Mon, 16 Dec 2013 15:20:01 +0800 +Subject: ftrace: Initialize the ftrace profiler for each possible cpu + +From: Miao Xie + +commit c4602c1c818bd6626178d6d3fcc152d9f2f48ac0 upstream. + +Ftrace currently initializes only the online CPUs. This implementation has +two problems: +- If we online a CPU after we enable the function profile, and then run the + test, we will lose the trace information on that CPU. + Steps to reproduce: + # echo 0 > /sys/devices/system/cpu/cpu1/online + # cd /tracing/ + # echo >> set_ftrace_filter + # echo 1 > function_profile_enabled + # echo 1 > /sys/devices/system/cpu/cpu1/online + # run test +- If we offline a CPU before we enable the function profile, we will not clear + the trace information when we enable the function profile. It will trouble + the users. + Steps to reproduce: + # cd /tracing/ + # echo >> set_ftrace_filter + # echo 1 > function_profile_enabled + # run test + # cat trace_stat/function* + # echo 0 > /sys/devices/system/cpu/cpu1/online + # echo 0 > function_profile_enabled + # echo 1 > function_profile_enabled + # cat trace_stat/function* + # run test + # cat trace_stat/function* + +So it is better that we initialize the ftrace profiler for each possible cpu +every time we enable the function profile instead of just the online ones. + +Link: http://lkml.kernel.org/r/1387178401-10619-1-git-send-email-miaox@cn.fujitsu.com + +Signed-off-by: Miao Xie +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/ftrace.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -688,7 +688,7 @@ static int ftrace_profile_init(void) + int cpu; + int ret = 0; + +- for_each_online_cpu(cpu) { ++ for_each_possible_cpu(cpu) { + ret = ftrace_profile_init_cpu(cpu); + if (ret) + break; diff --git a/queue-3.4/intel_idle-enable-ivb-xeon-support.patch b/queue-3.4/intel_idle-enable-ivb-xeon-support.patch new file mode 100644 index 00000000000..538d84a0ff6 --- /dev/null +++ b/queue-3.4/intel_idle-enable-ivb-xeon-support.patch @@ -0,0 +1,29 @@ +From 23795e580cad5d6b73d47d51b9074ce3e58bf334 Mon Sep 17 00:00:00 2001 +From: Len Brown +Date: Wed, 26 Sep 2012 22:28:21 -0400 +Subject: intel_idle: enable IVB Xeon support + +From: Len Brown + +commit 23795e580cad5d6b73d47d51b9074ce3e58bf334 upstream. + +IVB Xeon currently shares the same parameters IVB client. + +Signed-off-by: Len Brown +Cc: Vinson Lee +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/idle/intel_idle.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/idle/intel_idle.c ++++ b/drivers/idle/intel_idle.c +@@ -399,6 +399,7 @@ static const struct x86_cpu_id intel_idl + ICPU(0x2a, idle_cpu_snb), + ICPU(0x2d, idle_cpu_snb), + ICPU(0x3a, idle_cpu_ivb), ++ ICPU(0x3e, idle_cpu_ivb), + {} + }; + MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); diff --git a/queue-3.4/intel_idle-initial-ivb-support.patch b/queue-3.4/intel_idle-initial-ivb-support.patch new file mode 100644 index 00000000000..d332de7162d --- /dev/null +++ b/queue-3.4/intel_idle-initial-ivb-support.patch @@ -0,0 +1,79 @@ +From 6edab08c24f9141d69cfa4683a0a027d86ab303e Mon Sep 17 00:00:00 2001 +From: Len Brown +Date: Fri, 1 Jun 2012 19:45:32 -0400 +Subject: intel_idle: initial IVB support + +From: Len Brown + +commit 6edab08c24f9141d69cfa4683a0a027d86ab303e upstream. + +From an OS point of view, IVB looks like SNB, but quicker. + +Signed-off-by: Len Brown +Cc: Vinson Lee +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/idle/intel_idle.c | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +--- a/drivers/idle/intel_idle.c ++++ b/drivers/idle/intel_idle.c +@@ -169,6 +169,38 @@ static struct cpuidle_state snb_cstates[ + .enter = &intel_idle }, + }; + ++static struct cpuidle_state ivb_cstates[MWAIT_MAX_NUM_CSTATES] = { ++ { /* MWAIT C0 */ }, ++ { /* MWAIT C1 */ ++ .name = "C1-IVB", ++ .desc = "MWAIT 0x00", ++ .flags = CPUIDLE_FLAG_TIME_VALID, ++ .exit_latency = 1, ++ .target_residency = 1, ++ .enter = &intel_idle }, ++ { /* MWAIT C2 */ ++ .name = "C3-IVB", ++ .desc = "MWAIT 0x10", ++ .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, ++ .exit_latency = 59, ++ .target_residency = 156, ++ .enter = &intel_idle }, ++ { /* MWAIT C3 */ ++ .name = "C6-IVB", ++ .desc = "MWAIT 0x20", ++ .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, ++ .exit_latency = 80, ++ .target_residency = 300, ++ .enter = &intel_idle }, ++ { /* MWAIT C4 */ ++ .name = "C7-IVB", ++ .desc = "MWAIT 0x30", ++ .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_TLB_FLUSHED, ++ .exit_latency = 87, ++ .target_residency = 300, ++ .enter = &intel_idle }, ++}; ++ + static struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = { + { /* MWAIT C0 */ }, + { /* MWAIT C1 */ +@@ -347,6 +379,10 @@ static const struct idle_cpu idle_cpu_sn + .state_table = snb_cstates, + }; + ++static const struct idle_cpu idle_cpu_ivb = { ++ .state_table = ivb_cstates, ++}; ++ + #define ICPU(model, cpu) \ + { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } + +@@ -362,6 +398,7 @@ static const struct x86_cpu_id intel_idl + ICPU(0x2f, idle_cpu_nehalem), + ICPU(0x2a, idle_cpu_snb), + ICPU(0x2d, idle_cpu_snb), ++ ICPU(0x3a, idle_cpu_ivb), + {} + }; + MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); diff --git a/queue-3.4/series b/queue-3.4/series index ff886e9e129..474ee28e484 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -8,3 +8,6 @@ alsa-add-sndrv_pcm_state_paused-case-in-wait_for_avail-function.patch usb-cdc-wdm-manage_power-should-always-set-needs_remote_wakeup.patch selinux-fix-broken-peer-recv-check.patch selinux-selinux_setprocattr-ptrace_parent-needs-rcu_read_lock.patch +ftrace-initialize-the-ftrace-profiler-for-each-possible-cpu.patch +intel_idle-initial-ivb-support.patch +intel_idle-enable-ivb-xeon-support.patch