--- /dev/null
+From c4602c1c818bd6626178d6d3fcc152d9f2f48ac0 Mon Sep 17 00:00:00 2001
+From: Miao Xie <miaox@cn.fujitsu.com>
+Date: Mon, 16 Dec 2013 15:20:01 +0800
+Subject: ftrace: Initialize the ftrace profiler for each possible cpu
+
+From: Miao Xie <miaox@cn.fujitsu.com>
+
+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 <debugfs>/tracing/
+ # echo <some function name> >> 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 <debugfs>/tracing/
+ # echo <some function name> >> 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 <miaox@cn.fujitsu.com>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
--- /dev/null
+From 23795e580cad5d6b73d47d51b9074ce3e58bf334 Mon Sep 17 00:00:00 2001
+From: Len Brown <len.brown@intel.com>
+Date: Wed, 26 Sep 2012 22:28:21 -0400
+Subject: intel_idle: enable IVB Xeon support
+
+From: Len Brown <len.brown@intel.com>
+
+commit 23795e580cad5d6b73d47d51b9074ce3e58bf334 upstream.
+
+IVB Xeon currently shares the same parameters IVB client.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Cc: Vinson Lee <vlee@twopensource.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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);
--- /dev/null
+From 6edab08c24f9141d69cfa4683a0a027d86ab303e Mon Sep 17 00:00:00 2001
+From: Len Brown <len.brown@intel.com>
+Date: Fri, 1 Jun 2012 19:45:32 -0400
+Subject: intel_idle: initial IVB support
+
+From: Len Brown <len.brown@intel.com>
+
+commit 6edab08c24f9141d69cfa4683a0a027d86ab303e upstream.
+
+From an OS point of view, IVB looks like SNB, but quicker.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Cc: Vinson Lee <vlee@twopensource.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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);
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