From c158582c0fc7f4bd73980fe9adad446855f4d61b Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:19:54 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../perf-x86-fix-RAPL-rdmsrl_safe-usage.patch | 29 ++++++++ ...tel-Use-rdmsrl_safe-when-initializing-RAP.patch | 80 ++++++++++++++++++++++ .../linux/linux-boundary_3.10.17.bbappend | 6 ++ recipes-kernel/linux/linux-keystone_3.10.bbappend | 13 ++++ recipes-kernel/linux/linux-qoriq-sdk.bbappend | 24 +++++++ recipes-kernel/linux/linux-xlnx_3.8.bbappend | 7 ++ recipes-kernel/linux/linux-yocto_3.10.bbappend | 6 ++ recipes-kernel/linux/linux-yocto_3.14.bbappend | 8 +++ 8 files changed, 173 insertions(+) create mode 100644 recipes-kernel/linux/files/perf-x86-fix-RAPL-rdmsrl_safe-usage.patch create mode 100644 recipes-kernel/linux/files/perf-x86-intel-Use-rdmsrl_safe-when-initializing-RAP.patch create mode 100644 recipes-kernel/linux/linux-boundary_3.10.17.bbappend create mode 100644 recipes-kernel/linux/linux-keystone_3.10.bbappend create mode 100644 recipes-kernel/linux/linux-qoriq-sdk.bbappend create mode 100644 recipes-kernel/linux/linux-xlnx_3.8.bbappend create mode 100644 recipes-kernel/linux/linux-yocto_3.10.bbappend create mode 100644 recipes-kernel/linux/linux-yocto_3.14.bbappend (limited to 'recipes-kernel/linux') diff --git a/recipes-kernel/linux/files/perf-x86-fix-RAPL-rdmsrl_safe-usage.patch b/recipes-kernel/linux/files/perf-x86-fix-RAPL-rdmsrl_safe-usage.patch new file mode 100644 index 0000000..058e676 --- /dev/null +++ b/recipes-kernel/linux/files/perf-x86-fix-RAPL-rdmsrl_safe-usage.patch @@ -0,0 +1,29 @@ +From: Stephane Eranian +Date: Wed Apr 23 2014 - 13:04:31 EST +This patch fixes a bug introduced by commit 24223657. + +perf/x86: fix RAPL rdmsrl_safe() usage + +The rdmsrl_safe() function returns 0 on success. +The current code was failing to detect the RAPL PMU +on real hardware (missing /sys/devices/power) because +the return value of rdmsrl_safe() was misinterpreted. + +Signed-off-by: Stephane Eranian +Upstream-Status: Backport [http://lkml.iu.edu/hypermail/linux/kernel/1404.2/05008.html] + +diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c +index 7c87424..619f769 100644 +--- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c ++++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c +@@ -543,7 +543,8 @@ static int rapl_cpu_prepare(int cpu) + if (phys_id < 0) + return -1; + +- if (!rdmsrl_safe(MSR_RAPL_POWER_UNIT, &msr_rapl_power_unit_bits)) ++ /* protect rdmsrl() to handle virtualization */ ++ if (rdmsrl_safe(MSR_RAPL_POWER_UNIT, &msr_rapl_power_unit_bits)) + return -1; + + pmu = kzalloc_node(sizeof(*pmu), GFP_KERNEL, cpu_to_node(cpu)); +-- diff --git a/recipes-kernel/linux/files/perf-x86-intel-Use-rdmsrl_safe-when-initializing-RAP.patch b/recipes-kernel/linux/files/perf-x86-intel-Use-rdmsrl_safe-when-initializing-RAP.patch new file mode 100644 index 0000000..6b29970 --- /dev/null +++ b/recipes-kernel/linux/files/perf-x86-intel-Use-rdmsrl_safe-when-initializing-RAP.patch @@ -0,0 +1,80 @@ +From 24223657806a0ebd0ae5c9caaf7b021091889cf2 Mon Sep 17 00:00:00 2001 +From: Venkatesh Srinivas +Date: Thu, 13 Mar 2014 12:36:26 -0700 +Subject: [PATCH] perf/x86/intel: Use rdmsrl_safe() when initializing RAPL PMU + +CPUs which should support the RAPL counters according to +Family/Model/Stepping may still issue #GP when attempting to access +the RAPL MSRs. This may happen when Linux is running under KVM and +we are passing-through host F/M/S data, for example. Use rdmsrl_safe +to first access the RAPL_POWER_UNIT MSR; if this fails, do not +attempt to use this PMU. + +Signed-off-by: Venkatesh Srinivas +Signed-off-by: Peter Zijlstra +Link: http://lkml.kernel.org/r/1394739386-22260-1-git-send-email-venkateshs@google.com +Cc: zheng.z.yan@intel.com +Cc: eranian@google.com +Cc: ak@linux.intel.com +Cc: linux-kernel@vger.kernel.org +[ The patch also silently fixes another bug: rapl_pmu_init() didn't handle the memory alloc failure case previously. ] +Signed-off-by: Ingo Molnar +Upstream-Status: Backport +--- + arch/x86/kernel/cpu/perf_event_intel_rapl.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c +index 4b9a9e9..7c87424 100644 +--- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c ++++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c +@@ -535,6 +535,7 @@ static int rapl_cpu_prepare(int cpu) + struct rapl_pmu *pmu = per_cpu(rapl_pmu, cpu); + int phys_id = topology_physical_package_id(cpu); + u64 ms; ++ u64 msr_rapl_power_unit_bits; + + if (pmu) + return 0; +@@ -542,6 +543,9 @@ static int rapl_cpu_prepare(int cpu) + if (phys_id < 0) + return -1; + ++ if (!rdmsrl_safe(MSR_RAPL_POWER_UNIT, &msr_rapl_power_unit_bits)) ++ return -1; ++ + pmu = kzalloc_node(sizeof(*pmu), GFP_KERNEL, cpu_to_node(cpu)); + if (!pmu) + return -1; +@@ -555,8 +559,7 @@ static int rapl_cpu_prepare(int cpu) + * + * we cache in local PMU instance + */ +- rdmsrl(MSR_RAPL_POWER_UNIT, pmu->hw_unit); +- pmu->hw_unit = (pmu->hw_unit >> 8) & 0x1FULL; ++ pmu->hw_unit = (msr_rapl_power_unit_bits >> 8) & 0x1FULL; + pmu->pmu = &rapl_pmu_class; + + /* +@@ -677,7 +680,9 @@ static int __init rapl_pmu_init(void) + cpu_notifier_register_begin(); + + for_each_online_cpu(cpu) { +- rapl_cpu_prepare(cpu); ++ ret = rapl_cpu_prepare(cpu); ++ if (ret) ++ goto out; + rapl_cpu_init(cpu); + } + +@@ -700,6 +705,7 @@ static int __init rapl_pmu_init(void) + hweight32(rapl_cntr_mask), + ktime_to_ms(pmu->timer_interval)); + ++out: + put_online_cpus(); + + return 0; +-- +1.9.0 + diff --git a/recipes-kernel/linux/linux-boundary_3.10.17.bbappend b/recipes-kernel/linux/linux-boundary_3.10.17.bbappend new file mode 100644 index 0000000..ab4f6e5 --- /dev/null +++ b/recipes-kernel/linux/linux-boundary_3.10.17.bbappend @@ -0,0 +1,6 @@ +SRC_URI_append = " \ + file://cfg/00023-ikconfig.cfg \ + file://cfg/00029-devtmpfs.cfg \ + file://cfg/00043-containers.cfg \ + file://cfg/00047-bridge.cfg \ + " diff --git a/recipes-kernel/linux/linux-keystone_3.10.bbappend b/recipes-kernel/linux/linux-keystone_3.10.bbappend new file mode 100644 index 0000000..7914b77 --- /dev/null +++ b/recipes-kernel/linux/linux-keystone_3.10.bbappend @@ -0,0 +1,13 @@ +SRC_URI += " \ + file://cfg/00040-9p.cfg \ + file://cfg/00041-virtio.cfg \ + file://cfg/00042-vhost.cfg \ + file://cfg/00043-containers.cfg \ + " + +KERNEL_FEATURES_append = "\ + cfg/00040-9p \ + cfg/00041-virtio \ + cfg/00042-vhost \ + cfg/00043-containers \ +" diff --git a/recipes-kernel/linux/linux-qoriq-sdk.bbappend b/recipes-kernel/linux/linux-qoriq-sdk.bbappend new file mode 100644 index 0000000..4e73fd5 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq-sdk.bbappend @@ -0,0 +1,24 @@ +SRC_URI =+ "\ + file://cfg/00035-netfilter.cfg \ + file://cfg/00036-ppc_virt.cfg \ + file://cfg/00037-ppc_lxc.cfg \ + file://cfg/00040-9p.cfg \ + file://cfg/00041-virtio.cfg \ + file://cfg/00042-vhost.cfg \ + file://cfg/00043-containers.cfg \ + " + +VIRT_FEATURES = "\ + cfg/00035-netfilter \ + cfg/00036-ppc_virt \ + cfg/00037-ppc_lxc \ + cfg/00040-9p \ + cfg/00041-virtio \ + cfg/00042-vhost \ + cfg/00043-containers \ +" + +KERNEL_FEATURES_append_e500v2 = " ${VIRT_FEATURES}" +KERNEL_FEATURES_remove_e500v2 = "cfg/00036-ppc_virt" +KERNEL_FEATURES_append_e500mc = " ${VIRT_FEATURES}" +KERNEL_FEATURES_append_b4860qds-64b = " ${VIRT_FEATURES}" diff --git a/recipes-kernel/linux/linux-xlnx_3.8.bbappend b/recipes-kernel/linux/linux-xlnx_3.8.bbappend new file mode 100644 index 0000000..e4cd65c --- /dev/null +++ b/recipes-kernel/linux/linux-xlnx_3.8.bbappend @@ -0,0 +1,7 @@ +SRC_URI_append = " \ + file://cfg/00035-netfilter.cfg \ + file://cfg/00040-9p.cfg \ + file://cfg/00041-virtio.cfg \ + file://cfg/00042-vhost.cfg \ + file://cfg/00043-containers.cfg \ + " diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend b/recipes-kernel/linux/linux-yocto_3.10.bbappend new file mode 100644 index 0000000..7791d06 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend @@ -0,0 +1,6 @@ +SRC_URI += " \ + file://cfg/00040-9p.cfg \ + file://cfg/00041-virtio.cfg \ + file://cfg/00042-vhost.cfg \ + file://cfg/00043-containers.cfg \ + " diff --git a/recipes-kernel/linux/linux-yocto_3.14.bbappend b/recipes-kernel/linux/linux-yocto_3.14.bbappend new file mode 100644 index 0000000..a9cfb3c --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_3.14.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI += "file://perf-x86-intel-Use-rdmsrl_safe-when-initializing-RAP.patch \ + file://perf-x86-fix-RAPL-rdmsrl_safe-usage.patch \ + file://cfg/00040-9p.cfg \ + file://cfg/00041-virtio.cfg \ + file://cfg/00042-vhost.cfg \ + file://cfg/00043-containers.cfg \ + " -- cgit v1.2.3-54-g00ecf