summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/blktrace/blktrace_git.bb12
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb1
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev_1.6.inc2
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch29
-rw-r--r--meta/recipes-kernel/dtc/dtc.inc8
-rw-r--r--meta/recipes-kernel/dtc/dtc_git.bb4
-rw-r--r--meta/recipes-kernel/kern-tools/kern-tools-native_git.bb2
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools.inc6
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch779
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch34
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch113
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.9.bb (renamed from meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb)9
-rw-r--r--meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb12
-rw-r--r--meta/recipes-kernel/kmod/kmod.inc12
-rw-r--r--meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch27
-rw-r--r--meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch21
-rw-r--r--meta/recipes-kernel/latencytop/latencytop_0.5.bb2
-rw-r--r--meta/recipes-kernel/linux-firmware/linux-firmware_git.bb50
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb7
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb7
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb76
-rw-r--r--meta/recipes-kernel/linux/linux-dummy.bb6
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-dev.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb27
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb7
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb21
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb (renamed from meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb)14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc14
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.10.bb37
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.14.bb23
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.17.bb37
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.19.bb40
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch17
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch252
-rw-r--r--meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch54
-rw-r--r--meta/recipes-kernel/lttng/babeltrace_1.2.4.bb (renamed from meta/recipes-kernel/lttng/babeltrace_1.2.1.bb)10
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch130
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch83
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch46
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch70
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch70
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch113
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch35
-rw-r--r--meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb (renamed from meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb)11
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb (renamed from meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb)13
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch19
-rw-r--r--meta/recipes-kernel/lttng/lttng-ust_2.6.0.bb (renamed from meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb)6
-rw-r--r--meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb3
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc9
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch219
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch31
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch123
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch364
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch5
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch41
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/opstart.patch245
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch134
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_0.9.9.bb17
-rw-r--r--meta/recipes-kernel/oprofile/oprofile_1.0.0.bb13
-rw-r--r--meta/recipes-kernel/perf/perf-features.inc2
-rw-r--r--meta/recipes-kernel/perf/perf.bb25
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.7.bb (renamed from meta/recipes-kernel/powertop/powertop_2.6.1.bb)9
-rw-r--r--meta/recipes-kernel/sysprof/sysprof_git.bb7
-rw-r--r--meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb2
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch22
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch34
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc6
-rw-r--r--meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch30
-rw-r--r--meta/recipes-kernel/trace-cmd/kernelshark_git.bb (renamed from meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb)18
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd.inc12
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch51
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch36
-rw-r--r--meta/recipes-kernel/trace-cmd/trace-cmd_git.bb (renamed from meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb)8
74 files changed, 1410 insertions, 2436 deletions
diff --git a/meta/recipes-kernel/blktrace/blktrace_git.bb b/meta/recipes-kernel/blktrace/blktrace_git.bb
index 7a329934b8..ef9f7376bc 100644
--- a/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -19,6 +19,18 @@ EXTRA_OEMAKE = "\
'CFLAGS=${CFLAGS}' \
'LDFLAGS=${LDFLAGS}' \
"
+
+# There are a few parallel issues:
+# 1) ../rbtree.o: error adding symbols: Invalid operation
+# collect2: error: ld returned 1 exit status
+# Makefile:42: recipe for target 'btt' failed
+# 2) git/blkiomon.c:216: undefined reference to `rb_insert_color'
+# collect2: error: ld returned 1 exit status
+# Makefile:27: recipe for target 'blkparse' failed
+# 3) ld: rbtree.o: invalid string offset 128 >= 125 for section `.strtab'
+# 4) btreplay.o: file not recognized: File truncated
+# collect2: error: ld returned 1 exit status
+# btreplay/btreplay.c:47:18: fatal error: list.h: No such file or directory
PARALLEL_MAKE = ""
do_install() {
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb
index df50e5a1c6..e6b10257f0 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb
@@ -10,6 +10,7 @@ DEPENDS += "cryptodev-linux"
SRC_URI += " \
file://0001-Disable-installing-header-file-provided-by-another-p.patch \
file://0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch \
+file://0001-ioctl.c-Fix-build-on-3.19.patch \
"
EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
diff --git a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
index 946faac7d2..6a93a35a39 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
+++ b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc
@@ -9,3 +9,5 @@ SRC_URI[md5sum] = "eade38998313c25fd7934719cdf8a2ea"
SRC_URI[sha256sum] = "75f1425c8ea1f8cae523905a5a046a35092327a6152800b0b86efc4e56fb3e2f"
S = "${WORKDIR}/cryptodev-linux-${PV}"
+
+CLEANBROKEN = "1"
diff --git a/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch b/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch
new file mode 100644
index 0000000000..74c8972536
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch
@@ -0,0 +1,29 @@
+From 7d71124991030f99965e6e6aaed421115f185adb Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Mon, 9 Feb 2015 13:51:56 +0100
+Subject: [PATCH] ioctl.c: Fix build on 3.19
+
+get_unused_fd() MACRO has been removed on kernel 3.19. Replace by the
+actual output of the macro.
+
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+---
+ ioctl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ioctl.c b/ioctl.c
+index f26cf93..cf8cc17 100644
+--- a/ioctl.c
++++ b/ioctl.c
+@@ -529,7 +529,7 @@ static int
+ clonefd(struct file *filp)
+ {
+ int ret;
+- ret = get_unused_fd();
++ ret = get_unused_fd_flags(0);
+ if (ret >= 0) {
+ get_file(filp);
+ fd_install(ret, filp);
+--
+2.1.4
+
diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc
index 95023b6e97..0c409b0c0b 100644
--- a/meta/recipes-kernel/dtc/dtc.inc
+++ b/meta/recipes-kernel/dtc/dtc.inc
@@ -4,16 +4,18 @@ SECTION = "bootloader"
LICENSE = "GPLv2 | BSD"
DEPENDS = "flex-native bison-native"
-inherit autotools-brokensep
-
SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git \
file://make_install.patch \
"
-EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}"'
+EXTRA_OEMAKE='PREFIX="${prefix}" LIBDIR="${libdir}" DESTDIR="${D}"'
S = "${WORKDIR}/git"
+do_install () {
+ oe_runmake install
+}
+
PACKAGES =+ "${PN}-misc"
FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff"
diff --git a/meta/recipes-kernel/dtc/dtc_git.bb b/meta/recipes-kernel/dtc/dtc_git.bb
index 0bd3acf6c0..4446142a30 100644
--- a/meta/recipes-kernel/dtc/dtc_git.bb
+++ b/meta/recipes-kernel/dtc/dtc_git.bb
@@ -3,8 +3,8 @@ require dtc.inc
LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c"
-SRCREV = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf"
-PV = "1.4.0+git${SRCPV}"
+SRCREV = "302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2"
+PV = "1.4.1+git${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index ce872354f2..a1ec198fde 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70c
DEPENDS = "git-native"
-SRCREV = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff"
+SRCREV = "83e5493ea46067152609008ade131971eaebbb27"
PR = "r12"
PV = "0.2+git${SRCPV}"
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc
index 7e3b7adfc7..7797a25738 100644
--- a/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -10,9 +10,11 @@ DEPENDS = "zlib xz"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz"
-inherit autotools-brokensep
+PR = "r1"
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)'
+inherit autotools
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|freebsd.*)'
INSANE_SKIP_${PN} = "arch"
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
new file mode 100644
index 0000000000..92b5631f78
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
@@ -0,0 +1,779 @@
+From: Geoff Levand <geoff@infradead.org>
+Date: Mon, 15 Jul 2013 23:32:36 +0000 (-0700)
+Subject: Add arm64 support
+X-Git-Url: https://git.linaro.org/gitweb?p=people%2Fgeoff%2Fkexec-tools.git;a=commitdiff_plain;h=fbf5ac6c2c70ec0f6da2b9ff563e573999752c01
+
+Add arm64 support
+
+Signed-off-by: Geoff Levand <geoff@infradead.org>
+
+Get patch from:
+https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+
+---
+ configure.ac | 3
+ kexec/Makefile | 1
+ kexec/arch/arm64/Makefile | 13 +
+ kexec/arch/arm64/crashdump-arm64.c | 305 ++++++++++++++++++++++++++++++++
+ kexec/arch/arm64/include/arch/options.h | 26 ++
+ kexec/arch/arm64/kexec-arm64.c | 177 ++++++++++++++++++
+ kexec/arch/arm64/kexec-arm64.h | 20 ++
+ kexec/arch/arm64/kexec-elf-arm64.c | 114 +++++++++++
+ kexec/kexec-syscall.h | 9
+ kexec/kexec.c | 2
+ purgatory/arch/arm64/Makefile | 7
+ 11 files changed, 675 insertions(+), 2 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,6 +35,9 @@ case $target_cpu in
+ ARCH="ppc64"
+ SUBARCH="LE"
+ ;;
++ aarch64* )
++ ARCH="arm64"
++ ;;
+ arm* )
+ ARCH="arm"
+ ;;
+--- a/kexec/Makefile
++++ b/kexec/Makefile
+@@ -71,6 +71,7 @@ KEXEC_SRCS += $($(ARCH)_FS2DT)
+
+ include $(srcdir)/kexec/arch/alpha/Makefile
+ include $(srcdir)/kexec/arch/arm/Makefile
++include $(srcdir)/kexec/arch/arm64/Makefile
+ include $(srcdir)/kexec/arch/i386/Makefile
+ include $(srcdir)/kexec/arch/ia64/Makefile
+ include $(srcdir)/kexec/arch/m68k/Makefile
+--- /dev/null
++++ b/kexec/arch/arm64/Makefile
+@@ -0,0 +1,13 @@
++
++arm64_KEXEC_SRCS += \
++ kexec/arch/arm64/kexec-arm64.c \
++ kexec/arch/arm64/kexec-elf-arm64.c \
++ kexec/arch/arm64/crashdump-arm64.c
++
++arm64_ARCH_REUSE_INITRD =
++arm64_ADD_SEGMENT =
++arm64_VIRT_TO_PHYS =
++
++dist += $(arm64_KEXEC_SRCS) \
++ kexec/arch/arm64/Makefile \
++ kexec/arch/arm64/kexec-arm64.h
+--- /dev/null
++++ b/kexec/arch/arm64/crashdump-arm64.c
+@@ -0,0 +1,305 @@
++/*
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation (version 2 of the License).
++ */
++
++#include "../../kexec.h"
++#include "../../kexec-elf.h"
++#include "../../crashdump.h"
++
++int is_crashkernel_mem_reserved(void)
++{
++ return 0;
++}
++
++#if 0
++/*
++ * Used to save various memory ranges/regions needed for the captured
++ * kernel to boot. (lime memmap= option in other archs)
++ */
++static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
++struct memory_ranges usablemem_rgns = {
++ .size = 0,
++ .ranges = crash_memory_ranges,
++};
++
++/* memory range reserved for crashkernel */
++static struct memory_range crash_reserved_mem;
++
++static struct crash_elf_info elf_info = {
++ .class = ELFCLASS32,
++ .data = ELFDATA2LSB,
++ .machine = EM_ARM,
++ .page_offset = PAGE_OFFSET,
++};
++
++unsigned long phys_offset;
++
++/**
++ * crash_range_callback() - callback called for each iomem region
++ * @data: not used
++ * @nr: not used
++ * @str: name of the memory region
++ * @base: start address of the memory region
++ * @length: size of the memory region
++ *
++ * This function is called once for each memory region found in /proc/iomem. It
++ * locates system RAM and crashkernel reserved memory and places these to
++ * variables: @crash_memory_ranges and @crash_reserved_mem. Number of memory
++ * regions is placed in @crash_memory_nr_ranges.
++ */
++static int crash_range_callback(void *UNUSED(data), int UNUSED(nr),
++ char *str, unsigned long base,
++ unsigned long length)
++{
++ struct memory_range *range;
++
++ if (usablemem_rgns.size >= CRASH_MAX_MEMORY_RANGES)
++ return 1;
++
++ range = usablemem_rgns.ranges + usablemem_rgns.size;
++
++ if (strncmp(str, "System RAM\n", 11) == 0) {
++ range->start = base;
++ range->end = base + length - 1;
++ range->type = RANGE_RAM;
++ usablemem_rgns.size++;
++ } else if (strncmp(str, "Crash kernel\n", 13) == 0) {
++ crash_reserved_mem.start = base;
++ crash_reserved_mem.end = base + length - 1;
++ crash_reserved_mem.type = RANGE_RAM;
++ }
++
++ return 0;
++}
++
++/**
++ * crash_exclude_range() - excludes memory region reserved for crashkernel
++ *
++ * Function locates where crashkernel reserved memory is and removes that region
++ * from the available memory regions.
++ */
++static void crash_exclude_range(void)
++{
++ const struct memory_range *range = &crash_reserved_mem;
++ int i;
++
++ for (i = 0; i < usablemem_rgns.size; i++) {
++ struct memory_range *r = usablemem_rgns.ranges + i;
++
++ /*
++ * We assume that crash area is fully contained in
++ * some larger memory area.
++ */
++ if (r->start <= range->start && r->end >= range->end) {
++ struct memory_range *new;
++ /*
++ * Let's split this area into 2 smaller ones and
++ * remove excluded range from between. First create
++ * new entry for the remaining area.
++ */
++ new = usablemem_rgns.ranges + usablemem_rgns.size;
++ new->start = range->end + 1;
++ new->end = r->end;
++ usablemem_rgns.size++;
++ /*
++ * Next update this area to end before excluded range.
++ */
++ r->end = range->start - 1;
++ break;
++ }
++ }
++}
++
++static int range_cmp(const void *a1, const void *a2)
++{
++ const struct memory_range *r1 = a1;
++ const struct memory_range *r2 = a2;
++
++ if (r1->start > r2->start)
++ return 1;
++ if (r1->start < r2->start)
++ return -1;
++
++ return 0;
++}
++
++/**
++ * crash_get_memory_ranges() - read system physical memory
++ *
++ * Function reads through system physical memory and stores found memory regions
++ * in @crash_memory_ranges. Number of memory regions found is placed in
++ * @crash_memory_nr_ranges. Regions are sorted in ascending order.
++ *
++ * Returns %0 in case of success and %-1 otherwise (errno is set).
++ */
++static int crash_get_memory_ranges(void)
++{
++ /*
++ * First read all memory regions that can be considered as
++ * system memory including the crash area.
++ */
++ kexec_iomem_for_each_line(NULL, crash_range_callback, NULL);
++
++ if (usablemem_rgns.size < 1) {
++ errno = EINVAL;
++ return -1;
++ }
++
++ /*
++ * Exclude memory reserved for crashkernel (this may result a split memory
++ * region).
++ */
++ crash_exclude_range();
++
++ /*
++ * Make sure that the memory regions are sorted.
++ */
++ qsort(usablemem_rgns.ranges, usablemem_rgns.size,
++ sizeof(*usablemem_rgns.ranges), range_cmp);
++
++ return 0;
++}
++
++/**
++ * cmdline_add_elfcorehdr() - adds elfcorehdr= to @cmdline
++ * @cmdline: buffer where parameter is placed
++ * @elfcorehdr: physical address of elfcorehdr
++ *
++ * Function appends 'elfcorehdr=start' at the end of the command line given in
++ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
++ * (inclunding %NUL).
++ */
++static void cmdline_add_elfcorehdr(char *cmdline, unsigned long elfcorehdr)
++{
++ char buf[COMMAND_LINE_SIZE];
++ int buflen;
++
++ buflen = snprintf(buf, sizeof(buf), "%s elfcorehdr=%#lx",
++ cmdline, elfcorehdr);
++ if (buflen < 0)
++ die("Failed to construct elfcorehdr= command line parameter\n");
++ if (buflen >= sizeof(buf))
++ die("Command line overflow\n");
++
++ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
++ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
++}
++
++/**
++ * cmdline_add_mem() - adds mem= parameter to kernel command line
++ * @cmdline: buffer where parameter is placed
++ * @size: size of the kernel reserved memory (in bytes)
++ *
++ * This function appends 'mem=size' at the end of the command line given in
++ * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long
++ * (including %NUL).
++ */
++static void cmdline_add_mem(char *cmdline, unsigned long size)
++{
++ char buf[COMMAND_LINE_SIZE];
++ int buflen;
++
++ buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK", cmdline, size >> 10);
++ if (buflen < 0)
++ die("Failed to construct mem= command line parameter\n");
++ if (buflen >= sizeof(buf))
++ die("Command line overflow\n");
++
++ (void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
++ cmdline[COMMAND_LINE_SIZE - 1] = '\0';
++}
++
++static unsigned long long range_size(const struct memory_range *r)
++{
++ return r->end - r->start + 1;
++}
++
++static void dump_memory_ranges(void)
++{
++ int i;
++
++ if (!kexec_debug)
++ return;
++
++ dbgprintf("crashkernel: [%#llx - %#llx] (%ldM)\n",
++ crash_reserved_mem.start, crash_reserved_mem.end,
++ (unsigned long)range_size(&crash_reserved_mem) >> 20);
++
++ for (i = 0; i < usablemem_rgns.size; i++) {
++ struct memory_range *r = usablemem_rgns.ranges + i;
++ dbgprintf("memory range: [%#llx - %#llx] (%ldM)\n",
++ r->start, r->end, (unsigned long)range_size(r) >> 20);
++ }
++}
++
++/**
++ * load_crashdump_segments() - loads additional segments needed for kdump
++ * @info: kexec info structure
++ * @mod_cmdline: kernel command line
++ *
++ * This function loads additional segments which are needed for the dump capture
++ * kernel. It also updates kernel command line passed in @mod_cmdline to have
++ * right parameters for the dump capture kernel.
++ *
++ * Return %0 in case of success and %-1 in case of error.
++ */
++int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
++{
++ unsigned long elfcorehdr;
++ unsigned long bufsz;
++ void *buf;
++ int err;
++
++ /*
++ * First fetch all the memory (RAM) ranges that we are going to pass to
++ * the crashdump kernel during panic.
++ */
++ err = crash_get_memory_ranges();
++ if (err)
++ return err;
++
++ /*
++ * Now that we have memory regions sorted, we can use first memory
++ * region as PHYS_OFFSET.
++ */
++ phys_offset = usablemem_rgns.ranges->start;
++ dbgprintf("phys_offset: %#lx\n", phys_offset);
++
++ err = crash_create_elf32_headers(info, &elf_info,
++ usablemem_rgns.ranges,
++ usablemem_rgns.size, &buf, &bufsz,
++ ELF_CORE_HEADER_ALIGN);
++ if (err)
++ return err;
++
++ /*
++ * We allocate ELF core header from the end of the memory area reserved
++ * for the crashkernel. We align the header to SECTION_SIZE (which is
++ * 1MB) so that available memory passed in kernel command line will be
++ * aligned to 1MB. This is because kernel create_mapping() wants memory
++ * regions to be aligned to SECTION_SIZE.
++ */
++ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
++ crash_reserved_mem.start,
++ crash_reserved_mem.end, -1, 0);
++
++ dbgprintf("elfcorehdr: %#lx\n", elfcorehdr);
++ cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
++
++ /*
++ * Add 'mem=size' parameter to dump capture kernel command line. This
++ * prevents the dump capture kernel from using any other memory regions
++ * which belong to the primary kernel.
++ */
++ cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start);
++
++ dump_memory_ranges();
++ dbgprintf("kernel command line: \"%s\"\n", mod_cmdline);
++
++ return 0;
++}
++
++#endif
++
+--- /dev/null
++++ b/kexec/arch/arm64/include/arch/options.h
+@@ -0,0 +1,26 @@
++#ifndef KEXEC_ARCH_ARM64_OPTIONS_H
++#define KEXEC_ARCH_ARM64_OPTIONS_H
++
++//#define OPT_ARCH_MAX ((OPT_MAX)+0)
++
++#define OPT_APPEND ((OPT_MAX)+0)
++#define OPT_RAMDISK ((OPT_MAX)+1)
++#define OPT_DTB ((OPT_MAX)+2)
++
++#define OPT_ARCH_MAX ((OPT_MAX)+3)
++
++
++#define KEXEC_ARCH_OPTIONS \
++ KEXEC_OPTIONS \
++ { "append", 1, NULL, OPT_APPEND }, \
++ { "command-line", 1, NULL, OPT_APPEND }, \
++ { "dtb", 1, NULL, OPT_DTB }, \
++ { "initrd", 1, NULL, OPT_RAMDISK }, \
++ { "ramdisk", 1, NULL, OPT_RAMDISK }, \
++
++#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR /* Only accept long arch options. */
++
++#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS
++#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR
++
++#endif /* KEXEC_ARCH_ARM64_OPTIONS_H */
+--- /dev/null
++++ b/kexec/arch/arm64/kexec-arm64.c
+@@ -0,0 +1,177 @@
++/*
++ * ARM64 kexec support.
++ */
++
++#define _GNU_SOURCE
++
++#include <errno.h>
++#include <stddef.h>
++
++//#include <linux/kexec.h>
++
++#include "../../kexec.h"
++#include "../../kexec-syscall.h"
++#include "kexec-arm64.h"
++
++
++void arch_usage(void)
++{
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++
++ printf(
++" --append=STRING Set the kernel command line to STRING.\n"
++" --command-line=STRING Set the kernel command line to STRING.\n"
++" --dtb=FILE Use FILE as the device tree blob.\n"
++" --initrd=FILE Use FILE as the kernel initial ramdisk.\n"
++" --ramdisk=FILE Use FILE as the kernel initial ramdisk.\n");
++
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++}
++
++int arch_process_options(int UNUSED(argc), char **UNUSED(argv))
++{
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++ return 0;
++}
++
++const struct arch_map_entry arches[] = {
++ { "aarch64", KEXEC_ARCH_ARM64 },
++ { NULL, 0 },
++};
++
++void arch_update_purgatory(struct kexec_info *UNUSED(info))
++{
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++}
++
++unsigned long virt_to_phys(unsigned long addr)
++{
++ fprintf(stderr, "%s:%d: %016lx -> %016lx\n", __func__, __LINE__, addr,
++ addr + 0x080000000UL);
++ return addr + 0x080000000UL;
++}
++
++void add_segment(struct kexec_info *info, const void *buf, size_t bufsz,
++ unsigned long base, size_t memsz)
++{
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++ add_segment_phys_virt(info, buf, bufsz, base, memsz, 1);
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++}
++
++static int get_memory_ranges_1(struct memory_range **range, int *ranges,
++ unsigned long kexec_flags)
++{
++ static struct memory_range memory_range[KEXEC_SEGMENT_MAX];
++ const char *iomem;
++ int range_count = 0;
++ char line[MAX_LINE];
++ FILE *fp;
++
++ iomem = proc_iomem();
++ fp = fopen(iomem, "r");
++
++ if (!fp) {
++ fprintf(stderr, "Cannot open %s: %s\n",
++ iomem, strerror(errno));
++ return -1;
++ }
++
++ dbgprintf("memory ranges:\n");
++
++ while(fgets(line, sizeof(line), fp) != 0) {
++ struct memory_range r;
++ char *str;
++ int consumed;
++
++ if (range_count >= KEXEC_SEGMENT_MAX)
++ break;
++
++ if (sscanf(line, "%Lx-%Lx : %n", &r.start, &r.end, &consumed)
++ != 2)
++ continue;
++
++ str = line + consumed;
++ r.end++;
++
++ if (memcmp(str, "System RAM\n", 11)) {
++ dbgprintf(" Skip: %016Lx - %016Lx : %s", r.start, r.end,
++ str);
++ continue;
++ }
++
++ r.type = RANGE_RAM;
++ memory_range[range_count] = r;
++ range_count++;
++
++ dbgprintf(" Add: %016Lx - %016Lx : %s", r.start, r.end, str);
++ }
++
++ fclose(fp);
++ *range = memory_range;
++ *ranges = range_count;
++
++ return 0;
++}
++
++static int get_memory_ranges_2(struct memory_range **range, int *ranges,
++ unsigned long UNUSED(kexec_flags))
++{
++ static struct memory_range memory_range[2];
++
++ memory_range[0].start = 0x080000000;
++ memory_range[0].end = 0x100000000;
++ memory_range[0].type = RANGE_RAM;
++
++ memory_range[1].start = 0x900000000;
++ memory_range[1].end = 0x880000000;
++ memory_range[1].type = RANGE_RAM;
++
++ *range = memory_range;
++ *ranges = sizeof(memory_range) / sizeof(memory_range[0]);
++
++ return 0;
++}
++
++int get_memory_ranges(struct memory_range **range, int *ranges,
++ unsigned long kexec_flags)
++{
++ /* FIXME: Should get this info from device tree. */
++
++ return get_memory_ranges_1(range, ranges, kexec_flags);
++}
++
++struct file_type file_type[] = {
++ { "elf-arm64", elf_arm64_probe, elf_arm64_load, elf_arm64_usage },
++};
++
++int file_types = sizeof(file_type) / sizeof(file_type[0]);
++
++int arch_compat_trampoline(struct kexec_info *info)
++{
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++ return 0;
++}
++
++void arch_reuse_initrd(void)
++{
++}
++
++int machine_verify_elf_rel(struct mem_ehdr *ehdr)
++{
++ (void)ehdr;
++
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++ return 0;
++}
++
++void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type,
++ void *location, unsigned long address, unsigned long value)
++{
++ (void)ehdr;
++ (void)r_type;
++ (void)location;
++ (void)address;
++ (void)value;
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++}
+--- /dev/null
++++ b/kexec/arch/arm64/kexec-arm64.h
+@@ -0,0 +1,20 @@
++/*
++ * ARM64 kexec support.
++ */
++
++#if !defined(KEXEC_ARM64_H)
++#define KEXEC_ARM64_H
++
++/* #include <linux/kexec.h> FIXME: this is broken */
++#include <sys/types.h>
++
++#include "../../kexec.h"
++
++#define KEXEC_SEGMENT_MAX 16 /* FIXME: this should come from <linux/kexec.h> */
++
++int elf_arm64_probe(const char *buf, off_t len);
++int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
++ struct kexec_info *info);
++void elf_arm64_usage(void);
++
++#endif
+\ No newline at end of file
+--- /dev/null
++++ b/kexec/arch/arm64/kexec-elf-arm64.c
+@@ -0,0 +1,114 @@
++/*
++ * ARM64 kexec support.
++ */
++
++#define _GNU_SOURCE
++
++#include <elf.h>
++#include <getopt.h>
++
++#include "../../kexec-syscall.h"
++
++#include "kexec-arm64.h"
++#include "arch/options.h"
++
++#if !defined(EM_AARCH64)
++# define EM_AARCH64 183
++#endif
++
++int elf_arm64_probe(const char *buf, off_t len)
++{
++ int result;
++ struct mem_ehdr ehdr;
++
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++
++ result = build_elf_exec_info(buf, len, &ehdr, 0);
++
++ if (result < 0) {
++ dbgprintf("Not an ELF executable\n");
++ goto out;
++ }
++
++ if (ehdr.e_machine != EM_AARCH64) {
++ dbgprintf("Not an AARCH64 executable\n");
++ result = -1;
++ goto out;
++ }
++
++ result = 0;
++
++out:
++ free_elf_info(&ehdr);
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++ return result;
++}
++
++int elf_arm64_load(int argc, char **argv, const char *buf, off_t len,
++ struct kexec_info *info)
++{
++ static const struct option options[] = {
++ KEXEC_ARCH_OPTIONS
++ { 0 }
++ };
++ static const char short_options[] = KEXEC_OPT_STR "";
++ const char *command_line = NULL;
++ unsigned int command_line_len = 0;
++ const char *ramdisk = NULL;
++ const char *dtb = NULL;
++ int opt;
++ struct mem_ehdr ehdr;
++ int result;
++
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++
++ while ((opt = getopt_long(argc, argv, short_options, options, 0))
++ != -1) {
++ switch (opt) {
++ default:
++ if (opt < OPT_MAX) /* Ignore core options */
++ break;
++ case OPT_APPEND:
++ command_line = optarg;
++ command_line_len = strlen(command_line) + 1;
++ break;
++ case OPT_RAMDISK:
++ ramdisk = optarg;
++ break;
++ case OPT_DTB:
++ dtb = optarg;
++ break;
++ }
++ }
++
++ fprintf(stderr, "%s:%d: command_line: %s\n", __func__, __LINE__, command_line);
++ fprintf(stderr, "%s:%d: ramdisk: %s\n", __func__, __LINE__, ramdisk);
++ fprintf(stderr, "%s:%d: dtb: %s\n", __func__, __LINE__, dtb);
++
++ if (info->kexec_flags & KEXEC_ON_CRASH) {
++ fprintf(stderr, "kexec: kdump not yet supported on arm64\n");
++ return -1;
++ }
++
++ result = build_elf_exec_info(buf, len, &ehdr, 0);
++
++ if (result < 0) {
++ free_elf_info(&ehdr);
++ fprintf(stderr, "%s:%d: free_elf_info failed\n", __func__,
++ __LINE__);
++ return result;
++ }
++
++ elf_exec_build_load(info, &ehdr, buf, len, 0);
++
++ info->entry = (void*)0x80080000UL; // FIXME
++
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++ return 0;
++}
++
++void elf_arm64_usage(void)
++{
++ fprintf(stderr, "%s:%d: ->\n", __func__, __LINE__);
++ fprintf(stderr, "%s:%d: <-\n", __func__, __LINE__);
++}
+--- a/kexec/kexec-syscall.h
++++ b/kexec/kexec-syscall.h
+@@ -39,8 +39,8 @@
+ #ifdef __s390__
+ #define __NR_kexec_load 277
+ #endif
+-#ifdef __arm__
+-#define __NR_kexec_load __NR_SYSCALL_BASE + 347
++#if defined(__arm__) || defined(__arm64__)
++#define __NR_kexec_load __NR_SYSCALL_BASE + 347
+ #endif
+ #if defined(__mips__)
+ #define __NR_kexec_load 4311
+@@ -108,6 +108,8 @@ static inline long kexec_file_load(int k
+ #define KEXEC_ARCH_PPC64 (21 << 16)
+ #define KEXEC_ARCH_IA_64 (50 << 16)
+ #define KEXEC_ARCH_ARM (40 << 16)
++#define KEXEC_ARCH_ARM64 (183 << 16)
++/* #define KEXEC_ARCH_AARCH64 (183 << 16) */
+ #define KEXEC_ARCH_S390 (22 << 16)
+ #define KEXEC_ARCH_SH (42 << 16)
+ #define KEXEC_ARCH_MIPS_LE (10 << 16)
+@@ -153,5 +155,8 @@ static inline long kexec_file_load(int k
+ #ifdef __m68k__
+ #define KEXEC_ARCH_NATIVE KEXEC_ARCH_68K
+ #endif
++#if defined(__arm64__)
++#define KEXEC_ARCH_NATIVE KEXEC_ARCH_ARM64
++#endif
+
+ #endif /* KEXEC_SYSCALL_H */
+--- a/kexec/kexec.c
++++ b/kexec/kexec.c
+@@ -664,6 +664,8 @@ static int my_load(const char *type, int
+ memset(&info, 0, sizeof(info));
+ info.kexec_flags = kexec_flags;
+
++ fprintf(stderr, "%s:%d: do\n", __func__, __LINE__);
++
+ result = 0;
+ if (argc - fileind <= 0) {
+ fprintf(stderr, "No kernel specified\n");
+--- /dev/null
++++ b/purgatory/arch/arm64/Makefile
+@@ -0,0 +1,7 @@
++#
++# Purgatory arm64
++#
++
++arm64_PURGATORY_SRCS =
++
++dist += purgatory/arch/arm64/Makefile $(arm64_PURGATORY_SRCS)
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch
index ab1fe96db2..8bb4fc49ad 100644
--- a/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch
+++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch
@@ -46,37 +46,3 @@ index 4121c7d..cc04b04 100644
return strcmp(str1, str2);
}
-diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
-index 5e6b98d..1c0345b 100644
---- a/kexec/fs2dt.c
-+++ b/kexec/fs2dt.c
-@@ -475,6 +475,9 @@ static int comparefunc(const struct dirent **dentry1,
- {
- char *str1 = (*(struct dirent **)dentry1)->d_name;
- char *str2 = (*(struct dirent **)dentry2)->d_name;
-+ char* ptr1 = strchr(str1, '@');
-+ char* ptr2 = strchr(str2, '@');
-+ int len1, len2;
-
- /*
- * strcmp scans from left to right and fails to idetify for some
-@@ -482,9 +485,13 @@ static int comparefunc(const struct dirent **dentry1,
- * Therefore, we get the wrong sorted order like memory@10000000 and
- * memory@f000000.
- */
-- if (strchr(str1, '@') && strchr(str2, '@') &&
-- (strlen(str1) > strlen(str2)))
-- return 1;
-+ if (ptr1 && ptr2) {
-+ len1 = ptr1 - str1;
-+ len2 = ptr2 - str2;
-+ if (!strncmp(str1, str2, len1 >len2 ? len1: len2) &&
-+ (strlen(str1) > strlen(str2)))
-+ return 1;
-+ }
-
- return strcmp(str1, str2);
- }
---
-1.7.9.5
-
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch b/meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch
new file mode 100644
index 0000000000..0bd3264af7
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/kexec-x32.patch
@@ -0,0 +1,113 @@
+x86_64: Add support to build kexec-tools with x32 ABI
+
+Summary of changes,
+
+configure.ac: Add test for detect x32 ABI.
+purgatory/arch/x86_64/Makefile: Not use mcmodel large when
+ x32 ABI is set.
+kexec/arch/x86_64/kexec-elf-rel-x86_64.c: When x32 ABI is set
+ use ELFCLASS32 instead of ELFCLASS64.
+kexec/kexec-syscall.h: Add correct syscall number for x32 ABI.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
+
+---
+ configure.ac | 9 +++++++++
+ kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 4 ++++
+ kexec/kexec-syscall.h | 4 ++++
+ purgatory/arch/x86_64/Makefile | 4 +++-
+ 4 files changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c410e90..1ecadd5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,6 +52,15 @@ case $target_cpu in
+ ;;
+ ia64|x86_64|alpha|m68k )
+ ARCH="$target_cpu"
++
++ dnl ---Test for x32 ABI in x86_64
++ if test "x$ARCH" = "xx86_64" ; then
++ AC_EGREP_CPP(x32_test,
++ [#if defined(__x86_64__) && defined (__ILP32__)
++ x32_test
++ #endif
++ ], SUBARCH='x32', SUBARCH='64')
++ fi
+ ;;
+ * )
+ AC_MSG_ERROR([unsupported architecture $target_cpu])
+diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+index c795037..06db7f0 100644
+--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
++++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
+@@ -8,7 +8,11 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr)
+ if (ehdr->ei_data != ELFDATA2LSB) {
+ return 0;
+ }
++#ifdef __ILP32__
++ if (ehdr->ei_class != ELFCLASS32) {
++#else
+ if (ehdr->ei_class != ELFCLASS64) {
++#endif
+ return 0;
+ }
+ if (ehdr->e_machine != EM_X86_64) {
+diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
+index ce2e20b..cab5535 100644
+--- a/kexec/kexec-syscall.h
++++ b/kexec/kexec-syscall.h
+@@ -31,8 +31,12 @@
+ #define __NR_kexec_load 268
+ #endif
+ #ifdef __x86_64__
++#ifdef __ILP32__
++#define __NR_kexec_load 528
++#else
+ #define __NR_kexec_load 246
+ #endif
++#endif
+ #ifdef __s390x__
+ #define __NR_kexec_load 277
+ #endif
+diff --git a/purgatory/arch/x86_64/Makefile b/purgatory/arch/x86_64/Makefile
+index 7300937..4af11e4 100644
+--- a/purgatory/arch/x86_64/Makefile
++++ b/purgatory/arch/x86_64/Makefile
+@@ -23,4 +23,6 @@ x86_64_PURGATORY_SRCS += purgatory/arch/i386/console-x86.c
+ x86_64_PURGATORY_SRCS += purgatory/arch/i386/vga.c
+ x86_64_PURGATORY_SRCS += purgatory/arch/i386/pic.c
+
+-x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
++ifeq ($(SUBARCH),64)
++ x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
++endif
+--
+1.8.4.5
+
+diff --git a/configure.ac b/configure.ac
+index 1ecadd5..e0b5f78 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,6 +8,7 @@ AC_INIT(kexec-tools, 2.0.10.git)
+ AC_CONFIG_AUX_DIR(./config)
+ AC_CONFIG_HEADERS([include/config.h])
+ AC_LANG(C)
++AC_PROG_CC
+
+ AC_DEFINE_UNQUOTED(PACKAGE_DATE, "`date '+%d %B %Y'`",
+ [Define to the release date of this package])
+@@ -106,9 +107,6 @@ AC_ARG_WITH([booke],
+
+ dnl ---Programs
+ dnl To specify a different compiler, just 'export CC=/path/to/compiler'
+-
+-AC_PROG_CC
+-
+ if test "${build}" != "${host}" ; then
+ AC_CHECK_PROGS(BUILD_CC, [${build_alias}-gcc ${build}-gcc gcc])
+ else
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.9.bb
index f0ece0d45b..36e4c15364 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.7.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.9.bb
@@ -2,10 +2,13 @@ require kexec-tools.inc
export LDFLAGS = "-L${STAGING_LIBDIR}"
EXTRA_OECONF = " --with-zlib=yes"
-SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch"
+SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
+ file://kexec-aarch64.patch \
+ file://kexec-x32.patch \
+ "
-SRC_URI[md5sum] = "2309ba43981cb6d39d07ac3a9aac30ab"
-SRC_URI[sha256sum] = "dde5c38be39882c6c91f0129647349c4e1943b077d3020af1970b481ee954eb0"
+SRC_URI[md5sum] = "4ecb7ab7ad9eb6ce413899bdb07a8426"
+SRC_URI[sha256sum] = "c2c6d204fe0911ebd304c40100163237feca4c5a854a2cca382ee36916a573d8"
PACKAGES =+ "kexec kdump vmcore-dmesg"
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index ec20bf8d30..44b7650e4e 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -19,21 +19,21 @@ if [ "\$1" != "-a" -o "\$2" != "-b" ]; then
echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2
exit 1
fi
-if [ ! -r ${STAGING_KERNEL_DIR}/kernel-abiversion ]; then
- echo "Unable to read: ${STAGING_KERNEL_DIR}/kernel-abiversion" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2
else
- kernelabi=\$(cat ${STAGING_KERNEL_DIR}/kernel-abiversion)
+ kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion)
if [ "\$kernelabi" != "\$4" ]; then
echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2
exit 1
fi
fi
-if [ ! -r ${STAGING_KERNEL_DIR}/System.map-\$4 ]; then
- echo "Unable to read: ${STAGING_KERNEL_DIR}/System.map-\$4" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
exec env depmod "\$1" "\$2" "\$3" "\$4"
else
- exec env depmod "\$1" "\$2" "\$3" -F "${STAGING_KERNEL_DIR}/System.map-\$4" "\$4"
+ exec env depmod "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
fi
EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index dda74c85b6..899881e1fb 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -11,14 +11,14 @@ SECTION = "base"
DEPENDS += "pkgconfig-native"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
inherit autotools gtk-doc ptest
-SRCREV = "ae58de0fcb4a6528dd365e23d383bbe2eaf2d566"
+SRCREV = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
# Lookout for PV bump too when SRCREV is changed
-PV = "18+git${SRCPV}"
+PV = "19+git${SRCPV}"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
@@ -26,13 +26,15 @@ SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://ptest.patch \
file://avoid_parallel_tests.patch \
file://fix-O_CLOEXEC.patch \
- file://0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch \
"
S = "${WORKDIR}/git"
EXTRA_AUTORECONF += "--install --symlink"
-EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools --disable-manpages --with-zlib"
+EXTRA_OECONF +=" --enable-tools --disable-manpages --with-zlib"
+
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
do_configure_prepend () {
gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make
diff --git a/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch b/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch
deleted file mode 100644
index 77624ce151..0000000000
--- a/meta/recipes-kernel/kmod/kmod/0001-Add-missing-O_CLOEXEC-in-kmod_module_get_size.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 74c26943f1228870022d116a1fda25be3a55a38e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
-Date: Wed, 18 Jun 2014 20:51:00 -0400
-Subject: [PATCH] Add missing O_CLOEXEC in kmod_module_get_size()
-
-Upstream-Status: Backport
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- libkmod/libkmod-module.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
-index e3cc5a7..b81b451 100644
---- a/libkmod/libkmod-module.c
-+++ b/libkmod/libkmod-module.c
-@@ -1783,7 +1783,7 @@ KMOD_EXPORT long kmod_module_get_size(const struct kmod_module *mod)
- * loaded.
- */
- snprintf(line, sizeof(line), "/sys/module/%s", mod->name);
-- dfd = open(line, O_RDONLY);
-+ dfd = open(line, O_RDONLY|O_CLOEXEC);
- if (dfd < 0)
- return -errno;
-
---
-1.8.3.1
-
diff --git a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
index 2320b92eba..7c0a27510b 100644
--- a/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
+++ b/meta/recipes-kernel/kmod/kmod/Change-to-calling-bswap_-instead-of-htobe-and-be-toh.patch
@@ -1,6 +1,6 @@
-From 0c4dbadc9db3cda1cfca64e44ea08c6e89919ea7 Mon Sep 17 00:00:00 2001
-From: Ting Liu <b28495@freescale.com>
-Date: Tue, 10 Sep 2013 13:44:18 +0800
+From 4b68940b1ed46c54a5a0bdf6bb9d4599bc64e6f4 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 24 Dec 2014 10:12:40 +0800
Subject: [PATCH] Change to calling bswap_* instead of htobe* and be*toh
We can't use htobe* and be*toh functions because they are not
@@ -11,12 +11,13 @@ Change to directly calling bswap_* as defined in+byteswap.h.
Upstream-Status: Inappropriate
Signed-off-by: Ting Liu <b28495@freescale.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
- libkmod/libkmod-signature.c | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
+ libkmod/libkmod-signature.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
-index 6b80caa..3544a36 100644
+index 2b976a5..ffe58c2 100644
--- a/libkmod/libkmod-signature.c
+++ b/libkmod/libkmod-signature.c
@@ -19,6 +19,7 @@
@@ -24,10 +25,10 @@ index 6b80caa..3544a36 100644
#include <endian.h>
+#include <byteswap.h>
- #include <stdint.h>
+ #include <inttypes.h>
+ #include <stdio.h>
#include <stdlib.h>
- #include <string.h>
-@@ -121,7 +122,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
+@@ -124,7 +125,7 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat
modsig->hash >= PKEY_HASH__LAST ||
modsig->id_type >= PKEY_ID_TYPE__LAST)
return false;
@@ -37,5 +38,5 @@ index 6b80caa..3544a36 100644
return false;
--
-1.7.5.4
+1.9.1
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
index e910a96f43..cb0a3c5ed1 100644
--- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -8,7 +8,7 @@ DEPENDS = "virtual/libintl ncurses glib-2.0"
PR = "r3"
-SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
file://latencytop-makefile.patch \
file://latencytop-fsync.patch"
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index a107f804fa..16ebf6ad6b 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \
- file://LICENCE.iwlwifi_firmware;md5=8b938534f77ffd453690eb34ed84ae8b \
+ file://LICENCE.iwlwifi_firmware;md5=5106226b2863d00d8ed553221ddf8cd2 \
file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
@@ -24,7 +24,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.radeon;md5=07b0c31777bd686d8e1609c6940b5e74\
file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
"
-SRCREV = "dec41bce44e0dff6a2c3358a958fadf22bf58858"
+SRCREV = "0e5f63771d0df6d7859f7c4100a74d737c62ac88"
PE = "1"
PV = "0.0+git${SRCPV}"
@@ -34,6 +34,8 @@ S = "${WORKDIR}/git"
inherit allarch update-alternatives
+CLEANBROKEN = "1"
+
do_compile() {
:
}
@@ -42,7 +44,7 @@ do_install() {
install -d ${D}/lib/firmware/
cp -r * ${D}/lib/firmware/
- # Avoid Makefile to be deplyed
+ # Avoid Makefile to be deployed
rm ${D}/lib/firmware/Makefile
# Remove unbuild firmware which needs cmake and bash
@@ -67,9 +69,13 @@ PACKAGES =+ "${PN}-ralink \
${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \
${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 \
${PN}-atheros-license ${PN}-ar9170 ${PN}-ar3k ${PN}-ath6k ${PN}-ath9k \
- ${PN}-iwlwifi-license ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2b-6 ${PN}-iwlwifi-7260-7 \
- ${PN}-iwlwifi-6000g2a-6 ${PN}-iwlwifi-135-6"
-
+ ${PN}-iwlwifi-license ${PN}-iwlwifi-135-6 \
+ ${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \
+ ${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 ${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \
+ ${PN}-iwlwifi-6050-4 ${PN}-iwlwifi-6050-5 \
+ ${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9 \
+ ${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9 \
+ "
FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware"
@@ -208,18 +214,40 @@ RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license"
ALTERNATIVE_linux-firmware-bcm4334 = "brcmfmac-sdio.bin"
ALTERNATIVE_TARGET_linux-firmware-bcm4334[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4334-sdio.bin"
+RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-7 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-3160-9 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000-4 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license"
-
-FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
+RDEPENDS_${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-7 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260-9 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265-8 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265-9 = "${PN}-iwlwifi-license"
+
+FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
+FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode"
+FILES_${PN}-iwlwifi-3160-7 = "/lib/firmware/iwlwifi-3160-7.ucode"
+FILES_${PN}-iwlwifi-3160-8 = "/lib/firmware/iwlwifi-3160-8.ucode"
+FILES_${PN}-iwlwifi-3160-9 = "/lib/firmware/iwlwifi-3160-9.ucode"
+FILES_${PN}-iwlwifi-6000-4 = "/lib/firmware/iwlwifi-6000-4.ucode"
FILES_${PN}-iwlwifi-6000g2a-5 = "/lib/firmware/iwlwifi-6000g2a-5.ucode"
FILES_${PN}-iwlwifi-6000g2a-6 = "/lib/firmware/iwlwifi-6000g2a-6.ucode"
+FILES_${PN}-iwlwifi-6000g2b-5 = "/lib/firmware/iwlwifi-6000g2b-5.ucode"
FILES_${PN}-iwlwifi-6000g2b-6 = "/lib/firmware/iwlwifi-6000g2b-6.ucode"
-FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode"
+FILES_${PN}-iwlwifi-6050-4 = "/lib/firmware/iwlwifi-6050-4.ucode"
+FILES_${PN}-iwlwifi-6050-5 = "/lib/firmware/iwlwifi-6050-5.ucode"
FILES_${PN}-iwlwifi-7260-7 = "/lib/firmware/iwlwifi-7260-7.ucode"
+FILES_${PN}-iwlwifi-7260-8 = "/lib/firmware/iwlwifi-7260-8.ucode"
+FILES_${PN}-iwlwifi-7260-9 = "/lib/firmware/iwlwifi-7260-9.ucode"
+FILES_${PN}-iwlwifi-7265-8 = "/lib/firmware/iwlwifi-7265-8.ucode"
+FILES_${PN}-iwlwifi-7265-9 = "/lib/firmware/iwlwifi-7265-9.ucode"
FILES_${PN} += "/lib/firmware/*"
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb
deleted file mode 100644
index cedaced2da..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.16.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-KORG_ARCHIVE_COMPRESSION = "xz"
-
-require linux-libc-headers.inc
-
-SRC_URI[md5sum] = "5c569ed649a0c9711879f333e90c5386"
-SRC_URI[sha256sum] = "4813ad7927a7d92e5339a873ab16201b242b2748934f12cb5df9ba2cfe1d77a0"
-
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb
new file mode 100644
index 0000000000..078df4512b
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.19.bb
@@ -0,0 +1,7 @@
+KORG_ARCHIVE_COMPRESSION = "xz"
+
+require linux-libc-headers.inc
+
+SRC_URI[md5sum] = "d3fc8316d4d4d04b65cbc2d70799e763"
+SRC_URI[sha256sum] = "be42511fe5321012bb4a2009167ce56a9e5fe362b4af43e8c371b3666859806c"
+
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
new file mode 100644
index 0000000000..dd6578861a
--- /dev/null
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -0,0 +1,76 @@
+SUMMARY = "Linux kernel Development Source"
+DESCRIPTION = "Development source linux kernel. When built, this recipe packages the \
+source of the preferred virtual/kernel provider and makes it available for full kernel \
+development or external module builds"
+
+SECTION = "kernel"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+inherit linux-kernel-base
+
+# Whilst not a module, this ensures we don't get multilib extended (which would make no sense)
+inherit module-base
+
+# We need the kernel to be staged (unpacked, patched and configured) before
+# we can grab the source and make the source package. We also need the bits from
+# ${B} not to change while we install, so virtual/kernel must finish do_compile.
+do_install[depends] += "virtual/kernel:do_shared_workdir"
+# Need the source, not just the output of populate_sysroot
+do_install[depends] += "virtual/kernel:do_compile"
+
+# There's nothing to do here, except install the source where we can package it
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_populate_sysroot[noexec] = "1"
+
+# Define where the kernel headers are installed on the target as well as where
+# they are staged.
+KERNEL_SRC_PATH = "/usr/src/kernel"
+S = "${STAGING_KERNEL_DIR}"
+B = "${STAGING_KERNEL_BUILDDIR}"
+
+KERNEL_VERSION = "${@get_kernelversion_headers('${S}')}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_install() {
+ kerneldir=${D}${KERNEL_SRC_PATH}
+ install -d $kerneldir
+
+ #
+ # Copy the staging dir source (and module build support) into the devsrc structure.
+ # We can keep this copy simple and take everything, since a we'll clean up any build
+ # artifacts afterwards, and the extra i/o is not significant
+ #
+ cd ${B}
+ find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
+ cd ${S}
+ find . -type d -name '.git*' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
+
+ # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not
+ # The main build artifacts. We clean the directory to avoid QA errors on mismatched
+ # architecture (since scripts and helpers are native format).
+ KBUILD_OUTPUT="$kerneldir"
+ oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
+
+ # As of Linux kernel version 3.0.1, the clean target removes
+ # arch/powerpc/lib/crtsavres.o which is present in
+ # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
+ if [ ${ARCH} = "powerpc" ]; then
+ mkdir -p $kerneldir/arch/powerpc/lib/
+ cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ fi
+
+ chown -R root:root ${D}
+}
+# Ensure we don't race against "make scripts" during cpio
+do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
+
+PACKAGES = "kernel-devsrc"
+FILES_${PN} = "${KERNEL_SRC_PATH}"
+RDEPENDS_${PN} = "bc"
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index 8f25f17e6f..cc0e4e64a9 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -33,6 +33,10 @@ do_compile () {
:
}
+do_shared_workdir () {
+ :
+}
+
do_install() {
:
}
@@ -47,4 +51,4 @@ do_deploy() {
addtask bundle_initramfs after do_install before do_deploy
addtask deploy after do_install
-
+addtask shared_workdir after do_compile before do_install
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 00feadedd8..ba88fd7dc3 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -35,7 +35,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${K
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
-LINUX_VERSION ?= "3.17+"
+LINUX_VERSION ?= "3.19+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
deleted file mode 100644
index 1075972058..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-SRCREV_machine ?= "0abce5181274dbf37788ab8d2c62e135defd9956"
-SRCREV_machine_qemuppc ?= "c31f38edf5dec2c295632199dbfe3f5a221f7c16"
-SRCREV_meta ?= "f79a00265eefbe2fffc2cdb03f67235497a9a87e"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-
-LINUX_VERSION ?= "3.10.55"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "meta"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
index b2ad078bca..4b602b1b03 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
@@ -3,17 +3,18 @@ KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
require recipes-kernel/linux/linux-yocto.inc
-SRCREV_machine ?= "0a875ce52aa7a42ddabdb87038074381bb268e77"
-SRCREV_machine_qemuppc ?= "b993661d41f08846daa28b14f89c8ae3e94225bd"
-SRCREV_meta ?= "fb6271a942b57bdc40c6e49f0203be153699f81c"
+SRCREV_machine ?= "3fb54cf8f4c3254f628e6c4720fe3c731a9de0b2"
+SRCREV_machine_qemuppc ?= "ab935c000435b6f5af42543f8e2300e473995d5a"
+SRCREV_meta ?= "162dfe3bb092c1a792e5ed224fe09672e9814b24"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-LINUX_VERSION ?= "3.14.19"
+LINUX_VERSION ?= "3.14.36"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
LINUX_KERNEL_TYPE = "preempt-rt"
@@ -23,5 +24,4 @@ COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
index 79bd6935a2..afcc4dd620 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
@@ -4,12 +4,13 @@ KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
-LINUX_VERSION ?= "3.14.19"
+LINUX_VERSION ?= "3.14.36"
KMETA = "meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "902f34d36102a4b2008b776ecae686f80d307e12"
-SRCREV_meta ?= "fb6271a942b57bdc40c6e49f0203be153699f81c"
+SRCREV_machine ?= "4434aa71ff7043c570f9eae493df1ccadbda9b85"
+SRCREV_meta ?= "162dfe3bb092c1a792e5ed224fe09672e9814b24"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb
deleted file mode 100644
index eae08540e6..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-KBRANCH ?= "standard/tiny/base"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "3.17-rc7"
-
-KMETA = "meta"
-
-SRCREV_machine ?= "268b7677421eef003a84f31c6bd0b8ec3acc1e36"
-SRCREV_meta ?= "84b57b01050dd9e5a004e265e70120e2a792f38a"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
-
-COMPATIBLE_MACHINE = "(qemux86)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
index a53ce544a3..0631c5e551 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
@@ -1,20 +1,20 @@
KBRANCH ?= "standard/tiny/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
LINUX_KERNEL_TYPE = "tiny"
KCONFIG_MODE = "--allnoconfig"
-LINUX_VERSION ?= "3.10.55"
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "3.19.2"
KMETA = "meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "8e055f3b669c65e83ba7128c248c632eedafad72"
-SRCREV_meta ?= "f79a00265eefbe2fffc2cdb03f67235497a9a87e"
+SRCREV_machine ?= "31b35da6a5c8a2b162f6c33202e9b64dd13757d5"
+SRCREV_meta ?= "9e70b482d3773abf92c9c5850e134cbca1d5651f"
PV = "${LINUX_VERSION}+git${SRCPV}"
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta"
COMPATIBLE_MACHINE = "(qemux86)"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 4ed318886f..3b41a61c36 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -7,6 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
INC_PR = "r4"
DEPENDS += "xz-native bc-native"
+DEPENDS_append_aarch64 = " libgcc"
+KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
# by the kernel. This is typically the branch that should be built,
@@ -20,11 +23,14 @@ KBRANCH ?= "master"
KMACHINE ?= "${MACHINE}"
SRCREV_FORMAT ?= "meta_machine"
-LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
-
-do_patch[depends] = "kern-tools-native:do_populate_sysroot"
+# LEVELS:
+# 0: no reporting
+# 1: report options that are specified, but not in the final config
+# 2: report options that are not hardware related, but set by a BSP
+KCONF_AUDIT_LEVEL ?= "1"
+KCONF_BSP_AUDIT_LEVEL ?= "0"
-addtask kernel_configme before do_configure after do_patch
+LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
# Pick up shared functions
inherit kernel
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.10.bb b/meta/recipes-kernel/linux/linux-yocto_3.10.bb
deleted file mode 100644
index ea69856595..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto_3.10.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/common-pc/base"
-KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "a4195791d27ef50feb454765149ea34621ef8ed7"
-SRCREV_machine_qemumips ?= "ff747b3dff7dfa643b3447a348b901cacc5b6a16"
-SRCREV_machine_qemuppc ?= "46e30d608f4268b0ea77362398aae91f1d410ee3"
-SRCREV_machine_qemux86 ?= "8e055f3b669c65e83ba7128c248c632eedafad72"
-SRCREV_machine_qemux86-64 ?= "8e055f3b669c65e83ba7128c248c632eedafad72"
-SRCREV_machine_qemumips64 ?= "42457c568170cb11a9011382ebca4677f22b35c1"
-SRCREV_machine ?= "8e055f3b669c65e83ba7128c248c632eedafad72"
-SRCREV_meta ?= "f79a00265eefbe2fffc2cdb03f67235497a9a87e"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-
-LINUX_VERSION ?= "3.10.55"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "meta"
-
-COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.14.bb b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
index a2f4b4dccf..b71aea2b18 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
@@ -4,30 +4,33 @@ require recipes-kernel/linux/linux-yocto.inc
# board specific branches
KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
KBRANCH_qemumips ?= "standard/mti-malta32"
KBRANCH_qemuppc ?= "standard/qemuppc"
KBRANCH_qemux86 ?= "standard/common-pc/base"
KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
KBRANCH_qemumips64 ?= "standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "127b621f2a4d3b1111e24423c12fac001e047c1c"
-SRCREV_machine_qemumips ?= "c3b9f1b2397f0847ab4844d1cdb8e02574434d78"
-SRCREV_machine_qemuppc ?= "73e2411cdd91764d0601c0869857f53381c2a177"
-SRCREV_machine_qemux86 ?= "e19a1b40de44e756defdfb40349342d8037609bd"
-SRCREV_machine_qemux86-64 ?= "902f34d36102a4b2008b776ecae686f80d307e12"
-SRCREV_machine_qemumips64 ?= "1c4d70272dde4b695697dd8705a031420480f712"
-SRCREV_machine ?= "902f34d36102a4b2008b776ecae686f80d307e12"
-SRCREV_meta ?= "fb6271a942b57bdc40c6e49f0203be153699f81c"
+SRCREV_machine_qemuarm ?= "d1cea997ae512ee325600a247d75027e65655e0a"
+SRCREV_machine_qemuarm64 ?= "4434aa71ff7043c570f9eae493df1ccadbda9b85"
+SRCREV_machine_qemumips ?= "c37155f99472e7dc9f94b3bda72c73a3f718fdbf"
+SRCREV_machine_qemuppc ?= "521b9fd001dc25a446d39f349cdfb7f9f5697d05"
+SRCREV_machine_qemux86 ?= "f7cbba6012312f5bf9b7279bafa8bb09d18b547d"
+SRCREV_machine_qemux86-64 ?= "4434aa71ff7043c570f9eae493df1ccadbda9b85"
+SRCREV_machine_qemumips64 ?= "a777f11a26f075b71becb47b5133252c5d8fafff"
+SRCREV_machine ?= "4434aa71ff7043c570f9eae493df1ccadbda9b85"
+SRCREV_meta ?= "162dfe3bb092c1a792e5ed224fe09672e9814b24"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-LINUX_VERSION ?= "3.14.19"
+LINUX_VERSION ?= "3.14.36"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
-COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.17.bb b/meta/recipes-kernel/linux/linux-yocto_3.17.bb
deleted file mode 100644
index 02f10a3aaf..0000000000
--- a/meta/recipes-kernel/linux/linux-yocto_3.17.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc ?= "standard/qemuppc"
-KBRANCH_qemux86 ?= "standard/common-pc"
-KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "d156e4658a13349f7a30adafd436e32fb722d248"
-SRCREV_machine_qemumips ?= "5aa58a6ca9d4efe79ddf66c9d09695b42c84a3b6"
-SRCREV_machine_qemuppc ?= "cc4943bf3b93f9c424b63c357ab2c9f71384f3ac"
-SRCREV_machine_qemux86 ?= "268b7677421eef003a84f31c6bd0b8ec3acc1e36"
-SRCREV_machine_qemux86-64 ?= "268b7677421eef003a84f31c6bd0b8ec3acc1e36"
-SRCREV_machine_qemumips64 ?= "798c30525b1e0eacfa3ff97c4bb17c45b9b4b220"
-SRCREV_machine ?= "268b7677421eef003a84f31c6bd0b8ec3acc1e36"
-SRCREV_meta ?= "84b57b01050dd9e5a004e265e70120e2a792f38a"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.17.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
-
-LINUX_VERSION ?= "3.17-rc7"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "meta"
-
-COMPATIBLE_MACHINE = "qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.19.bb b/meta/recipes-kernel/linux/linux-yocto_3.19.bb
new file mode 100644
index 0000000000..9b19eb299b
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto_3.19.bb
@@ -0,0 +1,40 @@
+KBRANCH ?= "standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/common-pc"
+KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "473e2f3788730c51e82714a9785325b6308f6762"
+SRCREV_machine_qemuarm64 ?= "31b35da6a5c8a2b162f6c33202e9b64dd13757d5"
+SRCREV_machine_qemumips ?= "d43f1cbf282d020f7aa31d68a54b2876d2c0e81b"
+SRCREV_machine_qemuppc ?= "35de413056b86191963ffe686913da31b978a9b3"
+SRCREV_machine_qemux86 ?= "31b35da6a5c8a2b162f6c33202e9b64dd13757d5"
+SRCREV_machine_qemux86-64 ?= "31b35da6a5c8a2b162f6c33202e9b64dd13757d5"
+SRCREV_machine_qemumips64 ?= "d35649ef8cbb0a0404be5c721377b138866181ad"
+SRCREV_machine ?= "31b35da6a5c8a2b162f6c33202e9b64dd13757d5"
+SRCREV_meta ?= "9e70b482d3773abf92c9c5850e134cbca1d5651f"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta"
+
+LINUX_VERSION ?= "3.19.2"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch
deleted file mode 100644
index 258eedd3ba..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: backport
-
-babeltrace: Fix support out of tree builds in babeltrace
-
-Signed-off-by: Lars Persson <larper@axis.com>
-
-diff --git a/formats/lttng-live/Makefile.am b/formats/lttng-live/Makefile.am
-index c834699..2c6b0bd 100644
---- a/formats/lttng-live/Makefile.am
-+++ b/formats/lttng-live/Makefile.am
-@@ -1,4 +1,4 @@
--AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include
-+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)
-
- lib_LTLIBRARIES = libbabeltrace-lttng-live.la
-
-
diff --git a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch b/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
deleted file mode 100644
index ea0aad699d..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace/0001-Fix-don-t-perform-unaligned-integer-read-writes.patch
+++ /dev/null
@@ -1,252 +0,0 @@
-From 6a0b6cd5133db9e3c72914d4e5dd7fc792360934 Mon Sep 17 00:00:00 2001
-From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Date: Wed, 16 Jul 2014 10:58:48 -0400
-Subject: [PATCH] Fix: don't perform unaligned integer read/writes
-
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-
-Upstream-Status: Backport
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
----
- formats/ctf/types/integer.c | 108 ++++++++++++++++++++++++++++----------------
- 1 file changed, 70 insertions(+), 38 deletions(-)
-
-diff --git a/formats/ctf/types/integer.c b/formats/ctf/types/integer.c
-index 189943e..85931be 100644
---- a/formats/ctf/types/integer.c
-+++ b/formats/ctf/types/integer.c
-@@ -62,7 +62,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- uint8_t v;
-
-- v = *(const uint8_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._unsigned = v;
- break;
- }
-@@ -70,7 +70,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- uint16_t v;
-
-- v = *(const uint16_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._unsigned =
- rbo ? GUINT16_SWAP_LE_BE(v) : v;
- break;
-@@ -79,7 +79,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- uint32_t v;
-
-- v = *(const uint32_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._unsigned =
- rbo ? GUINT32_SWAP_LE_BE(v) : v;
- break;
-@@ -88,7 +88,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- uint64_t v;
-
-- v = *(const uint64_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._unsigned =
- rbo ? GUINT64_SWAP_LE_BE(v) : v;
- break;
-@@ -102,7 +102,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- int8_t v;
-
-- v = *(const int8_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._signed = v;
- break;
- }
-@@ -110,7 +110,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- int16_t v;
-
-- v = *(const int16_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._signed =
- rbo ? (int16_t) GUINT16_SWAP_LE_BE(v) : v;
- break;
-@@ -119,7 +119,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- int32_t v;
-
-- v = *(const int32_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._signed =
- rbo ? (int32_t) GUINT32_SWAP_LE_BE(v) : v;
- break;
-@@ -128,7 +128,7 @@ int _aligned_integer_read(struct bt_stream_pos *ppos,
- {
- int64_t v;
-
-- v = *(const int64_t *) ctf_get_pos_addr(pos);
-+ memcpy(&v, ctf_get_pos_addr(pos), sizeof(v));
- integer_definition->value._signed =
- rbo ? (int64_t) GUINT64_SWAP_LE_BE(v) : v;
- break;
-@@ -163,48 +163,80 @@ int _aligned_integer_write(struct bt_stream_pos *ppos,
- if (pos->dummy)
- goto end;
- if (!integer_declaration->signedness) {
-- uint64_t v = integer_definition->value._unsigned;
--
- switch (integer_declaration->len) {
-- case 8: *(uint8_t *) ctf_get_pos_addr(pos) = (uint8_t) v;
-+ case 8:
-+ {
-+ uint8_t v = integer_definition->value._unsigned;
-+
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- case 16:
-- *(uint16_t *) ctf_get_pos_addr(pos) = rbo ?
-- GUINT16_SWAP_LE_BE((uint16_t) v) :
-- (uint16_t) v;
-+ {
-+ uint16_t v = integer_definition->value._unsigned;
-+
-+ if (rbo)
-+ v = GUINT16_SWAP_LE_BE(v);
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- case 32:
-- *(uint32_t *) ctf_get_pos_addr(pos) = rbo ?
-- GUINT32_SWAP_LE_BE((uint32_t) v) :
-- (uint32_t) v;
-+ {
-+ uint32_t v = integer_definition->value._unsigned;
-+
-+ if (rbo)
-+ v = GUINT32_SWAP_LE_BE(v);
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- case 64:
-- *(uint64_t *) ctf_get_pos_addr(pos) = rbo ?
-- GUINT64_SWAP_LE_BE(v) : v;
-+ {
-+ uint64_t v = integer_definition->value._unsigned;
-+
-+ if (rbo)
-+ v = GUINT64_SWAP_LE_BE(v);
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- default:
- assert(0);
- }
- } else {
-- int64_t v = integer_definition->value._signed;
--
- switch (integer_declaration->len) {
-- case 8: *(int8_t *) ctf_get_pos_addr(pos) = (int8_t) v;
-+ case 8:
-+ {
-+ uint8_t v = integer_definition->value._signed;
-+
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- case 16:
-- *(int16_t *) ctf_get_pos_addr(pos) = rbo ?
-- (int16_t) GUINT16_SWAP_LE_BE((int16_t) v) :
-- (int16_t) v;
-+ {
-+ int16_t v = integer_definition->value._signed;
-+
-+ if (rbo)
-+ v = GUINT16_SWAP_LE_BE(v);
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- case 32:
-- *(int32_t *) ctf_get_pos_addr(pos) = rbo ?
-- (int32_t) GUINT32_SWAP_LE_BE((int32_t) v) :
-- (int32_t) v;
-+ {
-+ int32_t v = integer_definition->value._signed;
-+
-+ if (rbo)
-+ v = GUINT32_SWAP_LE_BE(v);
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- case 64:
-- *(int64_t *) ctf_get_pos_addr(pos) = rbo ?
-- GUINT64_SWAP_LE_BE(v) : v;
-+ {
-+ int64_t v = integer_definition->value._signed;
-+
-+ if (rbo)
-+ v = GUINT64_SWAP_LE_BE(v);
-+ memcpy(ctf_get_pos_addr(pos), &v, sizeof(v));
- break;
-+ }
- default:
- assert(0);
- }
-@@ -237,23 +269,23 @@ int ctf_integer_read(struct bt_stream_pos *ppos, struct bt_definition *definitio
- if (!integer_declaration->signedness) {
- if (integer_declaration->byte_order == LITTLE_ENDIAN)
- bt_bitfield_read_le(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- &integer_definition->value._unsigned);
- else
- bt_bitfield_read_be(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- &integer_definition->value._unsigned);
- } else {
- if (integer_declaration->byte_order == LITTLE_ENDIAN)
- bt_bitfield_read_le(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- &integer_definition->value._signed);
- else
- bt_bitfield_read_be(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- &integer_definition->value._signed);
- }
-@@ -286,23 +318,23 @@ int ctf_integer_write(struct bt_stream_pos *ppos, struct bt_definition *definiti
- if (!integer_declaration->signedness) {
- if (integer_declaration->byte_order == LITTLE_ENDIAN)
- bt_bitfield_write_le(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- integer_definition->value._unsigned);
- else
- bt_bitfield_write_be(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- integer_definition->value._unsigned);
- } else {
- if (integer_declaration->byte_order == LITTLE_ENDIAN)
- bt_bitfield_write_le(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- integer_definition->value._signed);
- else
- bt_bitfield_write_be(mmap_align_addr(pos->base_mma) +
-- pos->mmap_base_offset, unsigned long,
-+ pos->mmap_base_offset, unsigned char,
- pos->offset, integer_declaration->len,
- integer_definition->value._signed);
- }
---
-1.8.3.1
-
diff --git a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch b/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch
deleted file mode 100644
index 8e81d2d781..0000000000
--- a/meta/recipes-kernel/lttng/babeltrace/Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From cae67efbd9ddf2cee6bbefec076dc8933ababc43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fredrik=20Markstr=C3=B6m?= <fredrik.markstrom@gmail.com>
-Date: Fri, 16 May 2014 10:10:38 +0800
-Subject: [PATCH] Fix: Align buffers from objstack_alloc on sizeof(void *)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Backport
-
-The buffers from objstack_alloc will store pointers, so they must
-be aligned on a pointer's size, or else it will cause issues on the
-CPUs which do not support unaligned addresses access.
-
-Signed-off-by: Fredrik Markstrom <fredrik.markstrom@gmail.com>
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
-Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
----
- formats/ctf/metadata/objstack.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c
-index 9e264a4..14d9252 100644
---- a/formats/ctf/metadata/objstack.c
-+++ b/formats/ctf/metadata/objstack.c
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <babeltrace/list.h>
- #include <babeltrace/babeltrace-internal.h>
-+#include <babeltrace/align.h>
-
- #define OBJSTACK_INIT_LEN 128
- #define OBJSTACK_POISON 0xcc
-@@ -39,7 +40,7 @@ struct objstack_node {
- struct bt_list_head node;
- size_t len;
- size_t used_len;
-- char data[];
-+ char __attribute__ ((aligned (sizeof(void *)))) data[];
- };
-
- BT_HIDDEN
-@@ -118,6 +119,8 @@ void *objstack_alloc(struct objstack *objstack, size_t len)
- struct objstack_node *last_node;
- void *p;
-
-+ len = ALIGN(len, sizeof(void *));
-+
- /* Get last node */
- last_node = bt_list_entry(objstack->head.prev,
- struct objstack_node, node);
---
-1.7.10.4
-
diff --git a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
index 1c41e25827..f616146393 100644
--- a/meta/recipes-kernel/lttng/babeltrace_1.2.1.bb
+++ b/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
@@ -10,14 +10,10 @@ inherit autotools pkgconfig
DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-SRCREV = "66c2a20b4391fb5c7f870aeb0dde854f0ae1fc79"
-PV = "1.2.1+git${SRCPV}"
+SRCREV = "90395824efc007de88787a6b8e400a07c980be1c"
+PV = "1.2.4+git${SRCPV}"
-SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \
- file://0001-Fix-Support-out-of-tree-builds-in-babeltrace.patch \
- file://Fix-Align-buffers-from-objstack_alloc-on-sizeof-void.patch \
- file://0001-Fix-don-t-perform-unaligned-integer-read-writes.patch \
-"
+SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch b/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch
deleted file mode 100644
index 9c3dc9c1e1..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/Fix-noargs-probes-should-calculate-alignment-and-eve.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-
-From d3de7f1468be0b18145ff85b3c1a7c7fb1d48c15 Mon Sep 17 00:00:00 2001
-From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Date: Fri, 25 Jul 2014 12:30:43 -0400
-Subject: [PATCH 1/3] Fix: noargs probes should calculate alignment and event
- length
-
-A noargs probe could have event fields. noargs just means that the probe
-does not receive any argument as parameter. However, it could very well
-serialize data into fields (global variables, constants, etc).
-
-It just happens that LTTng does not serialize any data in noargs events
-at the moment, but this may very well change.
-
-The if (0) with (void) variable access strategy to stop compiler from
-complaining from unused variables does not seem to work as expected with
-gcc 4.9.1. Use "unused" attribute instead.
-
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
----
- probes/lttng-events.h | 49 +++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 35 insertions(+), 14 deletions(-)
-
-diff --git a/probes/lttng-events.h b/probes/lttng-events.h
-index 596b70608584..ba9563b15cf9 100644
---- a/probes/lttng-events.h
-+++ b/probes/lttng-events.h
-@@ -456,10 +456,19 @@ static __used struct lttng_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM) = {
- static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
- { \
- size_t __event_len = 0; \
-- unsigned int __dynamic_len_idx = 0; \
-+ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
-+ \
-+ _tstruct \
-+ return __event_len; \
-+}
-+
-+#undef DECLARE_EVENT_CLASS_NOARGS
-+#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
-+static inline size_t __event_get_size__##_name(size_t *__dynamic_len) \
-+{ \
-+ size_t __event_len = 0; \
-+ unsigned int __dynamic_len_idx __attribute__((unused)) = 0; \
- \
-- if (0) \
-- (void) __dynamic_len_idx; /* don't warn if unused */ \
- _tstruct \
- return __event_len; \
- }
-@@ -514,6 +523,15 @@ static inline size_t __event_get_align__##_name(_proto) \
- return __event_align; \
- }
-
-+#undef DECLARE_EVENT_CLASS_NOARGS
-+#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
-+static inline size_t __event_get_align__##_name(void) \
-+{ \
-+ size_t __event_align = 1; \
-+ _tstruct \
-+ return __event_align; \
-+}
-+
- #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
-
-
-@@ -553,12 +571,16 @@ static inline size_t __event_get_align__##_name(_proto) \
- #undef TP_STRUCT__entry
- #define TP_STRUCT__entry(args...) args
-
--#undef DECLARE_EVENT_CLASS
--#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
-+#undef DECLARE_EVENT_CLASS_NOARGS
-+#define DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print) \
- struct __event_typemap__##_name { \
- _tstruct \
- };
-
-+#undef DECLARE_EVENT_CLASS
-+#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
-+ DECLARE_EVENT_CLASS_NOARGS(_name, _tstruct, _assign, _print)
-+
- #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
-
-
-@@ -760,15 +782,11 @@ static void __event_probe__##_name(void *__data, _proto) \
- struct lttng_channel *__chan = __event->chan; \
- struct lib_ring_buffer_ctx __ctx; \
- size_t __event_len, __event_align; \
-- size_t __dynamic_len_idx = 0; \
-- size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)]; \
-- struct __event_typemap__##_name __typemap; \
-+ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
-+ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
-+ struct __event_typemap__##_name __typemap __attribute__((unused)); \
- int __ret; \
- \
-- if (0) { \
-- (void) __dynamic_len_idx; /* don't warn if unused */ \
-- (void) __typemap; /* don't warn if unused */ \
-- } \
- if (!_TP_SESSION_CHECK(session, __chan->session)) \
- return; \
- if (unlikely(!ACCESS_ONCE(__chan->session->active))) \
-@@ -800,6 +818,9 @@ static void __event_probe__##_name(void *__data) \
- struct lttng_channel *__chan = __event->chan; \
- struct lib_ring_buffer_ctx __ctx; \
- size_t __event_len, __event_align; \
-+ size_t __dynamic_len_idx __attribute__((unused)) = 0; \
-+ size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)] __attribute__((unused)); \
-+ struct __event_typemap__##_name __typemap __attribute__((unused)); \
- int __ret; \
- \
- if (!_TP_SESSION_CHECK(session, __chan->session)) \
-@@ -810,8 +831,8 @@ static void __event_probe__##_name(void *__data) \
- return; \
- if (unlikely(!ACCESS_ONCE(__event->enabled))) \
- return; \
-- __event_len = 0; \
-- __event_align = 1; \
-+ __event_len = __event_get_size__##_name(__dynamic_len); \
-+ __event_align = __event_get_align__##_name(); \
- lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \
- __event_align, -1); \
- __ret = __chan->ops->event_reserve(&__ctx, __event->id); \
---
-1.8.1.2
-
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch
deleted file mode 100644
index 0a056a9475..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/Update-compaction-instrumentation-to-3.16-kernel.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 0007344741ef65259bc52dea72259173dfbf96c0 Mon Sep 17 00:00:00 2001
-From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Date: Sun, 13 Jul 2014 13:33:21 -0400
-Subject: [PATCH 2/2] Update compaction instrumentation to 3.16 kernel
-
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
----
- instrumentation/events/lttng-module/compaction.h | 45 +++++++++++++++++++++++-
- 1 file changed, 44 insertions(+), 1 deletion(-)
-
-diff --git a/instrumentation/events/lttng-module/compaction.h b/instrumentation/events/lttng-module/compaction.h
-index 1b237fa45ab0..22024e9ee582 100644
---- a/instrumentation/events/lttng-module/compaction.h
-+++ b/instrumentation/events/lttng-module/compaction.h
-@@ -6,6 +6,7 @@
-
- #include <linux/types.h>
- #include <linux/tracepoint.h>
-+#include <linux/version.h>
- #include <trace/events/gfpflags.h>
-
- DECLARE_EVENT_CLASS(mm_compaction_isolate_template,
-@@ -45,6 +46,48 @@ DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
- TP_ARGS(nr_scanned, nr_taken)
- )
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
-+TRACE_EVENT(mm_compaction_migratepages,
-+
-+ TP_PROTO(unsigned long nr_all,
-+ int migrate_rc,
-+ struct list_head *migratepages),
-+
-+ TP_ARGS(nr_all, migrate_rc, migratepages),
-+
-+ TP_STRUCT__entry(
-+ __field(unsigned long, nr_migrated)
-+ __field(unsigned long, nr_failed)
-+ ),
-+
-+ TP_fast_assign(
-+ tp_assign(nr_migrated,
-+ nr_all -
-+ (migrate_rc >= 0 ? migrate_rc :
-+ ({
-+ unsigned long nr_failed = 0;
-+ struct list_head *page_lru;
-+
-+ list_for_each(page_lru, migratepages)
-+ nr_failed++;
-+ nr_failed;
-+ })))
-+ tp_assign(nr_failed,
-+ ({
-+ unsigned long nr_failed = 0;
-+ struct list_head *page_lru;
-+
-+ list_for_each(page_lru, migratepages)
-+ nr_failed++;
-+ nr_failed;
-+ }))
-+ ),
-+
-+ TP_printk("nr_migrated=%lu nr_failed=%lu",
-+ __entry->nr_migrated,
-+ __entry->nr_failed)
-+)
-+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
- TRACE_EVENT(mm_compaction_migratepages,
-
- TP_PROTO(unsigned long nr_migrated,
-@@ -66,7 +109,7 @@ TRACE_EVENT(mm_compaction_migratepages,
- __entry->nr_migrated,
- __entry->nr_failed)
- )
--
-+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
-
- #endif /* _TRACE_COMPACTION_H */
-
---
-1.8.1.2
-
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch
deleted file mode 100644
index 3541b50b79..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/Update-kvm-instrumentation-compile-on-3.17-rc1.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-
-From 458c2022e992c057bd21d02e4c77bcc7d4d6cd6c Mon Sep 17 00:00:00 2001
-From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Date: Thu, 21 Aug 2014 11:15:50 -0400
-Subject: [PATCH 3/3] Update kvm instrumentation: compile on 3.17-rc1
-
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
----
- instrumentation/events/lttng-module/arch/x86/kvm/trace.h | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
-index 2354884074eb..3c299c58a1cf 100644
---- a/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
-+++ b/instrumentation/events/lttng-module/arch/x86/kvm/trace.h
-@@ -724,7 +724,7 @@ TRACE_EVENT(kvm_emulate_insn,
- tp_memcpy(insn,
- vcpu->arch.emulate_ctxt.decode.fetch.data,
- 15)
--#else
-+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
- tp_assign(rip, vcpu->arch.emulate_ctxt.fetch.start)
- tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
- tp_assign(len, vcpu->arch.emulate_ctxt._eip
-@@ -732,6 +732,16 @@ TRACE_EVENT(kvm_emulate_insn,
- tp_memcpy(insn,
- vcpu->arch.emulate_ctxt.fetch.data,
- 15)
-+#else
-+ tp_assign(rip, vcpu->arch.emulate_ctxt._eip -
-+ (vcpu->arch.emulate_ctxt.fetch.ptr -
-+ vcpu->arch.emulate_ctxt.fetch.data))
-+ tp_assign(csbase, kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS))
-+ tp_assign(len, vcpu->arch.emulate_ctxt.fetch.ptr -
-+ vcpu->arch.emulate_ctxt.fetch.data)
-+ tp_memcpy(insn,
-+ vcpu->arch.emulate_ctxt.fetch.data,
-+ 15)
- #endif
- tp_assign(flags, kei_decode_mode(vcpu->arch.emulate_ctxt.mode))
- tp_assign(failed, failed)
---
-1.8.1.2
-
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch
deleted file mode 100644
index 0f18c8a3e6..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/Update-statedump-to-3.17-nsproxy-locking.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-
-From 4ba1f53c5aebb4433fedc25d65af010274985043 Mon Sep 17 00:00:00 2001
-From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Date: Thu, 21 Aug 2014 10:53:12 -0400
-Subject: [PATCH 2/3] Update statedump to 3.17 nsproxy locking
-
-This Linux upstream commit introduces locking strategy back and forth:
-
-commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3
-Author: Eric W. Biederman <ebiederm@xmission.com>
-Date: Mon Feb 3 19:13:49 2014 -0800
-
- namespaces: Use task_lock and not rcu to protect nsproxy
-
-Use the task lock starting from kernel 3.17 rather than RCU to access
-the task nsproxy.
-
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
----
- lttng-statedump-impl.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
-index dad51ddaa250..e4caa488e436 100644
---- a/lttng-statedump-impl.c
-+++ b/lttng-statedump-impl.c
-@@ -378,6 +378,9 @@ int lttng_list_interrupts(struct lttng_session *session)
- }
- #endif
-
-+/*
-+ * Called with task lock held.
-+ */
- static
- void lttng_statedump_process_ns(struct lttng_session *session,
- struct task_struct *p,
-@@ -389,8 +392,18 @@ void lttng_statedump_process_ns(struct lttng_session *session,
- struct nsproxy *proxy;
- struct pid_namespace *pid_ns;
-
-+ /*
-+ * Back and forth on locking strategy within Linux upstream for nsproxy.
-+ * See Linux upstream commit 728dba3a39c66b3d8ac889ddbe38b5b1c264aec3
-+ * "namespaces: Use task_lock and not rcu to protect nsproxy"
-+ * for details.
-+ */
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
- rcu_read_lock();
- proxy = task_nsproxy(p);
-+#else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */
-+ proxy = p->nsproxy;
-+#endif /* #else #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */
- if (proxy) {
- pid_ns = lttng_get_proxy_pid_ns(proxy);
- do {
-@@ -402,7 +415,9 @@ void lttng_statedump_process_ns(struct lttng_session *session,
- trace_lttng_statedump_process_state(session,
- p, type, mode, submode, status, NULL);
- }
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0))
- rcu_read_unlock();
-+#endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */
- }
-
- static
---
-1.8.1.2
-
diff --git a/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch
deleted file mode 100644
index 5f02270e89..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/Update-vmscan-instrumentation-to-3.16-kernel.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 5defe623568273e9b87da1b817e373ff087fd862 Mon Sep 17 00:00:00 2001
-From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-Date: Sun, 13 Jul 2014 13:27:01 -0400
-Subject: [PATCH 1/2] Update vmscan instrumentation to 3.16 kernel
-
-Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
----
- instrumentation/events/lttng-module/vmscan.h | 39 ++++++++++++++++++++++++++++
- 1 file changed, 39 insertions(+)
-
-diff --git a/instrumentation/events/lttng-module/vmscan.h b/instrumentation/events/lttng-module/vmscan.h
-index 1fd50ba7c235..0b4aa56761dc 100644
---- a/instrumentation/events/lttng-module/vmscan.h
-+++ b/instrumentation/events/lttng-module/vmscan.h
-@@ -238,6 +238,44 @@ TRACE_EVENT(mm_shrink_slab_start,
- __entry->total_scan)
- )
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
-+TRACE_EVENT(mm_shrink_slab_end,
-+ TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval,
-+ long unused_scan_cnt, long new_scan_cnt, long total_scan),
-+
-+ TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt,
-+ total_scan),
-+
-+ TP_STRUCT__entry(
-+ __field(struct shrinker *, shr)
-+ __field(int, nid)
-+ __field(void *, shrink)
-+ __field(long, unused_scan)
-+ __field(long, new_scan)
-+ __field(int, retval)
-+ __field(long, total_scan)
-+ ),
-+
-+ TP_fast_assign(
-+ tp_assign(shr, shr)
-+ tp_assign(nid, nid)
-+ tp_assign(shrink, shr->scan_objects)
-+ tp_assign(unused_scan, unused_scan_cnt)
-+ tp_assign(new_scan, new_scan_cnt)
-+ tp_assign(retval, shrinker_retval)
-+ tp_assign(total_scan, total_scan)
-+ ),
-+
-+ TP_printk("%pF %p: nid %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d",
-+ __entry->shrink,
-+ __entry->shr,
-+ __entry->nid,
-+ __entry->unused_scan,
-+ __entry->new_scan,
-+ __entry->total_scan,
-+ __entry->retval)
-+)
-+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
- TRACE_EVENT(mm_shrink_slab_end,
- TP_PROTO(struct shrinker *shr, int shrinker_retval,
- long unused_scan_cnt, long new_scan_cnt),
-@@ -274,6 +312,7 @@ TRACE_EVENT(mm_shrink_slab_end,
- __entry->total_scan,
- __entry->retval)
- )
-+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
- #endif
-
- DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
---
-1.8.1.2
-
diff --git a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch b/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
deleted file mode 100644
index 97b7a53a07..0000000000
--- a/meta/recipes-kernel/lttng/lttng-modules/fix_build_with_v3.17_kernel.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-
-Upstream-Status: Backport
-
-commit 7df57eb5d6bdc85ddcf2b9afb6cd0cacfb22096e
-Author: Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: Thu Sep 25 18:19:43 2014 -0700
-
- asoc.h: fix build with v3.17 kernel
-
- The snd_soc_codec structure has changed in the v3.17 kernel. Some
- of the redundant fields have been removed. To be specific this commit
- from the v3.17 kernel causes the build failure for lttng-modules.
-
- |commit f4333203ec933f9272c90c7add01774ec2cf94d3
- |Author: Lars-Peter Clausen <lars@metafoo.de>
- |Date: Mon Jun 16 18:13:02 2014 +0200
- |
- | ASoC: Move name and id from CODEC/platform to component
- |
- | The component struct already has a name and id field which are initialized to
- | the same values as the same fields in the CODEC and platform structs. So remove
- | them from the CODEC and platform structs and used the ones from the component
- | struct instead.
- |
- | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
- | Signed-off-by: Mark Brown <broonie@linaro.org>
-
- The asoc.h is changed according to the change in the above kernel commit
- to fix the lttng-modules build. The change in the lttng-modules code is
- conditional on the kernel version, so that it does not break builds with
- previous kernel versions.
-
- Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
- Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-
-diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h
-index 672bea4..bf9cf86 100644
---- a/instrumentation/events/lttng-module/asoc.h
-+++ b/instrumentation/events/lttng-module/asoc.h
-@@ -21,6 +21,14 @@ struct snd_soc_card;
- struct snd_soc_dapm_widget;
- #endif
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
-+#define CODEC_NAME_FIELD component.name
-+#define CODEC_ID_FIELD component.id
-+#else
-+#define CODEC_NAME_FIELD name
-+#define CODEC_ID_FIELD id
-+#endif
-+
- /*
- * Log register events
- */
-@@ -32,15 +40,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
- TP_ARGS(codec, reg, val),
-
- TP_STRUCT__entry(
-- __string( name, codec->name )
-+ __string( name, codec->CODEC_NAME_FIELD )
- __field( int, id )
- __field( unsigned int, reg )
- __field( unsigned int, val )
- ),
-
- TP_fast_assign(
-- tp_strcpy(name, codec->name)
-- tp_assign(id, codec->id)
-+ tp_strcpy(name, codec->CODEC_NAME_FIELD)
-+ tp_assign(id, codec->CODEC_ID_FIELD)
- tp_assign(reg, reg)
- tp_assign(val, val)
- ),
-@@ -77,15 +85,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
- TP_ARGS(platform, reg, val),
-
- TP_STRUCT__entry(
-- __string( name, platform->name )
-+ __string( name, platform->CODEC_NAME_FIELD )
- __field( int, id )
- __field( unsigned int, reg )
- __field( unsigned int, val )
- ),
-
- TP_fast_assign(
-- tp_strcpy(name, platform->name)
-- tp_assign(id, platform->id)
-+ tp_strcpy(name, platform->CODEC_NAME_FIELD)
-+ tp_assign(id, platform->CODEC_ID_FIELD)
- tp_assign(reg, reg)
- tp_assign(val, val)
- ),
-@@ -399,17 +407,17 @@ TRACE_EVENT(snd_soc_cache_sync,
- TP_ARGS(codec, type, status),
-
- TP_STRUCT__entry(
-- __string( name, codec->name )
-+ __string( name, codec->CODEC_NAME_FIELD )
- __string( status, status )
- __string( type, type )
- __field( int, id )
- ),
-
- TP_fast_assign(
-- tp_strcpy(name, codec->name)
-+ tp_strcpy(name, codec->CODEC_NAME_FIELD)
- tp_strcpy(status, status)
- tp_strcpy(type, type)
-- tp_assign(id, codec->id)
-+ tp_assign(id, codec->CODEC_ID_FIELD)
- ),
-
- TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
diff --git a/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch
index 30f825c414..bbfa38a0b5 100644
--- a/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch
+++ b/meta/recipes-kernel/lttng/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch
@@ -8,11 +8,11 @@ it as-is.
Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
-diff --git a/Makefile b/Makefile
-index a9d1cb1..c1b65b9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -43,19 +43,19 @@ obj-m += lib/
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -62,19 +62,19 @@ obj-m += lib/
endif # CONFIG_TRACEPOINTS
else # KERNELRELEASE
@@ -37,26 +37,11 @@ index a9d1cb1..c1b65b9 100644
- $(MAKE) -C $(KERNELDIR) M=$(PWD) $@
+ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) $@
endif # KERNELRELEASE
-diff --git a/README b/README
-index 8c5dd46..6bd3334 100644
---- a/README
-+++ b/README
-@@ -27,8 +27,8 @@ access to your full kernel source tree), and use:
- If you need to specify the target directory to the kernel you want to build
- against, use:
-
--% KERNELDIR=path_to_kernel_dir make
--# KERNELDIR=path_to_kernel_dir make modules_install
-+% KERNEL_SRC=path_to_kernel_dir make
-+# KERNEL_SRC=path_to_kernel_dir make modules_install
- # depmod -a kernel_version
-
- Use lttng-tools to control the tracer. LTTng tools should automatically load
-diff --git a/probes/Makefile b/probes/Makefile
-index 225803c..3449866 100644
---- a/probes/Makefile
-+++ b/probes/Makefile
-@@ -212,18 +212,18 @@ endif
+Index: git/probes/Makefile
+===================================================================
+--- git.orig/probes/Makefile
++++ git/probes/Makefile
+@@ -231,18 +231,18 @@ endif
endif
else
diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb
index 6ff961a9b1..4cf01caa51 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.5.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.6.0.bb
@@ -7,21 +7,16 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \
file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
DEPENDS = "virtual/kernel"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
inherit module
-SRCREV = "789fd1d06d07aeb9a403bdce1b3318560cfc6eca"
+SRCREV = "1b2a5429de815c95643df2eadf91253909708728"
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux'
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.5 \
+SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.6 \
file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
- file://Update-compaction-instrumentation-to-3.16-kernel.patch \
- file://Update-vmscan-instrumentation-to-3.16-kernel.patch \
- file://Fix-noargs-probes-should-calculate-alignment-and-eve.patch \
- file://Update-statedump-to-3.17-nsproxy-locking.patch \
- file://Update-kvm-instrumentation-compile-on-3.17-rc1.patch \
- file://fix_build_with_v3.17_kernel.patch \
"
export INSTALL_MOD_DIR="kernel/lttng-modules"
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
index fd44aa5f6d..f0969b5241 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.5.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
@@ -12,8 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
DEPENDS = "liburcu popt lttng-ust libxml2"
RDEPENDS_${PN}-ptest += "make perl bash"
-SRCREV = "8b27cacb277c2cdab791139b08da8eb87ab14a88"
-PV = "v2.5.0"
+SRCREV = "d522c1f14285e2e8b10b7c0cd011847696ffe779"
PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
@@ -21,16 +20,20 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/s
"
PACKAGECONFIG ??= "lttng-ust"
PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
-PACKAGECONFIG[lttng-ust] = ", --disable-lttng-ust, lttng-ust"
+PACKAGECONFIG[lttng-ust] = "--enable-lttng-ust, --disable-lttng-ust, lttng-ust"
+PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.5 \
+SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.6 \
file://runtest-2.4.0.patch \
file://run-ptest \
"
S = "${WORKDIR}/git"
-inherit autotools-brokensep ptest pkgconfig
+inherit autotools-brokensep ptest pkgconfig useradd
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "tracing"
export KERNELDIR="${STAGING_KERNEL_DIR}"
diff --git a/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch
new file mode 100644
index 0000000000..cec5410369
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust/add-aarch64.patch
@@ -0,0 +1,19 @@
+lttng-ust: add aarch64 recognition
+
+Treat the same as "arm".
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -230,6 +230,7 @@ changequote([,])dnl
+ s390) NO_UNALIGNED_ACCESS=1 ;;
+ s390x) NO_UNALIGNED_ACCESS=1 ;;
+ arm*) NO_UNALIGNED_ACCESS=1 ;;
++ aarch64) NO_UNALIGNED_ACCESS=1 ;;
+ mips*) NO_UNALIGNED_ACCESS=1 ;;
+ tile*) NO_UNALIGNED_ACCESS=1 ;;
+ *) AC_MSG_ERROR([unable to detect alignment requirements (unsupported architecture ($host_cpu)?)]) ;;
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.6.0.bb
index 71ea5bccf2..080e7448b2 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.5.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.6.0.bb
@@ -18,12 +18,12 @@ RPROVIDES_${PN} = "lttng2-ust"
RREPLACES_${PN} = "lttng2-ust"
RCONFLICTS_${PN} = "lttng2-ust"
-SRCREV = "ce59a997afdb7dc8af02b464430bb7e35549fa66"
-PV = "2.5.0"
+SRCREV = "5748584c5ae8ca5c4da26f41b6c61bb816e6d50b"
PE = "2"
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.5 \
+SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.6 \
file://lttng-ust-doc-examples-disable.patch \
+ file://add-aarch64.patch \
"
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index 7031ba142c..db670cfbb4 100644
--- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -4,8 +4,11 @@ LICENSE = "PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
SRC_URI = "file://modutils.sh \
file://PD.patch"
+
PR = "r7"
+S = "${WORKDIR}"
+
INITSCRIPT_NAME = "modutils.sh"
INITSCRIPT_PARAMS = "start 05 S ."
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index 69582039e8..49e6b16c1c 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -18,16 +18,16 @@ FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}"
FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
-SRC_URI = "file://opstart.patch \
+SRC_URI = "file://filemode-fix.patch \
file://acinclude.m4 \
file://automake-foreign.patch \
file://oprofile-cross-compile-tests.patch \
file://run-ptest \
file://root-home-dir.patch"
-inherit autotools-brokensep pkgconfig ptest
+inherit autotools pkgconfig ptest
-EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x"
+EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR} --without-x ac_cv_prog_XSLTPROC="
do_configure () {
cp ${WORKDIR}/acinclude.m4 ${S}/
autotools_do_configure
@@ -40,7 +40,6 @@ do_compile_ptest() {
do_install_ptest() {
subdirs="libdb/tests libutil++/tests libregex/tests libutil/tests libop/tests libdb/tests "
- cd ${S}
for tooltest in ${subdirs}
do
find ${tooltest} -perm /u=x -type f| cpio -pvdu ${D}${PTEST_PATH}
@@ -54,6 +53,6 @@ do_install_ptest() {
cp libregex/tests/mangled-name ${D}${PTEST_PATH}/libregex/tests
# needed by litutil++ file_manip_tests
- cp libutil++/tests/file_manip_tests.cpp \
+ cp ${S}/libutil++/tests/file_manip_tests.cpp \
libutil++/tests/file_manip_tests.o ${D}${PTEST_PATH}/libutil++/tests
}
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch
deleted file mode 100644
index 077da4bf2b..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Add-freescale-e500mc-support.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-From ca3f796b3a7742215ed35b56fc072595174c410e Mon Sep 17 00:00:00 2001
-From: Ting Liu <b28495@freescale.com>
-Date: Thu, 5 Sep 2013 07:43:55 -0500
-Subject: [PATCH 1/2] Add freescale e500mc support
-
-Upstream-Status: Backport
-
-Signed-off-by: George Stephen <Stephen.George@freescale.com>
-Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
-Signed-off-by: Ting Liu <b28495@freescale.com>
----
- events/Makefile.am | 1 +
- events/ppc/e500mc/events | 120 ++++++++++++++++++++++++++++++++++++++++++
- events/ppc/e500mc/unit_masks | 4 ++
- libop/op_cpu_type.c | 1 +
- libop/op_cpu_type.h | 1 +
- libop/op_events.c | 1 +
- utils/ophelp.c | 1 +
- 7 files changed, 129 insertions(+), 0 deletions(-)
- create mode 100644 events/ppc/e500mc/events
- create mode 100644 events/ppc/e500mc/unit_masks
-
-diff --git a/events/Makefile.am b/events/Makefile.am
-index be87781..e496f98 100644
---- a/events/Makefile.am
-+++ b/events/Makefile.am
-@@ -76,6 +76,7 @@ event_files = \
- ppc/7450/events ppc/7450/unit_masks \
- ppc/e500/events ppc/e500/unit_masks \
- ppc/e500v2/events ppc/e500v2/unit_masks \
-+ ppc/e500mc/events ppc/e500mc/unit_masks \
- ppc/e300/events ppc/e300/unit_masks \
- tile/tile64/events tile/tile64/unit_masks \
- tile/tilepro/events tile/tilepro/unit_masks \
-diff --git a/events/ppc/e500mc/events b/events/ppc/e500mc/events
-new file mode 100644
-index 0000000..8197a7d
---- /dev/null
-+++ b/events/ppc/e500mc/events
-@@ -0,0 +1,120 @@
-+# e500mc Events
-+#
-+# Copyright (C) 2010 Freescale Semiconductor, Inc.
-+#
-+event:0x1 counters:0,1,2,3 um:zero minimum:100 name:CPU_CLK : Cycles
-+event:0x2 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle)
-+event:0x3 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops (counts 2 for load/store w/update)
-+event:0x4 counters:0,1,2,3 um:zero minimum:500 name:INSTRUCTION_FETCHES : Instruction fetches
-+event:0x5 counters:0,1,2,3 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded
-+event:0x8 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed
-+event:0x9 counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed
-+event:0xa counters:0,1,2,3 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed
-+event:0xb counters:0,1,2,3 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects
-+event:0xc counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished
-+event:0xd counters:0,1,2,3 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished
-+event:0xe counters:0,1,2,3 um:zero minimum:500 name:BIFFED_BRANCHES_FINISHED : Biffed branches finished
-+event:0xf counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction
-+event:0x10 counters:0,1,2,3 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction
-+event:0x11 counters:0,1,2,3 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken
-+event:0x12 counters:0,1,2,3 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded
-+event:0x13 counters:0,1,2,3 um:zero minimum:500 name:ISSUE_STALLED : Cycles the issue buffer is not empty but 0 instructions issued
-+event:0x14 counters:0,1,2,3 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued
-+event:0x15 counters:0,1,2,3 um:zero minimum:500 name:SRS0_SCHEDULE_STALLED : Cycles SRS0 is not empty but 0 instructions scheduled
-+event:0x16 counters:0,1,2,3 um:zero minimum:500 name:SRS1_SCHEDULE_STALLED : Cycles SRS1 is not empty but 0 instructions scheduled
-+event:0x17 counters:0,1,2,3 um:zero minimum:500 name:VRS_SCHEDULE_STALLED : Cycles VRS is not empty but 0 instructions scheduled
-+event:0x18 counters:0,1,2,3 um:zero minimum:500 name:LRS_SCHEDULE_STALLED : Cycles LRS is not empty but 0 instructions scheduled
-+event:0x19 counters:0,1,2,3 um:zero minimum:500 name:BRS_SCHEDULE_STALLED : Cycles BRS is not empty but 0 instructions scheduled Load/Store, Data Cache, and dLFB Events
-+event:0x1a counters:0,1,2,3 um:zero minimum:500 name:TOTAL_TRANSLATED : Total Ldst microops translated.
-+event:0x1b counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED : Number of cacheable L* or EVL* microops translated. (This includes microops from load-multiple, load-update, and load-context instructions.)
-+event:0x1c counters:0,1,2,3 um:zero minimum:500 name:STORES_TRANSLATED : Number of cacheable ST* or EVST* microops translated. (This includes microops from store-multiple, store-update, and save-context instructions.)
-+event:0x1d counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED : Number of cacheable DCBT and DCBTST instructions translated (L1 only) (Does not count touches that are converted to nops i.e. exceptions, noncacheable, hid0[nopti] bit is set.)
-+event:0x1e counters:0,1,2,3 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi)
-+event:0x1f counters:0,1,2,3 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated
-+event:0x20 counters:0,1,2,3 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated
-+event:0x21 counters:0,1,2,3 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated
-+event:0x22 counters:0,1,2,3 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated.
-+event:0x23 counters:0,1,2,3 um:zero minimum:500 name:TOTAL_ALLOCATED_DLFB : Total allocated to dLFB
-+event:0x24 counters:0,1,2,3 um:zero minimum:500 name:LOADS_TRANSLATED_ALLOCATED_DLFB : Loads translated and allocated to dLFB (Applies to same class of instructions as loads translated.)
-+event:0x25 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED_ALLOCATED_DLFB : Stores completed and allocated to dLFB (Applies to same class of instructions as stores translated.)
-+event:0x26 counters:0,1,2,3 um:zero minimum:500 name:TOUCHES_TRANSLATED_ALLOCATED_DLFB : Touches translated and allocated to dLFB (Applies to same class of instructions as touches translated.)
-+event:0x27 counters:0,1,2,3 um:zero minimum:500 name:STORES_COMPLETED : Number of cacheable ST* or EVST* microops completed. (Applies to the same class of instructions as stores translated.)
-+event:0x28 counters:0,1,2,3 um:zero minimum:500 name:DL1_LOCKS : Number of cache lines locked in the dL1. (Counts a lock even if an overlock condition is encountered.)
-+event:0x29 counters:0,1,2,3 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason.
-+event:0x2a counters:0,1,2,3 um:zero minimum:500 name:DL1_CASTOUTS : dL1 castouts. Does not count castouts due to DCBF.
-+event:0x2b counters:0,1,2,3 um:zero minimum:500 name:DETECTED_REPLAYS : Times detected replay condition - Load miss with dLFB full.
-+event:0x2c counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_REPLAYS : Load miss with load queue full.
-+event:0x2d counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer.
-+event:0x2e counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full.
-+event:0x2f counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision.
-+event:0x30 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_REPLAYS : DMMU_MISS_REPLAYS : DMMU miss.
-+event:0x31 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_REPLAYS : DMMU_BUSY_REPLAYS : DMMU busy.
-+event:0x32 counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache.
-+event:0x33 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_DLFB_FULL_CYCLES : Cycles stalled on replay condition - Load miss with dLFB full.
-+event:0x34 counters:0,1,2,3 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full.
-+event:0x35 counters:0,1,2,3 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer.
-+event:0x36 counters:0,1,2,3 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full.
-+event:0x37 counters:0,1,2,3 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision.
-+event:0x38 counters:0,1,2,3 um:zero minimum:500 name:DMMU_MISS_CYCLES : Cycles stalled on replay condition - DMMU miss.
-+event:0x39 counters:0,1,2,3 um:zero minimum:500 name:DMMU_BUSY_CYCLES : Cycles stalled on replay condition - DMMU busy.
-+event:0x3a counters:0,1,2,3 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache.
-+event:0x3b counters:0,1,2,3 um:zero minimum:500 name:IL1_LOCKS : Number of cache lines locked in the iL1. (Counts a lock even if an overlock condition is encountered.)
-+event:0x3c counters:0,1,2,3 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch.
-+event:0x3d counters:0,1,2,3 um:zero minimum:500 name:FETCHES : Counts the number of fetches that write at least one instruction to the instruction buffer. (With instruction fetched, can used to compute instructions-per-fetch)
-+event:0x3e counters:0,1,2,3 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads
-+event:0x3f counters:0,1,2,3 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads
-+event:0x40 counters:0,1,2,3 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads
-+event:0x41 counters:0,1,2,3 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads
-+event:0x42 counters:0,1,2,3 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt
-+event:0x43 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_REQUESTS : Number of master transactions. (Number of master TSs.)
-+event:0x44 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_I_REQUESTS : Number of master I-Side transactions. (Number of master I-Side TSs.)
-+event:0x45 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_REQUESTS : Number of master D-Side transactions. (Number of master D-Side TSs.)
-+event:0x46 counters:0,1,2,3 um:zero minimum:500 name:BIU_MASTER_D_CASTOUT_REQUESTS : Number of master D-Side non-program-demand castout transactions. This counts replacement pushes and snoop pushes. This does not count DCBF castouts. (Number of master D-side non-program-demand castout TSs.)
-+event:0x48 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_REQUESTS : Number of externally generated snoop requests. (Counts snoop TSs.)
-+event:0x49 counters:0,1,2,3 um:zero minimum:500 name:SNOOP_HITS : Number of snoop hits on all D-side resources regardless of the cache state (modified, exclusive, or shared)
-+event:0x4a counters:0,1,2,3 um:zero minimum:500 name:SNOOP_PUSHES : Number of snoop pushes from all D-side resources. (Counts snoop ARTRY/WOPs.)
-+event:0x52 counters:0,1,2,3 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0.
-+event:0x53 counters:0,1,2,3 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0.
-+event:0x54 counters:0,1,2,3 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0.
-+event:0x55 counters:0,1,2,3 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0.
-+event:0x56 counters:0,1,2,3 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken
-+event:0x57 counters:0,1,2,3 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken
-+event:0x58 counters:0,1,2,3 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken
-+event:0x59 counters:0,1,2,3 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts
-+event:0x5b counters:0,1,2,3 um:zero minimum:500 name:L2_LINEFILL_REQ : Number L2 Linefill requests
-+event:0x5c counters:0,1,2,3 um:zero minimum:500 name:L2_VICTIM_SELECT : Number L2 Victim selects
-+event:0x6e counters:0,1,2,3 um:zero minimum:500 name:L2_ACCESS : Number L2 cache accesses
-+event:0x6f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_ACCESS : Number L2 hit cache accesses
-+event:0x70 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ACCESS : Number L2 data cache accesses
-+event:0x71 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_ACCESS : Number L2 hit data cache accesses
-+event:0x72 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ACCESS : Number L2 instruction cache accesses
-+event:0x73 counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_INST_ACCESS : Number L2 hit instruction cache accesses
-+event:0x74 counters:0,1,2,3 um:zero minimum:500 name:L2_ALLOC : Number L2 cache allocations
-+event:0x75 counters:0,1,2,3 um:zero minimum:500 name:L2_DATA_ALLOC : Number L2 data cache allocations
-+event:0x76 counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_DATA_ALLOC : Number L2 dirty data cache allocations
-+event:0x77 counters:0,1,2,3 um:zero minimum:500 name:L2_INST_ALLOC : Number L2 instruction cache allocations
-+event:0x78 counters:0,1,2,3 um:zero minimum:500 name:L2_UPDATE : Number L2 cache updates
-+event:0x79 counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_UPDATE : Number L2 cache clean updates
-+event:0x7a counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_UPDATE : Number L2 cache dirty updates
-+event:0x7b counters:0,1,2,3 um:zero minimum:500 name:L2_CLEAN_REDU_UPDATE : Number L2 cache clean redundant updates
-+event:0x7c counters:0,1,2,3 um:zero minimum:500 name:L2_DIRTY_REDU_UPDATE : Number L2 cache dirty redundant updates
-+event:0x7d counters:0,1,2,3 um:zero minimum:500 name:L2_LOCKS : Number L2 cache locks
-+event:0x7e counters:0,1,2,3 um:zero minimum:500 name:L2_CASTOUT : Number L2 cache castouts
-+event:0x7f counters:0,1,2,3 um:zero minimum:500 name:L2_HIT_DATA_DIRTY : Number L2 cache data dirty hits
-+event:0x82 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_CLEAN : Number L2 cache invalidation of clean lines
-+event:0x83 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_INCOHER : Number L2 cache invalidation of incoherent lines
-+event:0x84 counters:0,1,2,3 um:zero minimum:500 name:L2_INV_COHER : Number L2 cache invalidation of coherent lines
-+event:0x94 counters:0,1,2,3 um:zero minimum:500 name:DVT0 : Detection of write to DEVENT with DVT0 set
-+event:0x95 counters:0,1,2,3 um:zero minimum:500 name:DVT1 : Detection of write to DEVENT with DVT1 set
-+event:0x96 counters:0,1,2,3 um:zero minimum:500 name:DVT2 : Detection of write to DEVENT with DVT2 set
-+event:0x97 counters:0,1,2,3 um:zero minimum:500 name:DVT3 : Detection of write to DEVENT with DVT3 set
-+event:0x98 counters:0,1,2,3 um:zero minimum:500 name:DVT4 : Detection of write to DEVENT with DVT4 set
-+event:0x99 counters:0,1,2,3 um:zero minimum:500 name:DVT5 : Detection of write to DEVENT with DVT5 set
-+event:0x9a counters:0,1,2,3 um:zero minimum:500 name:DVT6 : Detection of write to DEVENT with DVT6 set
-+event:0x9b counters:0,1,2,3 um:zero minimum:500 name:DVT7 : Detection of write to DEVENT with DVT7 set
-+event:0x9c counters:0,1,2,3 um:zero minimum:500 name:CYCLES_NEXUS_STALLED : Number of completion cycles stalled due to Nexus FIFO full
-+event:0xb0 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_LOAD : Number of decorated loads.
-+event:0xb1 counters:0,1,2,3 um:zero minimum:500 name:DECORATED_STORE : Number of decorated stores
-+event:0xb2 counters:0,1,2,3 um:zero minimum:500 name:LOAD_RETRY : Number of load retries
-+event:0xb3 counters:0,1,2,3 um:zero minimum:500 name:STWCX_SUCCESS : Number of successful stwcx. instructions
-+event:0xb4 counters:0,1,2,3 um:zero minimum:500 name:STWCX_UNSUCCESS : Number of unsuccessful stwcx. instructions
-diff --git a/events/ppc/e500mc/unit_masks b/events/ppc/e500mc/unit_masks
-new file mode 100644
-index 0000000..395c653
---- /dev/null
-+++ b/events/ppc/e500mc/unit_masks
-@@ -0,0 +1,4 @@
-+# e500 possible unit masks
-+#
-+name:zero type:mandatory default:0x0
-+ 0x0 No unit mask
-diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c
-index 89d5a92..7d50a2d 100644
---- a/libop/op_cpu_type.c
-+++ b/libop/op_cpu_type.c
-@@ -125,6 +125,7 @@ static struct cpu_descr const cpu_descrs[MAX_CPU_TYPE] = {
- { "AMD64 generic", "x86-64/generic", CPU_AMD64_GENERIC, 4 },
- { "IBM Power Architected Events V1", "ppc64/architected_events_v1", CPU_PPC64_ARCH_V1, 6 },
- { "ppc64 POWER8", "ppc64/power8", CPU_PPC64_POWER8, 6 },
-+ { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 },
- };
-
- static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr);
-diff --git a/libop/op_cpu_type.h b/libop/op_cpu_type.h
-index aeb6bb2..10f000b 100644
---- a/libop/op_cpu_type.h
-+++ b/libop/op_cpu_type.h
-@@ -105,6 +105,7 @@ typedef enum {
- CPU_AMD64_GENERIC, /**< AMD64 Generic */
- CPU_PPC64_ARCH_V1, /** < IBM Power architected events version 1 */
- CPU_PPC64_POWER8, /**< ppc64 POWER8 family */
-+ CPU_PPC_E500MC, /**< e500mc */
- MAX_CPU_TYPE
- } op_cpu;
-
-diff --git a/libop/op_events.c b/libop/op_events.c
-index bb86833..638dc5c 100644
---- a/libop/op_events.c
-+++ b/libop/op_events.c
-@@ -1308,6 +1308,7 @@ void op_default_event(op_cpu cpu_type, struct op_default_event_descr * descr)
-
- case CPU_PPC_E500:
- case CPU_PPC_E500_2:
-+ case CPU_PPC_E500MC:
- case CPU_PPC_E300:
- descr->name = "CPU_CLK";
- break;
-diff --git a/utils/ophelp.c b/utils/ophelp.c
-index 1b913ca..0647360 100644
---- a/utils/ophelp.c
-+++ b/utils/ophelp.c
-@@ -753,6 +753,7 @@ int main(int argc, char const * argv[])
-
- case CPU_PPC_E500:
- case CPU_PPC_E500_2:
-+ case CPU_PPC_E500MC:
- event_doc =
- "See PowerPC e500 Core Complex Reference Manual\n"
- "Chapter 7: Performance Monitor\n"
---
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
deleted file mode 100644
index a2385cd2b2..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-AArch64-architecture.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 27edaef9c6d66dfc324630ef40cb27e78031eeeb Mon Sep 17 00:00:00 2001
-From: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-Date: Tue, 15 Jan 2013 07:37:33 +0100
-Subject: [PATCH] Add rmb() definition for AArch64 architecture
-
-Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
-
-Upstream-Status: backport
----
- libperf_events/operf_utils.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
-index 815d51d..2df00b7 100644
---- a/libperf_events/operf_utils.h
-+++ b/libperf_events/operf_utils.h
-@@ -148,6 +148,11 @@ void op_release_resources(void);
- #define cpu_relax() asm volatile("":::"memory")
- #endif
-
-+#ifdef __aarch64__
-+#define rmb() asm volatile("dmb ld" ::: "memory")
-+#define cpu_relax() asm volatile("yield" ::: "memory")
-+#endif
-+
- #ifdef __mips__
- #include <asm/unistd.h>
- #define rmb() asm volatile( \
---
-1.8.0
-
diff --git a/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch b/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch
deleted file mode 100644
index 93c62400cf..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0001-Tidy-powerpc64-bfd-target-check.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-Upstream-Status: Backport
-
-From 63b5692aace5ff6022f892822b4bfdc51ed25bfb Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Fri, 2 May 2014 07:54:08 -0500
-Subject: [PATCH] Tidy powerpc64 bfd target check
-
-Testing for a bfd_target vector might (will!) break. See
-https://sourceware.org/ml/binutils/2014-04/msg00283.html
-
-It's safer to ask BFD for the target name. I left the direct target
-vector checks in configure tests, and updated them, even though the
-target vector is no longer used in oprofile code, because a run-time
-configure test for powerpc64 support in bfd:
- #include <bfd.h>
- int main(void)
- { return !bfd_find_target("elf64-powerpc", (void *)0); }
-unfortunately isn't possible when cross-compiling.
-
-The bfd_target vector tests could be omitted if we aren't bothered by
-the small runtime overhead of a strncmp on targets other than
-powerpc64.
-
- * libutil++/bfd_support.cpp (get_synth_symbols): Don't check for
- ppc64 target vector, use bfd_get_target to return the target
- name instead.
- * m4/binutils.m4: Modernize bfd_get_synthetic_symtab checks to
- use AC_LINK_IFELSE. Check for either powerpc_elf64_vec or
- bfd_elf64_powerpc_vec.
-
-Signed-off-by: Alan Modra <amodra@gmail.com>
----
- libutil++/bfd_support.cpp | 10 +++++++--
- m4/binutils.m4 | 50 ++++++++++++++++++++++-----------------------
- 2 files changed, 33 insertions(+), 27 deletions(-)
-
-Index: oprofile-0.9.9/libutil++/bfd_support.cpp
-===================================================================
---- oprofile-0.9.9.orig/libutil++/bfd_support.cpp 2013-07-29 08:55:06.000000000 -0700
-+++ oprofile-0.9.9/libutil++/bfd_support.cpp 2014-05-02 09:12:05.761146347 -0700
-@@ -633,10 +633,16 @@
-
- bool bfd_info::get_synth_symbols()
- {
-- extern const bfd_target bfd_elf64_powerpc_vec;
-- extern const bfd_target bfd_elf64_powerpcle_vec;
-- bool is_elf64_powerpc_target = (abfd->xvec == &bfd_elf64_powerpc_vec)
-- || (abfd->xvec == &bfd_elf64_powerpcle_vec);
-+ const char* targname = bfd_get_target(abfd);
-+ // Match elf64-powerpc and elf64-powerpc-freebsd, but not
-+ // elf64-powerpcle. elf64-powerpcle is a different ABI without
-+ // function descriptors, so we don't need the synthetic
-+ // symbols to have function code marked by a symbol.
-+ bool is_elf64_powerpc_target = (!strncmp(targname, "elf64-powerpc", 13)
-+ && (targname[13] == 0
-+ || targname[13] == '-'));
-+
-+
-
- if (!is_elf64_powerpc_target)
- return false;
-Index: oprofile-0.9.9/m4/binutils.m4
-===================================================================
---- oprofile-0.9.9.orig/m4/binutils.m4 2013-07-29 08:55:07.000000000 -0700
-+++ oprofile-0.9.9/m4/binutils.m4 2014-05-02 09:07:32.471148147 -0700
-@@ -22,32 +22,32 @@
-
- AC_LANG_PUSH(C)
- # Determine if bfd_get_synthetic_symtab macro is available
--OS="`uname`"
--if test "$OS" = "Linux"; then
-- AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
-- rm -f test-for-synth
-- AC_LANG_CONFTEST(
-- [AC_LANG_PROGRAM([[#include <bfd.h>]],
-- [[asymbol * synthsyms; bfd * ibfd = 0;
-- long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-- extern const bfd_target bfd_elf64_powerpc_vec;
-- extern const bfd_target bfd_elf64_powerpcle_vec;
-- char * ppc_name = bfd_elf64_powerpc_vec.name;
-- char * ppcle_name = bfd_elf64_powerpcle_vec.name;
-- printf("%s %s\n", ppc_name, ppcle_name);]])
-- ])
-- $CC conftest.$ac_ext $CFLAGS $LDFLAGS $LIBS -o test-for-synth > /dev/null 2>&1
-- if test -f test-for-synth; then
-- echo "yes"
-- SYNTHESIZE_SYMBOLS='1'
-- else
-- echo "no"
-- SYNTHESIZE_SYMBOLS='0'
-- fi
-- AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed])
-- rm -f test-for-synth*
-+AC_MSG_CHECKING([whether bfd_get_synthetic_symtab() exists in BFD library])
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h>
-+ ]],
-+ [[asymbol * synthsyms; bfd * ibfd = 0;
-+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-+ extern const bfd_target powerpc_elf64_vec;
-+ char *ppc_name = powerpc_elf64_vec.name;
-+ printf("%s\n", ppc_name);
-+ ]])],
-+ [AC_MSG_RESULT([yes])
-+ SYNTHESIZE_SYMBOLS=2],
-+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <bfd.h>
-+ ]],
-+ [[asymbol * synthsyms; bfd * ibfd = 0;
-+ long synth_count = bfd_get_synthetic_symtab(ibfd, 0, 0, 0, 0, &synthsyms);
-+ extern const bfd_target bfd_elf64_powerpc_vec;
-+ char *ppc_name = bfd_elf64_powerpc_vec.name;
-+ printf("%s\n", ppc_name);
-+ ]])],
-+ [AC_MSG_RESULT([yes])
-+ SYNTHESIZE_SYMBOLS=1],
-+ [AC_MSG_RESULT([no])
-+ SYNTHESIZE_SYMBOLS=0])
-+ ])
-+AC_DEFINE_UNQUOTED(SYNTHESIZE_SYMBOLS, $SYNTHESIZE_SYMBOLS, [Synthesize special symbols when needed])
-
--fi
- AC_LANG_POP(C)
- ]
- )
diff --git a/meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch b/meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch
deleted file mode 100644
index 9b2ae042c6..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/0002-Add-freescale-e6500-support.patch
+++ /dev/null
@@ -1,364 +0,0 @@
-From b91794fd855177946719b34ea5cd3822c7993caa Mon Sep 17 00:00:00 2001
-From: Ting Liu <b28495@freescale.com>
-Date: Thu, 5 Sep 2013 07:45:52 -0500
-Subject: [PATCH 2/2] Add freescale e6500 support
-
-Upstream-Status: Backport
-
-Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
-Signed-off-by: Ting Liu <b28495@freescale.com>
----
- events/Makefile.am | 1 +
- events/ppc/e6500/events | 266 +++++++++++++++++++++++++++++++++++++++++++
- events/ppc/e6500/unit_masks | 4 +
- libop/op_cpu_type.c | 1 +
- libop/op_cpu_type.h | 1 +
- libop/op_events.c | 1 +
- utils/ophelp.c | 1 +
- 7 files changed, 275 insertions(+), 0 deletions(-)
- create mode 100644 events/ppc/e6500/events
- create mode 100644 events/ppc/e6500/unit_masks
-
-diff --git a/events/Makefile.am b/events/Makefile.am
-index e496f98..d91d44b 100644
---- a/events/Makefile.am
-+++ b/events/Makefile.am
-@@ -77,6 +77,7 @@ event_files = \
- ppc/e500/events ppc/e500/unit_masks \
- ppc/e500v2/events ppc/e500v2/unit_masks \
- ppc/e500mc/events ppc/e500mc/unit_masks \
-+ ppc/e6500/events ppc/e6500/unit_masks \
- ppc/e300/events ppc/e300/unit_masks \
- tile/tile64/events tile/tile64/unit_masks \
- tile/tilepro/events tile/tilepro/unit_masks \
-diff --git a/events/ppc/e6500/events b/events/ppc/e6500/events
-new file mode 100644
-index 0000000..f34f82d
---- /dev/null
-+++ b/events/ppc/e6500/events
-@@ -0,0 +1,266 @@
-+# e6500 Events
-+#
-+# Copyright (C) 2012 Freescale Semiconductor, Inc.
-+#
-+event:0x1 counters:0,1,2,3,4,5 um:zero minimum:100 name:CPU_CLK : Cycles
-+event:0x2 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_INSNS : Completed Instructions (0, 1, or 2 per cycle)
-+event:0x3 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_OPS : Completed Micro-ops
-+event:0x5 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECODED_OPS : Micro-ops decoded
-+event:0x6 counters:0,1,2,3,4,5 um:zero minimum:500 name:TRANSITIONS_PM_EVENT : 0 to 1 transitions on the pm_event input
-+event:0x7 counters:0,1,2,3,4,5 um:zero minimum:500 name:CPU_CLK_PM_EVENT : Processor cycles that occur when the pm_event input is asserted
-+event:0x8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_BRANCHES : Branch Instructions completed
-+event:0x9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_LOAD_OPS : Load micro-ops completed
-+event:0xa counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_STORE_OPS : Store micro-ops completed
-+event:0xb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETION_REDIRECTS : Number of completion buffer redirects
-+event:0xc counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_FINISHED : Branches finished
-+event:0xd counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED : Taken branches finished
-+event:0xe counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES_FINISHED_NOT_BTB : Finished unconditional branches that miss the BTB
-+event:0xf counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_MISPREDICTED : Branch instructions mispredicted due to direction, target, or IAB prediction
-+event:0x10 counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCHES_MISPREDICTED_DIRECTION : Branches mispredicted due to direction prediction
-+event:0x11 counters:0,1,2,3,4,5 um:zero minimum:500 name:BTB_HITS : Branches that hit in the BTB, or missed but are not taken
-+event:0x12 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECODE_STALLED : Cycles the instruction buffer was not empty, but 0 instructions decoded
-+event:0x13 counters:0,1,2,3,4,5 um:zero minimum:500 name:ISSUE_STALLED : Cycles the SFX/CFX issue queue is not empty but 0 instructions issued
-+event:0x14 counters:0,1,2,3,4,5 um:zero minimum:500 name:BRANCH_ISSUE_STALLED : Cycles the branch buffer is not empty but 0 instructions issued
-+event:0x15 counters:0,1,2,3,4,5 um:zero minimum:500 name:SFX0_SCHEDULE_STALLED : Cycles SFX0 is not empty but 0 instructions scheduled
-+event:0x16 counters:0,1,2,3,4,5 um:zero minimum:500 name:SFX1_SCHEDULE_STALLED : Cycles SFX1 is not empty but 0 instructions scheduled
-+event:0x17 counters:0,1,2,3,4,5 um:zero minimum:500 name:CFX_SCHEDULE_STALLED : Cycles CFX is not empty but 0 instructions scheduled
-+event:0x18 counters:0,1,2,3,4,5 um:zero minimum:500 name:LSU_SCHEDULE_STALLED : Cycles LSU is not empty but 0 instructions scheduled
-+event:0x19 counters:0,1,2,3,4,5 um:zero minimum:500 name:BU_SCHEDULE_STALLED : Cycles BU is not empty but 0 instructions scheduled
-+event:0x1a counters:0,1,2,3,4,5 um:zero minimum:500 name:TOTAL_TRANSLATED : Total LSU micro-ops that reach the second stage of the LSU
-+event:0x1b counters:0,1,2,3,4,5 um:zero minimum:500 name:LOADS_TRANSLATED : Cacheable load micro-ops translated.1 (Does not include WT)
-+event:0x1c counters:0,1,2,3,4,5 um:zero minimum:500 name:STORES_TRANSLATED : Cacheable store micro-ops translated.1 (Does not include WT)
-+event:0x1d counters:0,1,2,3,4,5 um:zero minimum:500 name:TOUCHES_TRANSLATED : Cacheable touch instructions translated. Includes: dcbt / dcbtep dcbtst / dcbtstep icbt ct=2
-+event:0x1e counters:0,1,2,3,4,5 um:zero minimum:500 name:CACHEOPS_TRANSLATED : Number of dcba, dcbf, dcbst, and dcbz instructions translated (e500 traps on dcbi)
-+event:0x1f counters:0,1,2,3,4,5 um:zero minimum:500 name:CACHEINHIBITED_ACCESSES_TRANSLATED : Number of cache inhibited accesses translated
-+event:0x20 counters:0,1,2,3,4,5 um:zero minimum:500 name:GUARDED_LOADS_TRANSLATED : Number of guarded loads translated
-+event:0x21 counters:0,1,2,3,4,5 um:zero minimum:500 name:WRITETHROUGH_STORES_TRANSLATED : Number of write-through stores translated
-+event:0x22 counters:0,1,2,3,4,5 um:zero minimum:500 name:MISALIGNED_ACCESSES_TRANSLATED : Number of misaligned load or store accesses translated.
-+event:0x23 counters:0,1,2,3,4,5 um:zero minimum:500 name:FETCH_2X4_HITS : Each fetch retrieves up to 8 instructions, but only the first 4 are required. This event increments if at least one instruction of the second 4 are actually used.
-+event:0x24 counters:0,1,2,3,4,5 um:zero minimum:500 name:FETCH_HITS_ON_PREFETCHES : Fetch hits on instruction prefetch when the data is still in the ILFB.
-+event:0x25 counters:0,1,2,3,4,5 um:zero minimum:500 name:GENERATED_FETCH_PREFETCHES : Number of prefetches generated.
-+event:0x29 counters:0,1,2,3,4,5 um:zero minimum:500 name:DL1_RELOADS : This is historically used to determine dcache miss rate (along with loads/stores completed). This counts dL1 reloads for any reason.
-+event:0x2c counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_MISS_WITH_LOAD_QUEUE_FULL : Counts number of stalls; Com:52 counts cycles stalled. Includes: cacheable loads, CI loads, loadec, larx, touches, ibll, ibsl,ibllsl
-+event:0x2d counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_REPLAYS : Load guarded miss when the load is not yet at the bottom of the completion buffer.
-+event:0x2e counters:0,1,2,3,4,5 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_REPLAYS : Translate a store when the StQ is full.
-+event:0x2f counters:0,1,2,3,4,5 um:zero minimum:500 name:ADDRESS_COLLISION_REPLAYS : Address collision.
-+event:0x30 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_MISS_REPLAYS : Counts number of stalls; Com:56 counts cycles stalled.
-+event:0x31 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_BUSY_REPLAYS : Counts number of stalls; Com:57 counts cycles stalled.
-+event:0x32 counters:0,1,2,3,4,5 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_REPLAYS : Second part of misaligned access when first part missed in cache.
-+event:0x34 counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_MISS_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Load miss with load queue full.
-+event:0x35 counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_GUARDED_MISS_NOT_LAST_CYCLES : Cycles stalled on replay condition - Load guarded miss when the load is not yet at the bottom of the completion buffer.
-+event:0x36 counters:0,1,2,3,4,5 um:zero minimum:500 name:STORE_TRANSLATED_QUEUE_FULL_CYCLES : Cycles stalled on replay condition - Translate a store when the StQ is full.
-+event:0x37 counters:0,1,2,3,4,5 um:zero minimum:500 name:ADDRESS_COLLISION_CYCLES : Cycles stalled on replay condition - Address collision.
-+event:0x38 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_MISS_CYCLES : Cycles stalled on replay condition - DTLB miss.
-+event:0x39 counters:0,1,2,3,4,5 um:zero minimum:500 name:DTLB_BUSY_CYCLES : Cycles stalled on replay condition - DTLB busy.
-+event:0x3a counters:0,1,2,3,4,5 um:zero minimum:500 name:SECOND_PART_MISALIGNED_AFTER_MISS_CYCLES : Cycles stalled on replay condition - Second part of misaligned access when first part missed in cache.
-+event:0x3c counters:0,1,2,3,4,5 um:zero minimum:500 name:IL1_FETCH_RELOADS : This is historically used to determine icache miss rate (along with instructions completed) Reloads due to demand fetch.
-+event:0x3d counters:0,1,2,3,4,5 um:zero minimum:500 name:FETCHES : Counts fetches that write at least one instruction to the Instruction Buffer.
-+event:0x3e counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_TLB4K_RELOADS : iMMU TLB4K reloads
-+event:0x3f counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_VSP_RELOADS : iMMU VSP reloads
-+event:0x40 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_TLB4K_RELOADS : dMMU TLB4K reloads
-+event:0x41 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_VSP_RELOADS : dMMU VSP reloads
-+event:0x42 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_MISSES : Counts iTLB/dTLB error interrupt
-+event:0x43 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BRANCHES : Completed branch instructions that were taken.
-+event:0x44 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BLR : Completed blr instructions that were taken.
-+event:0x45 counters:0,1,2,3,4,5 um:zero minimum:500 name:BTB_TARGET_MISPREDICT : Number of target mispredicts (BTB).
-+event:0x46 counters:0,1,2,3,4,5 um:zero minimum:500 name:MISPREDICT_TARGET_BLR : Number of link stack mispredicts (LS).
-+event:0x47 counters:0,1,2,3,4,5 um:zero minimum:500 name:TAKEN_BTB_BUT_MISS : Number of BTB misses, but taken (BTB allocates).
-+event:0x52 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC0_OVERFLOW : Counts the number of times PMC0[32] transitioned from 1 to 0.
-+event:0x53 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC1_OVERFLOW : Counts the number of times PMC1[32] transitioned from 1 to 0.
-+event:0x54 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC2_OVERFLOW : Counts the number of times PMC2[32] transitioned from 1 to 0.
-+event:0x55 counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC3_OVERFLOW : Counts the number of times PMC3[32] transitioned from 1 to 0.
-+event:0x56 counters:0,1,2,3,4,5 um:zero minimum:500 name:INTERRUPTS : Number of interrupts taken
-+event:0x57 counters:0,1,2,3,4,5 um:zero minimum:500 name:EXTERNAL_INTERRUPTS : Number of external input interrupts taken
-+event:0x58 counters:0,1,2,3,4,5 um:zero minimum:500 name:CRITICAL_INTERRUPTS : Number of critical input interrupts taken
-+event:0x59 counters:0,1,2,3,4,5 um:zero minimum:500 name:SC_TRAP_INTERRUPTS : Number of system call and trap interrupts
-+event:0x5a counters:0,1,2,3,4,5 um:zero minimum:500 name:TBL_BIT_TRANS_PMGC0 : Counts transitions of the TBL bit selected by PMGC0[TBSEL].
-+event:0x5b counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC4_OVERFLOW : Counts the number of times PMC4[32] transitioned from 1 to 0.
-+event:0x5c counters:0,1,2,3,4,5 um:zero minimum:500 name:PMC5_OVERFLOW : Counts the number of times PMC5[32] transitioned from 1 to 0.
-+event:0x61 counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_STASH_HIT : Stash hits in L1 Data Cache.
-+event:0x63 counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_STASH_REQ : Stash requests to L1 Data Cache.
-+event:0x64 counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_LSU_THREAD_PRIO_SWTICHED : Number of times the Load Store Unit thread priority switched based on resource collisions.
-+event:0x65 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_FPU_DENIED : Number of cycles both threads had Floating Point Unit requests and one was denied.
-+event:0x66 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_VPERM_DENIED : Number of cycles both threads had Altivec Permute requests and one was denied.
-+event:0x67 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_VGEN_DENIED : Number of cycles both threads had Altivec General requests and one was denied.
-+event:0x68 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_CFX_DENIED : Number of cycles both threads had Complex Fixed-Point Unit requests and one was denied.
-+event:0x69 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_REQ_FETCH_DENIED : Number of cycles both threads both threads made a Fetch request to the L1 Instruction Cache and one thread wins arbitration.
-+event:0x6e counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LSU_ISSUE_STALLED : Cycles the LSU issue queue is not empty but 0 instructions issued.
-+event:0x6f counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_ISSUE_STALLED : Cycles the FPU issue queue is not empty but 0 instructions issued.
-+event:0x70 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_ALTIVEC_ISSUE_STALLED : Cycles the AltiVec issue queue is not empty but 0 instructions issued.
-+event:0x71 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_SCHEDULE_STALLED : Cycles FPU is not empty but 0 instructions scheduled.
-+event:0x72 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VPERM_SCHEDULE_STALLED : Cycles VPERM is not empty but 0 instructions scheduled.
-+event:0x73 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VGEN_SCHEDULE_STALLED : Cycles VGEN is not empty but 0 instructions scheduled.
-+event:0x74 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VPU_INSTRUCTION_WAIT_FOR_OPERA : Cycles VPU instruction waits for operands.
-+event:0x75 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VFPU_INSTRUCTION_WAIT_FOR_OPERA : Cycles VFPU instruction waits for operands.
-+event:0x76 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VSFX_INSTRUCTION_WAIT_FOR_OPERA : Cycles VSFX instruction waits for operands
-+event:0x77 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VCFX_INSTRUCTION_WAIT_FOR_OPERA : Cycles VCFX instruction waits for operands.
-+event:0x7a counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_IB_EMPT : Number of cycles the Instruction Buffer is empty
-+event:0x7b counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_IB_FULL : Number of cycles the Instruction Buffer is full enough such that fetch stops fetching.
-+event:0x7c counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_CB_EMPT : Number of cycles the Completion Buffer is empty.
-+event:0x7d counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_CB_FULL : Number of cycles the Completion Buffer is full enough such that decode stops.
-+event:0x7e counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_PRESYNC_SI_IB : Number of cycles a pre-sync serialized instruction holds in the Instruction Buffer and is not decoded.
-+event:0x7f counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CLK_0_INSTRUCTIONS : Increments if 0 instructions (micro-ops) completed.
-+event:0x80 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CLK_1_INSTRUCTIONS : Increments if 1 instruction (micro-op) completed.
-+event:0x80 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CLK_2_INSTRUCTIONS : Increments if 2 instructions (micro-op) completed.
-+event:0x88 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC5S : Every valid IAC5 detection.
-+event:0x89 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC6S : Every valid IAC6 detection.
-+event:0x8a counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC7S : Every valid IAC7 detection.
-+event:0x8b counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC8S : Every valid IAC8 detection.
-+event:0x8c counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC1S : Every valid IAC1 detection.
-+event:0x8d counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC2S : Every valid IAC2 detection.
-+event:0x8e counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC3S : Every valid IAC3 detection.
-+event:0x8f counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_IAC4S : Every valid IAC4 detection.
-+event:0x90 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DAC1S : Every valid DAC1 detection.
-+event:0x91 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DAC2S : Every valid DAC2 detection.
-+event:0x94 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT0 : Detection of a write to DEVENT SPR with DVT0 set.
-+event:0x95 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT1 : Detection of a write to DEVENT SPR with DVT1 set.
-+event:0x96 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT2 : Detection of a write to DEVENT SPR with DVT2 set.
-+event:0x97 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT3 : Detection of a write to DEVENT SPR with DVT3 set.
-+event:0x98 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT4 : Detection of a write to DEVENT SPR with DVT4 set.
-+event:0x99 counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT5 : Detection of a write to DEVENT SPR with DVT5 set.
-+event:0x9a counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT6 : Detection of a write to DEVENT SPR with DVT6 set.
-+event:0x9b counters:0,1,2,3,4,5 um:zero minimum:500 name:DETECTED_DVT7 : Detection of a write to DEVENT SPR with DVT7 set.
-+event:0x9c counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_COMPLETION_STALLED : Number of completion cycles stalled due to Nexus FIFO full.
-+event:0xa1 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_FINISH : FPU finish.
-+event:0xa2 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_DIV : Counts once for every cycle of divide execution. (fdivs and fdiv).
-+event:0xa3 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_DENORM_INPUT : Counts extra cycles delay due to denormalized inputs. If there is one, this is incremented 4 times, Two operands increments it 5 times. This shows the real penalty due to denorms, not just how often they occur.
-+event:0xa4 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_DENORM_OUTPUT : FPU denorm output.
-+event:0xa5 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_FPSCR_FULL_STALL : FPU FPSCR stall.
-+event:0xa6 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_PIPE_SYNC_STALL : Synchronization-op stalls: count once for each cycle that a ��break-before�� FPU is in the RS/issue stage but cannotissue. Also count once for each cycle that an FPU op is in the RS/issue stage but cannot issue due to ��break-after��: of an FPU op currently in progress.
-+event:0xa7 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_INPUT_DATA_STALL : FPU data-ready stall: cycles in which there is an op in the RS/issue stage that cannot issue because one or more of its operands is not yet available.
-+event:0xa8 counters:0,1,2,3,4,5 um:zero minimum:500 name:FPU_INSTRUCTIONS_GEN_FLAG : FPU instruction sets FPSCR[FEX].
-+event:0xac counters:0,1,2,3,4,5 um:zero minimum:500 name:PW20_CNT : Number of times the core enters the PW20 power management state.
-+event:0xb0 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECORATED_LOADS : Number of decorated loads to cache inhibited memory performed.
-+event:0xb1 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECORATED_STORES : Number of decorated stores to cache inhibited memory performed.
-+event:0xb3 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_INSTRUCTIONS_SUCC : Number of successful stbcx., sthcx., stwcx., or stdcx. instructions.
-+event:0xb4 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_INSTRUCTIONS_UNSUCC : Number of unsuccessful stbcx., sthcx., stwcx., or stdcx. instructions.
-+event:0xb5 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_LSU_MICROOPS : Completed Load Store Unit micro-ops. Every micro-op that goes down the LSU pipe. Includes: GPR loads / GPR stores, FPR loads / FPR stores, VR loads / VR stores, Cache ops. Memory barriers Other LSU ops (dsn, msgsnd, mvidsplt, mviwsplt, tlbilx, tlbivax, tlbsync)
-+event:0xb6 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_GPR_LOADS : GPR load micro-ops completed. This event only counts once for misaligns. Note that lmw that causes a fault may end up double-counting micro-ops -- once for first pass, once for second pass.
-+event:0xb7 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_GPR_STORES : GPR store micro-ops completed. This event only counts once for misaligns. Note that stmw that causes a fault may end up double-counting micro-ops -- once for first pass, once for second pass.
-+event:0xb8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CACHEOPS : Cache ops completed. Includes: dcba / dcbal, dcbf / dcbfep, dcbi, dcblc / dcblq, dcbst / dcbstep, dcbt / dcbtep / dcbtls, dcbtst / dcbtstep / dcbtstls, dcbz / dcbzep / dcbzl / dcbzlep, icbi / icbiep, icblc / icblq., icbt / icbtls
-+event:0xb9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_MEM_BARRIERS : Memory barriers completed. Includes: msync (sync, lwsync, elemental barriers) mbar (eieio) miso.
-+event:0xba counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SFX_MICROOPS : SFX micro-ops completed.
-+event:0xbb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SINCLK_SFX_MICROOPS : SFX single-cycle micro-ops completed.
-+event:0xbc counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_DBLCLK_SFX_MICROOPS : SFX double-cycle micro-ops completed.
-+event:0xbe counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_CFX_INSTRUCTIONS : CFX instructions completed.
-+event:0xbf counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_SFX_CFX_INSTRUCTIONS : SFX or CFX instructions completed.
-+event:0xc0 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPU_INSTRUCTIONS : FPU instructions completed.
-+event:0xc1 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_LOADS : FPR load micro-ops completed.
-+event:0xc2 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_STORES : FPR store micro-ops completed.
-+event:0xc3 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_MICROOPS_LOADS_STORES : FPR load and store micro-ops completed.
-+event:0xc4 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_SINPRECISE_LOADS_STORES : FPR single-precision load and store micro-ops completed.
-+event:0xc5 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_FPR_DBLPRECISE_LOADS_STORES : FPR double-precision load and store micro-ops completed.
-+event:0xc6 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_INSTRUCTIONS : AltiVec instructions completed. (non-LSU).
-+event:0xc7 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VSFX_INSTRUCTIONS : AltiVec VSFX instructions completed.
-+event:0xc8 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VCFX_INSTRUCTIONS : AltiVec VCFX instructions completed.
-+event:0xc9 counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VPU_INSTRUCTIONS : AltiVec VPU instructions completed.
-+event:0xca counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_ALTIVEC_VFPU_INSTRUCTIONS : AltiVec VFPU instructions completed.
-+event:0xcb counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_VR_LOADS_MICROOPS : VR load micro-ops completed.
-+event:0xcc counters:0,1,2,3,4,5 um:zero minimum:500 name:COMPLETED_VR_STORES_MICROOPS : VR store micro-ops completed.
-+event:0xcd counters:0,1,2,3,4,5 um:zero minimum:500 name:VSCR_SAT_SET : Number of times the saturate bit flips from 0 to 1.
-+event:0xd2 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SFX0_IDLE : Cycles Simple Fixed Point Unit 0 is idle.
-+event:0xd3 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SFX1_IDLE : Cycles Simple Fixed Point Unit 1 is idle.
-+event:0xd4 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_CFX_IDLE : Cycles Complex Fixed Point Unit is idle.
-+event:0xd5 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LSU_IDLE : Cycles Load Store Unit is idle.
-+event:0xd6 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_BU_IDLE : Cycles Branch Unit is idle.
-+event:0xd7 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FPU_IDLE : Cycles Floating Point Unit is idle.
-+event:0xd8 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VPU_IDLE : Cycles AltiVec Permute Unit is idle.
-+event:0xd9 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VFPU_IDLE : Cycles AltiVec Floating Point Unit is idle.
-+event:0xda counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VSFX_IDLE : Cycles AltiVec Simple Fixed Point Unit is idle.
-+event:0xdb counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_VCFX_IDLE : Cycles AltiVec Complex Fixed Point Unit is idle.
-+event:0xdd counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_MISSES : Data L1 cache misses. (Includes load, store, cache ops).
-+event:0xde counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_LOAD_MISSES : Data L1 cache load misses.
-+event:0xdf counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_STORE_MISSES : Data L1 cache store misses.
-+event:0xe0 counters:0,1,2,3,4,5 um:zero minimum:500 name:LMQ_ALLOCATED_LOADS : Loads that allocate into Load Miss Queue. (Data L1 cache misses, but may not be to different cache lines).
-+event:0xe1 counters:0,1,2,3,4,5 um:zero minimum:500 name:LOAD_THREAD_MISS_COLLISION : Number of times that this thread��s load hits a line that is valid for the other thread but not this thread.
-+event:0xe2 counters:0,1,2,3,4,5 um:zero minimum:500 name:INTERTHREAD_STATUS_ARRAY_COLLISION : Number of times that two threads collide on status array access.
-+event:0xe3 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_ALLOC : Number of Store Gather Buffer allocates.
-+event:0xe4 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_GATHERS : Number of Store Gather Buffer gathers.
-+event:0xe5 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_OVERFLOWS : Number of Store Gather Buffer overflows. (Causes SGB full condition when additional store request is made).
-+event:0xe6 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_PROMOTIONS : Number of Store Gather Buffer promotions.
-+event:0xe7 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_INORDER_PROMOTIONS : Number of Store Gather Buffer in-order promotions. (Also includes oldest-entry timeout condition).
-+event:0xe8 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_OUTOFORDER_PROMOTIONS : Number of Store Gather Buffer out-of-order promotions.
-+event:0xe9 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_HP_PROMOTIONS : Number of Store Gather Buffer high-priority promotions. (Load hits on pending store).
-+event:0xea counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_MISO_PROMOTIONS : Number of Store Gather Buffer miso promotions. promotions. (Load hits on pending store).
-+event:0xeb counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_WATERMARK_PROMOTIONS : Number of Store Gather Buffer watermark promotions.
-+event:0xec counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_SGB_OVERFLOW_PROMOTIONS : Number of Store Gather Buffer overflow promotions.
-+event:0xed counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_DLAQ_FULL : Number of cycles the DLink Age Queue is full.
-+event:0xee counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_DLAQ_FULL : Number of times the DLink Age Queue is full.
-+event:0xef counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LRSAQ_FULL : Number of cycles the Load Reservation Set Age Queue is full.
-+event:0xf0 counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_LRSAQ_FULL : Number of times the Load Reservation Set Age Queue is full.
-+event:0xf1 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_FWDAQ_FULL : Number of cycles the Forward Age Queue is full.
-+event:0xf2 counters:0,1,2,3,4,5 um:zero minimum:500 name:TIMES_FWDAQ_FULL : Number of times the Forward Age Queue is full.
-+event:0xf3 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_TIMES : Number of times a Store Queue collision is forwardable. The following cases are not forwardable: store address + size does not contain the load, cache-inhibited store, denormalized, floating point store, stcx, guarded load.
-+event:0xf4 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_TIMES_DATA_RDY : Number of times a Store Queue collision is forwardable and is ready with data to forward.
-+event:0xf5 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_TIMES_DATA_NORDY : Number of times a Store Queue collision is forwardable but is not ready with data to forward.
-+event:0xf6 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_NOFWD_STQ_COLLISION_TIMES : Number of times a Store Queue collision is not forwardable and must wait until the store leaves the Store Queue.
-+event:0xf7 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_CLK : Number of cycles a Store Queue collision is forwardable. (Number of cycles from the detection of a forwardable Store Queue entry until the load is replayed in stg1).
-+event:0xf8 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_CLK_DATA_RDY : Number of cycles a Store Queue collision is forwardable and is ready with data to forward. (Number of cycles from the detection of a forwardable Store Queue entry with valid data until the load is replayed in stg1).
-+event:0xf9 counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FWD_STQ_COLLISION_CLK_DATA_NORDY : Number of cycles a Store Queue collision is forwardable but is not ready with data to forward. (Number of cycles from the detection of a forwardable Store Queue entry without valid data until the load is replayed in stg1).
-+event:0xfa counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_NOFWD_STQ_COLLISION_CLK : Number of cycles a Store Queue collision is not forwardable and has to wait until the store leaves the Store Queue. (Number of cycles from the detection of a non-forwardable Store Queue entry until the load is replayed in stg1).
-+event:0xfb counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_FALSE_EA_COLLISION : Number of times the lower 12-bits of EA matched but the upper bits did not, leading to a false load-on-store replay. Cycle penalty is 4x the number of times.
-+event:0xfc counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_LSO_BUS_COLLISION : Number of LS0 result bus collisions. Cycle penalty is 3x this measurement.
-+event:0xfd counters:0,1,2,3,4,5 um:zero minimum:500 name:NUM_INTERTHREAD_DBLWORKD_BANK_COLLISION : Number of inter-thread double-word bank collisions. Measures when both threads attempt to access the same double-word bank. Cycle penalty is 3x this measurement.
-+event:0xfe counters:0,1,2,3,4,5 um:zero minimum:500 name:L1_CACHE_IM : Instruction L1 cache demand fetch misses. (Includes icbtls. Does not include prefetch).
-+event:0x100 counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_MISSES : Counts misses in the level 1 Instruction MMU.
-+event:0x101 counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_TLB4K_HITS : Counts hits in the level 1 Instruction MMU TLB-4K.
-+event:0x102 counters:0,1,2,3,4,5 um:zero minimum:500 name:IMMU_VSP_HITS : Counts hits in the level 1 Instruction MMU VSP.
-+event:0x103 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_IMMU_HW_TABLEWALK : Counts IMMU cycles spent in hardware tablewalk. This represents the cycles from the point where the L2 MMU miss occurs to when the page table walk completes with a valid translation or exception.
-+event:0x104 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_MISSES : Counts misses in the level 1 Data MMU. (Does not count replayed operations).
-+event:0x105 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_TLB4K_HITS : Counts hits in the level 1 Data MMU TLB-4K. (Does not count replayed operations).
-+event:0x106 counters:0,1,2,3,4,5 um:zero minimum:500 name:DMMU_VSP_HITS : Counts hits in the level 1 Data MMU VSP. (Does not count replayed operations).
-+event:0x107 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_DMMU_HW_TABLEWALK : Counts DMMU cycles spent in hardware tablewalk. This represents the cycles from the point where the L2 MMU miss occurs to when the page table walk completes with a valid translation or exception.
-+event:0x108 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_MISSES : Counts level 2 MMU misses. (Does not count misses that occur due to dcbt / dcbtst / dcba / dcbal instructions that fail translation and are no-oped. Does not count misses in L2MMU-VSP when looking up an indirect entry).
-+event:0x109 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_4K_HITS : Counts level 2 MMU hits in L2MMU-4K.
-+event:0x10a counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_VSP_HITS : Counts level 2 MMU hits in L2MMU-VSP. (Does not count indirect lookups).
-+event:0x10b counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_INDIRECT_MISSES : Counts level 2 MMU indirect misses. This represents indirect entry lookups that do not have a matching indirect entry.
-+event:0x10c counters:0,1,2,3,4,5 um:zero minimum:500 name:L2MMU_INDIRECT_VALID_MISSES : Counts level 2 MMU indirect valid misses. This occurts when the indirect entry is valid, but the corresponding PTE[V] = 0 or the premissions in the PTE are not sufficient for the requested access.
-+event:0x10d counters:0,1,2,3,4,5 um:zero minimum:500 name:LRAT_MISSES : Counts Logical to Real Address Translation misses. This includes LRAT misses from tlbwe instructions or from page table translations.
-+event:0x110 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_LMQ_LOSE_DLINK_DUE_SGB : Cycles the Load Miss Queue loses DLINK arbitration due to the Store Gather Buffer.
-+event:0x111 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SGB_LOSE_DLINK_DUE_LMQ : Cycles the Store Gather Buffer loses DLINK arbitration due to the Load Miss Queue.
-+event:0x112 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_THREAD_LOSE_DLINK_DUE_OTHER_THREAD : Cycles thread loses DLINK arbitration due to other thread: Cycles thread loses DLINK arbitration due to other thread.
-+event:0x116 counters:0,1,2,3,4,5 um:zero minimum:500 name:DECODE_MASK_VALUE : One mask/value pair that allows instructions to be counted in Decode.
-+event:0x1bb counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_DLINK_REQ : Number of DLINK requests made from core to Shared L2.
-+event:0x1bc counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_ILINK_REQ : Number of ILINK requests made from core to Shared L2. (Includes instruction fetches and L2MMU hardware tablewalk requests).
-+event:0x1bd counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_RLINK_REQ : Number of RLINK requests made from Shared L2 to core. (back invalidates, stashes, barriers).
-+event:0x1be counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_BLINK_REQ : Number of BLINK requests made from Shared L2 to core. (back invalidates, stashes, barriers).
-+event:0x1bf counters:0,1,2,3,4,5 um:zero minimum:500 name:SHR_L2_CLINK_REQ : Number of CLINK requests made from Shared L2 to core. (back invalidates, stashes, barriers).
-+event:0x1c8 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_HITS : Number of L2 Cache hits. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1c9 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_MISSES : Number of L2 Cache hits. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1ca counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DEMAND_ACCESS : Number of L2 Cache demand accesses. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1cb counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_ACCESSES : Number of L2 Cache accesses from all sources (demand, reload, snoop, etc). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1cc counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STORE_ALLOCATE : Number of L2 Cache store allocates. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1cd counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTIONS_ACCESS : Number of L2 Cache instruction accesses. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1ce counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_ACCESS : Number of L2 Cache data accesses. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1cf counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTIONS_MISSES : Number of L2 Cache instruction misses. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d0 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_MISSES : Number of L2 Cache data misses. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d1 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_HITS_PER_THREAD : Number of times this core/thread hits in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d2 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_MISSES_PER_THREAD : Number of times this core/thread misses in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d3 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DEMAND_ACCESS_PER_THREAD : Number of times this core/thread makes a demand access to the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d4 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STORE_ALLOC_PER_THREAD : Number of times a store from this core/thread allocates in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d5 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTIONS_ACCESS_PER_THREAD : Number of times an instruction from this core/thread accesses the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d6 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_ACCESS_PER_THREAD : Number of times a data operation from this core/thread accesses the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d7 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_INSTRUCTION_MISSES_PER_THREAD : Number of times an instruction from this core/thread misses in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d8 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_DATA_MISSES_PER_THREAD : Number of times a data operation from this core/thread misses in the L2 Cache. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1d9 counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_RELOAD_FROM_CORENET : Number of L2 Cache reloads from CoreNet. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1da counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_IN_STASH_REQ : Number of incoming L2 Cache stash requests. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1db counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STASH_REQ_DOWNGRD_TO_SNOOPS : Number of incoming L2 Cache stash requests downgraded to snoops. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1dc counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_HITS : Number of L2 Cache snoop hits. Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1dd counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_MINT : Number of L2 Cache snoops causing MINT.
-+event:0x1de counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_SINT : Number of L2 Cache snoops causing SINT.
-+event:0x1df counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOPS_PUSHES : Number of L2 Cache snoop pushes.
-+event:0x1e0 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_BIB_STALL : Stall for Back Invalidate Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1e2 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_RLT_STALL : Stall for Reload Table entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1e4 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_RLFQ_STALL : Stall for Reload Fold Queue entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1e6 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_DTQ_STALL : Stall for Data Transaction Queue entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1e8 counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_COB_STALL : Stall for Castout Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1ea counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_WDB_STALL : Stall for Write Data Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1ec counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_RLDB_STALL : Stall for Reload Data Buffer entry (cycles). Counts 0, 1, 2, 3, or 4 per cycle.
-+event:0x1ee counters:0,1,2,3,4,5 um:zero minimum:500 name:CLK_SNPQ_STALL : Stall for Snoop Queue entry (cycles).
-+event:0x1fa counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_REQ : Master transaction starts. (Number of AOut sent to CoreNet).
-+event:0x1fb counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_GLOBAL_REQ : Master transaction starts that are global. (Number of AOut with M=1 sent to CoreNet).
-+event:0x1fc counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_DATA_SIDE_REQ : Master transaction starts that are global. (Number of AOut with M=1 sent to CoreNet).
-+event:0x1fd counters:0,1,2,3,4,5 um:zero minimum:500 name:BIU_MASTER_INSTRUCTION_SIDE_REQ : Master instruction-side transaction starts. (Number of I-side AOut sent to CoreNet).
-+event:0x1fe counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_STASH_REQ : Stash request on AIn matches stash IDs for core or L2.
-+event:0x1ff counters:0,1,2,3,4,5 um:zero minimum:500 name:L2_SNOOP_REQ : Externally generated snoop requests. (Number of AIn from CoreNet not from self).
-+
-diff --git a/events/ppc/e6500/unit_masks b/events/ppc/e6500/unit_masks
-new file mode 100644
-index 0000000..b7e7a23
---- /dev/null
-+++ b/events/ppc/e6500/unit_masks
-@@ -0,0 +1,4 @@
-+# e6500 possible unit masks
-+#
-+name:zero type:mandatory default:0x0
-+ 0x0 no unit mask
-diff --git a/libop/op_cpu_type.c b/libop/op_cpu_type.c
-index 7d50a2d..badb7ba 100644
---- a/libop/op_cpu_type.c
-+++ b/libop/op_cpu_type.c
-@@ -126,6 +126,7 @@ static struct cpu_descr const cpu_descrs[MAX_CPU_TYPE] = {
- { "IBM Power Architected Events V1", "ppc64/architected_events_v1", CPU_PPC64_ARCH_V1, 6 },
- { "ppc64 POWER8", "ppc64/power8", CPU_PPC64_POWER8, 6 },
- { "e500mc", "ppc/e500mc", CPU_PPC_E500MC, 4 },
-+ { "e6500", "ppc/e6500", CPU_PPC_E6500, 6 },
- };
-
- static size_t const nr_cpu_descrs = sizeof(cpu_descrs) / sizeof(struct cpu_descr);
-diff --git a/libop/op_cpu_type.h b/libop/op_cpu_type.h
-index 10f000b..934fe9e 100644
---- a/libop/op_cpu_type.h
-+++ b/libop/op_cpu_type.h
-@@ -106,6 +106,7 @@ typedef enum {
- CPU_PPC64_ARCH_V1, /** < IBM Power architected events version 1 */
- CPU_PPC64_POWER8, /**< ppc64 POWER8 family */
- CPU_PPC_E500MC, /**< e500mc */
-+ CPU_PPC_E6500, /**< e6500 */
- MAX_CPU_TYPE
- } op_cpu;
-
-diff --git a/libop/op_events.c b/libop/op_events.c
-index 638dc5c..9d2aa5e 100644
---- a/libop/op_events.c
-+++ b/libop/op_events.c
-@@ -1309,6 +1309,7 @@ void op_default_event(op_cpu cpu_type, struct op_default_event_descr * descr)
- case CPU_PPC_E500:
- case CPU_PPC_E500_2:
- case CPU_PPC_E500MC:
-+ case CPU_PPC_E6500:
- case CPU_PPC_E300:
- descr->name = "CPU_CLK";
- break;
-diff --git a/utils/ophelp.c b/utils/ophelp.c
-index 0647360..3b2896a 100644
---- a/utils/ophelp.c
-+++ b/utils/ophelp.c
-@@ -754,6 +754,7 @@ int main(int argc, char const * argv[])
- case CPU_PPC_E500:
- case CPU_PPC_E500_2:
- case CPU_PPC_E500MC:
-+ case CPU_PPC_E6500:
- event_doc =
- "See PowerPC e500 Core Complex Reference Manual\n"
- "Chapter 7: Performance Monitor\n"
---
diff --git a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
index e82a381139..b9bb6c5779 100644
--- a/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
+++ b/meta/recipes-kernel/oprofile/oprofile/automake-foreign.patch
@@ -1,3 +1,8 @@
+oprofile doesn't want GNU-levels of automake strictness so tell it to be "foreign".
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
diff --git a/configure.ac b/configure.ac
index 5740585..cf6c316 100644
--- a/configure.ac
diff --git a/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch
new file mode 100644
index 0000000000..f7ebe24691
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch
@@ -0,0 +1,41 @@
+With security_flags.inc:
+
+| In file included from /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/fcntl.h:302:0,
+| from opjitconv.c:25:
+| In function 'open',
+| inlined from 'copy_dumpfile' at opjitconv.c:219:6:
+| /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
+| __open_missing_mode ();
+| ^
+| Makefile:440: recipe for target 'opjitconv.o' failed
+
+Why does this only happen on mips? mips has:
+
+O_CREAT = 0x100
+and
+S_IRUSR = 0400
+
+and these (in hex and otcal) are equivalent. Most other platforms
+have O_CREAT = 0100.
+
+http://sourceforge.net/p/oprofile/oprofile/ci/4598ca73b0a367ca46d4a2843261e20e1896773b
+
+The file should not be created, only opened if its present, therefore use O_RDONLY instead.
+
+RP 2014/11/6
+
+Upstream-Status: Backport
+
+Index: oprofile-1.0.0/opjitconv/opjitconv.c
+===================================================================
+--- oprofile-1.0.0.orig/opjitconv/opjitconv.c 2014-09-12 14:39:47.000000000 +0000
++++ oprofile-1.0.0/opjitconv/opjitconv.c 2014-11-06 13:14:25.941639003 +0000
+@@ -216,7 +216,7 @@
+ int file_locked = 0;
+ unsigned int usecs_waited = 0;
+ int rc = OP_JIT_CONV_OK;
+- int fd = open(dumpfile, S_IRUSR);
++ int fd = open(dumpfile, O_RDONLY);
+ if (fd < 0) {
+ perror("opjitconv failed to open JIT dumpfile");
+ return OP_JIT_CONV_FAIL;
diff --git a/meta/recipes-kernel/oprofile/oprofile/opstart.patch b/meta/recipes-kernel/oprofile/oprofile/opstart.patch
deleted file mode 100644
index 8696f4ef4d..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile/opstart.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-Upstream-Status: Pending
-
-The patch gives a low overhead way of starting/stopping oprofile which
-doesn't involve script exection.
-
-(written by RP in OpenedHand days)
-
-diff --git a/utils/Makefile.am b/utils/Makefile.am
-index d34b060..dff15f9 100644
---- oprofile.orig/utils/Makefile.am
-+++ oprofile/utils/Makefile.am
-@@ -7,7 +7,7 @@ AM_LDFLAGS = @OP_LDFLAGS@
-
- LIBS=@POPT_LIBS@ @LIBERTY_LIBS@
-
--bin_PROGRAMS = ophelp op-check-perfevents
-+bin_PROGRAMS = ophelp op-check-perfevents opstart
- dist_bin_SCRIPTS = opcontrol
-
- op_check_perfevents_SOURCES = op_perf_events_checker.c
-@@ -15,3 +15,10 @@ op_check_perfevents_CPPFLAGS = ${AM_CFLAGS} @PERF_EVENT_FLAGS@
-
- ophelp_SOURCES = ophelp.c
- ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a
-+
-+opstart_SOURCES = opstart.c
-+
-+install-exec-local:
-+ cd $(DESTDIR)/$(bindir) && \
-+ rm -f opstop && \
-+ $(LN_S) opstart opstop
-Index: oprofile/utils/opstart.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,110 @@
-+/**
-+ * @file opstart.c
-+ * Start/Stop oprofile
-+ *
-+ * @remark Copyright 2007 Openedhand Ltd.
-+ * @remark Read the file COPYING
-+ *
-+ * @author Richard Purdie
-+ */
-+
-+#include <signal.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+
-+int main(const int argc, const char* argv[])
-+{
-+ const char *enable = "/dev/oprofile/enable";
-+ const char *lockfile;
-+ unsigned long dpid;
-+ struct stat sbuf;
-+ FILE *lfile, *efile;
-+ int sig, enb, err;
-+
-+ if (argc >= 2) {
-+ printf("Error: Invalid options.\n");
-+ return 1;
-+ }
-+
-+ lockfile = getenv("LOCK_FILE");
-+ if (!lockfile)
-+ lockfile = "/var/lib/oprofile/lock";
-+
-+ /* Add SESSION_DIR support? */
-+
-+ if (geteuid()) {
-+ printf("Error: This program must be run as root.\n");
-+ return 1;
-+ }
-+
-+ if (stat(enable, &sbuf)) {
-+ printf("Error: Could not find /dev/oprofile/enable, the"
-+ " kernel module probably isn't loaded.\n");
-+ printf("This binary only works with 2.6 kernels and oprofile"
-+ " must have been initialised with 'opcontrol --start-daemon'.\n");
-+ return 1;
-+ }
-+
-+ if (stat(lockfile, &sbuf)) {
-+ printf("Error: Could not find lockfile %s.\n", lockfile);
-+ printf("The oprofile daemon must be running (oprofile must"
-+ " have been initialised with 'opcontrol --start-daemon').\n");
-+ return 1;
-+ }
-+
-+ lfile = fopen(lockfile, "r");
-+ if (!lfile) {
-+ printf("Error opening lockfile %s.\n", lockfile);
-+ return 1;
-+ }
-+
-+ err = fscanf(lfile, "%lud", (unsigned long *) &dpid);
-+ if (err != 1) {
-+ printf("Error reading pid from lockfile %s.\n", lockfile);
-+ return 1;
-+ }
-+ fclose(lfile);
-+
-+ efile = fopen(enable, "r");
-+ if (!efile) {
-+ printf("Error opening %s.\n", enable);
-+ return 1;
-+ }
-+
-+ if (strstr(argv[0], "opstart")) {
-+ printf("Starting Profiler\n");
-+ sig = SIGUSR1;
-+ enb = 1;
-+ } else if (strstr(argv[0], "opstop")) {
-+ printf("Stopping Oprofile.\n");
-+ printf("You need to run 'opcontrol --dump' when the session"
-+ " is finished.\n");
-+ sig = SIGUSR2;
-+ enb = 0;
-+ } else {
-+ printf("Error: Please call as 'opstart' or 'opstop'\n");
-+ return 1;
-+ }
-+
-+ err = kill(dpid, 0);
-+ if (err) {
-+ printf("Error sending signal to oprofiled. Stale lockfile"
-+ " (%s) ?\n", lockfile);
-+ return 1;
-+ }
-+
-+ fprintf(efile, "%d\n", enb);
-+ err = kill(dpid, sig);
-+ if (err) {
-+ printf("Error sending signal to oprofiled. Stale lockfile"
-+ " (%s) ?\n", lockfile);
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-Index: oprofile/configure.ac
-===================================================================
---- oprofile.orig/configure.ac 2008-07-02 15:13:58.000000000 +0100
-+++ oprofile/configure.ac 2008-07-02 15:17:37.000000000 +0100
-@@ -16,6 +16,7 @@
- AM_CONFIG_HEADER(config.h)
-
- AC_PROG_RANLIB
-+AC_PROG_LN_S
- AC_PROG_LIBTOOL
-
- dnl for the man page
-@@ -241,6 +242,8 @@
- doc/xsl/catalog-1.xml \
- doc/oprofile.1 \
- doc/opcontrol.1 \
-+ doc/opstart.1 \
-+ doc/opstop.1 \
- doc/ophelp.1 \
- doc/opreport.1 \
- doc/opannotate.1 \
-Index: oprofile/doc/Makefile.am
-===================================================================
---- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100
-+++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100
-@@ -11,6 +11,8 @@
- man_MANS = \
- oprofile.1 \
- opcontrol.1 \
-+ opstart.1 \
-+ opstop.1 \
- opreport.1 \
- opannotate.1 \
- opgprof.1 \
-Index: oprofile/doc/opstart.1.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,27 @@
-+.TH OPSTART 1 "@DATE@" "oprofile @VERSION@"
-+.UC 4
-+.SH NAME
-+opstart \- start OProfile profiling
-+.SH SYNOPSIS
-+.br
-+.B opstart
-+.SH DESCRIPTION
-+.B opstart
-+is a simple optimised command to start profiling with 2.6 Linux kernels.
-+OProfile should have already been initialised by calling "opcontrol --start-daemon".
-+
-+.SH ENVIRONMENT
-+No special environment variables are recognised by opstart.
-+
-+.SH FILES
-+.TP
-+.I /var/lib/oprofile/samples/
-+The location of the generated sample files.
-+
-+.SH VERSION
-+.TP
-+This man page is current for @PACKAGE@-@VERSION@.
-+
-+.SH SEE ALSO
-+.BR @OP_DOCDIR@,
-+.BR oprofile(1)
-Index: oprofile/doc/opstop.1.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100
-@@ -0,0 +1,28 @@
-+.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@"
-+.UC 4
-+.SH NAME
-+opstop \- stop OProfile profiling
-+.SH SYNOPSIS
-+.br
-+.B opstop
-+.SH DESCRIPTION
-+.B opstop
-+is a simple optimsed command to stop profiling with 2.6 Linux kernels.
-+You need to run "opcontrol --dump" before being able to view a profile
-+with opreport.
-+
-+.SH ENVIRONMENT
-+No special environment variables are recognised by opstop.
-+
-+.SH FILES
-+.TP
-+.I /var/lib/oprofile/samples/
-+The location of the generated sample files.
-+
-+.SH VERSION
-+.TP
-+This man page is current for @PACKAGE@-@VERSION@.
-+
-+.SH SEE ALSO
-+.BR @OP_DOCDIR@,
-+.BR oprofile(1)
diff --git a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
index 45cab7d3d8..20fc5e503b 100644
--- a/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ b/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
@@ -1,7 +1,7 @@
oprofile: Determine the root home directory dynamically
This commit detects the root home directory dynamically with changes to
-the opcontrol script and the oprofile gui app source.
+the oprofile gui app source.
The commit replaces an earlier fix that detected and adjusted a
'non-standard' root home directory at build time. The advantage of this
@@ -12,109 +12,33 @@ Upstream-Status: inappropriate [OE specific]
Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-diff --git a/doc/opcontrol.1.in b/doc/opcontrol.1.in
-index c434704..f57eb76 100644
---- a/doc/opcontrol.1.in
-+++ b/doc/opcontrol.1.in
-@@ -171,7 +171,7 @@ No special environment variables are recognised by opcontrol.
-
- .SH FILES
- .TP
--.I /root/.oprofile/daemonrc
-+.I ~root/.oprofile/daemonrc
- Configuration file for opcontrol
- .TP
- .I /var/lib/oprofile/samples/
-diff --git a/doc/oprofile.1.in b/doc/oprofile.1.in
-index 3d0f0ed..5c623e1 100644
---- a/doc/oprofile.1.in
-+++ b/doc/oprofile.1.in
-@@ -150,7 +150,7 @@ No special environment variables are recognised by oprofile.
- .I $HOME/.oprofile/
- Configuration files
- .TP
--.I /root/.oprofile/daemonrc
-+.I ~root/.oprofile/daemonrc
- Configuration file for opcontrol
- .TP
- .I @prefix@/share/oprofile/
-diff --git a/doc/oprofile.html b/doc/oprofile.html
-index 128d9f7..d7e4dea 100644
---- a/doc/oprofile.html
-+++ b/doc/oprofile.html
-@@ -1394,7 +1394,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the
- <dd>
- <p>
- Followed by list arguments for profiling set up. List of arguments
-- saved in <code class="filename">/root/.oprofile/daemonrc</code>.
-+ saved in <code class="filename">~root/.oprofile/daemonrc</code>.
- Giving this option is not necessary; you can just directly pass one
- of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>.
- </p>
-@@ -1430,7 +1430,7 @@ The <span class="command"><strong>opcontrol</strong></span> script provides the
- <dd>
- <p>
- Start data collection with either arguments provided by <code class="option">--setup</code>
-- or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying
-+ or information saved in <code class="filename">~root/.oprofile/daemonrc</code>. Specifying
- the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data
- whilst it is running.
+Index: oprofile-1.0.0/doc/oprofile.html
+===================================================================
+--- oprofile-1.0.0.orig/doc/oprofile.html 2014-11-03 17:55:31.511034857 +0000
++++ oprofile-1.0.0/doc/oprofile.html 2014-11-03 17:57:26.415037988 +0000
+@@ -1563,8 +1563,8 @@
+ <span class="emphasis"><em>must</em></span> stop it in a controlled manner in order to process
+ the profile data it has collected. Use <code class="code">kill -SIGINT &lt;operf-PID&gt;</code>
+ for this purpose. It is recommended that when running <span class="command"><strong>operf</strong></span>
+- with this option, your current working directory should be <code class="filename">/root</code> or a subdirectory
+- of <code class="filename">/root</code> to avoid storing sample data files in locations accessible by regular users.
++ with this option, your current working directory should be <code class="filename">~root</code> or a subdirectory
++ of <code class="filename">~root</code> to avoid storing sample data files in locations accessible by regular users.
</p>
-diff --git a/doc/oprofile.xml b/doc/oprofile.xml
-index 6a17c6d..0968d76 100644
---- a/doc/oprofile.xml
-+++ b/doc/oprofile.xml
-@@ -568,7 +568,7 @@ The <command>opcontrol</command> script provides the following actions :
- <term><option>--setup</option></term>
- <listitem><para>
- Followed by list arguments for profiling set up. List of arguments
-- saved in <filename>/root/.oprofile/daemonrc</filename>.
-+ saved in <filename>~root/.oprofile/daemonrc</filename>.
- Giving this option is not necessary; you can just directly pass one
- of the setup options, e.g. <command>opcontrol --no-vmlinux</command>.
- </para></listitem>
-@@ -592,7 +592,7 @@ The <command>opcontrol</command> script provides the following actions :
- <term><option>--start</option></term>
- <listitem><para>
- Start data collection with either arguments provided by <option>--setup</option>
-- or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying
-+ or information saved in <filename>~root/.oprofile/daemonrc</filename>. Specifying
- the addition <option>--verbose</option> makes the daemon generate lots of debug data
- whilst it is running.
+ </dd>
+ <dt>
+Index: oprofile-1.0.0/doc/oprofile.xml
+===================================================================
+--- oprofile-1.0.0.orig/doc/oprofile.xml 2014-11-03 17:55:31.515034857 +0000
++++ oprofile-1.0.0/doc/oprofile.xml 2014-11-03 17:58:03.719039005 +0000
+@@ -654,8 +654,8 @@
+ <emphasis>must</emphasis> stop it in a controlled manner in order to process
+ the profile data it has collected. Use <code>kill -SIGINT &lt;operf-PID&gt;</code>
+ for this purpose. It is recommended that when running <command>operf</command>
+- with this option, your current working directory should be <filename>/root</filename> or a subdirectory
+- of <filename>/root</filename> to avoid storing sample data files in locations accessible by regular users.
++ with this option, your current working directory should be <filename>~root</filename> or a subdirectory
++ of <filename>~root</filename> to avoid storing sample data files in locations accessible by regular users.
</para></listitem>
-diff --git a/gui/oprof_start_util.cpp b/gui/oprof_start_util.cpp
-index d293431..d13fa8f 100644
---- a/gui/oprof_start_util.cpp
-+++ b/gui/oprof_start_util.cpp
-@@ -20,6 +20,8 @@
- #include <iostream>
- #include <fstream>
- #include <cstdlib>
-+#include <sys/types.h>
-+#include <pwd.h>
-
- #include <qfiledialog.h>
- #include <qmessagebox.h>
-@@ -39,7 +41,8 @@ namespace {
- // return the ~ expansion suffixed with a '/'
- string const get_config_dir()
- {
-- return "/root";
-+ struct *pw = getpwnam("root");
-+ return pw->pw_dir;
- }
-
- string daemon_pid;
-diff --git a/utils/opcontrol b/utils/opcontrol
-index 09fa5a7..a8acdae 100644
---- a/utils/opcontrol
-+++ b/utils/opcontrol
-@@ -385,7 +385,7 @@ do_init()
- OPROFILED="$OPDIR/oprofiled"
-
- # location for daemon setup information
-- SETUP_DIR="/root/.oprofile"
-+ SETUP_DIR="`grep root /etc/passwd | cut -d: -f6`/.oprofile"
- SETUP_FILE="$SETUP_DIR/daemonrc"
- SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
-
+ </varlistentry>
+ <varlistentry>
diff --git a/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb b/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb
deleted file mode 100644
index 63ef6af0e9..0000000000
--- a/meta/recipes-kernel/oprofile/oprofile_0.9.9.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require oprofile.inc
-
-DEPENDS += "virtual/kernel"
-DEPENDS_append_powerpc64 = " libpfm4"
-
-SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://0001-Add-rmb-definition-for-AArch64-architecture.patch \
- file://0001-Tidy-powerpc64-bfd-target-check.patch \
- file://0001-Add-freescale-e500mc-support.patch \
- file://0002-Add-freescale-e6500-support.patch \
- "
-SRC_URI[md5sum] = "00aec1287da2dfffda17a9b1c0a01868"
-SRC_URI[sha256sum] = "1e523400daaba7b8d0d15269e977a08b40edfea53970774b69ae130e25117597"
-
-
-S = "${WORKDIR}/oprofile-${PV}"
-
diff --git a/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb b/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb
new file mode 100644
index 0000000000..f4a34b32e6
--- /dev/null
+++ b/meta/recipes-kernel/oprofile/oprofile_1.0.0.bb
@@ -0,0 +1,13 @@
+require oprofile.inc
+
+DEPENDS += "virtual/kernel"
+DEPENDS_append_powerpc64 = " libpfm4"
+
+SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "ba0b340e5c421a93959776c836ed35b3"
+SRC_URI[sha256sum] = "847110b4ecdcf8c8353cd38f94c1b704aad4bfcd9453e38b88d112cfb7e3c45a"
+
+S = "${WORKDIR}/oprofile-${PV}"
+
+PR = "r1"
diff --git a/meta/recipes-kernel/perf/perf-features.inc b/meta/recipes-kernel/perf/perf-features.inc
index 2dbbb47761..b8859ab7d5 100644
--- a/meta/recipes-kernel/perf/perf-features.inc
+++ b/meta/recipes-kernel/perf/perf-features.inc
@@ -1,4 +1,4 @@
-PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui perf-libunwind"
+PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui"
def perf_feature_enabled(feature, trueval, falseval, d):
"""
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 3771cdb3e9..420fe6b57a 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -22,7 +22,7 @@ TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}"
SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}"
LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}"
-DEPENDS = "virtual/kernel \
+DEPENDS = " \
virtual/${MLPREFIX}libc \
${MLPREFIX}elfutils \
${MLPREFIX}binutils \
@@ -32,6 +32,8 @@ DEPENDS = "virtual/kernel \
bison flex \
"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
PROVIDES = "virtual/perf"
inherit linux-kernel-base kernel-arch pythonnative
@@ -46,7 +48,7 @@ export HOST_SYS
#kernel 3.1+ supports WERROR to disable warnings as errors
export WERROR = "0"
-do_populate_lic[depends] += "virtual/kernel:do_populate_sysroot"
+do_populate_lic[depends] += "virtual/kernel:do_patch"
# needed for building the tools/perf Perl binding
inherit perlnative cpan-base
@@ -56,15 +58,14 @@ export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}
export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
-S = "${STAGING_KERNEL_DIR}"
-# The source should be ready after the do_unpack
-do_unpack[depends] += "virtual/kernel:do_populate_sysroot"
+inherit kernelsrc
B = "${WORKDIR}/${BPN}-${PV}"
SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}"
TUI_DEFINES = "${@perf_feature_enabled('perf-tui', '', 'NO_NEWT=1',d)}"
-LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1',d)}"
+LIBUNWIND_DEFINES = "${@perf_feature_enabled('perf-libunwind', '', 'NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1',d)}"
+LIBNUMA_DEFINES = "${@perf_feature_enabled('perf-libnuma', '', 'NO_LIBNUMA=1',d)}"
# The LDFLAGS is required or some old kernels fails due missing
# symbols and this is preferred than requiring patches to every old
@@ -80,7 +81,8 @@ EXTRA_OEMAKE = '\
AR="${AR}" \
EXTRA_CFLAGS="-ldw" \
perfexecdir=${libexecdir} \
- NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} ${SCRIPTING_DEFINES} \
+ NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
+ ${SCRIPTING_DEFINES} ${LIBNUMA_DEFINES} \
'
EXTRA_OEMAKE += "\
@@ -96,7 +98,6 @@ EXTRA_OEMAKE += "\
'infodir=${@os.path.relpath(infodir, prefix)}' \
"
-PARALLEL_MAKE = ""
do_compile() {
# Linux kernel build system is expected to do the right thing
@@ -115,6 +116,10 @@ do_install() {
}
do_configure_prepend () {
+ # Fix for rebuilding
+ rm -rf ${B}/
+ mkdir ${B}/
+
#kernels before 3.1 do not support WERROR env variable
sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile
if [ -e "${S}/tools/perf/config/Makefile" ]; then
@@ -157,7 +162,7 @@ do_configure_prepend () {
}
python do_package_prepend() {
- bb.data.setVar('PKGV', get_kernelversion('${S}').split("-")[0], d)
+ d.setVar('PKGV', d.getVar("KERNEL_VERSION", True).split("-")[0])
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -165,7 +170,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
-RDEPENDS_${PN} += "elfutils"
+RDEPENDS_${PN} += "elfutils bash"
RDEPENDS_${PN}-archive =+ "bash"
RDEPENDS_${PN}-python =+ "bash python"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
diff --git a/meta/recipes-kernel/powertop/powertop_2.6.1.bb b/meta/recipes-kernel/powertop/powertop_2.7.bb
index 58216c2d15..5ba07e9ab9 100644
--- a/meta/recipes-kernel/powertop/powertop_2.6.1.bb
+++ b/meta/recipes-kernel/powertop/powertop_2.7.bb
@@ -6,16 +6,17 @@ DEPENDS = "ncurses libnl pciutils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-SRC_URI = "http://01.org/powertop/sites/default/files/downloads/powertop-${PV}.tar.gz"
+SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz"
-SRC_URI[md5sum] = "4391e7b0af854ecf722cdf712f24b631"
-SRC_URI[sha256sum] = "034cde6d5bb433fe0d29251d5cde5d4c2948abf05fe29ef10966b659331b20e4"
+SRC_URI[md5sum] = "e0d686e47daaf7e9d89031f7763432ef"
+SRC_URI[sha256sum] = "8d4b1490e2baad4467c0ded3c423db4472dcbf7b2dd8f8f2a928f54047c678ca"
inherit autotools gettext pkgconfig
# we need to explicitly link with libintl in uClibc systems
-LDFLAGS += "${EXTRA_LDFLAGS}"
+EXTRA_LDFLAGS ?= ""
EXTRA_LDFLAGS_libc-uclibc = "-lintl"
+LDFLAGS += "${EXTRA_LDFLAGS}"
# we do not want libncursesw if we can
do_configure_prepend() {
diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb b/meta/recipes-kernel/sysprof/sysprof_git.bb
index ef1e270883..19c3e10f7c 100644
--- a/meta/recipes-kernel/sysprof/sysprof_git.bb
+++ b/meta/recipes-kernel/sysprof/sysprof_git.bb
@@ -12,9 +12,16 @@ SRC_URI = "git://git.gnome.org/sysprof \
"
SRC_URI_append_arm = " file://rmb-arm.patch"
+SRC_URI_append_armeb = " file://rmb-arm.patch"
SRC_URI_append_mips = " file://rmb-mips.patch"
SRC_URI_append_mips64 = " file://rmb-mips.patch"
+SRC_URI_append_mips64n32 = " file://rmb-mips.patch"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
+
+# We do not yet work for aarch64.
+#
+COMPATIBLE_HOST = "^(?!aarch64).*"
+
diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
index 4d2bec4714..758908bff9 100644
--- a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
@@ -21,7 +21,7 @@ EXTRA_OEMAKE = ""
# support. Note that staprun expects it in the systemtap/runtime directory,
# not in /lib/modules.
do_compile() {
- if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config
+ if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_BUILDDIR}/.config
then
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
diff --git a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch b/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
deleted file mode 100644
index f945760fde..0000000000
--- a/meta/recipes-kernel/systemtap/systemtap/tapset-linux-sendfile-syscall.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-systemtap: Fixed probe syscall.sendfile failure
-
-compat_sendfile syscall is unavailable in kernels starting version 3.8.
-Hence systemtap scripts like 'probe syscall.* { if (target()==pid()) log(name." ".argstr) }' fail.
-This problem is solved by marking __syscall.compat_sendfile as optional in tapset/linux/syscalls2.stp
-
-Upstream-Status: Pending
-
-Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
-
-diff -Naur old/tapset/linux/syscalls2.stp new/tapset/linux/syscalls2.stp
---- old/tapset/linux/syscalls2.stp 2014-04-21 01:28:41.000000000 -0500
-+++ new/tapset/linux/syscalls2.stp 2014-04-21 01:38:14.961233914 -0500
-@@ -1953,7 +1953,7 @@
- # COMPAT_SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd,
- # compat_loff_t __user *, offset, compat_size_t, count)
- #
--probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile
-+probe syscall.sendfile = __syscall.sendfile, __syscall.compat_sendfile ?
- {
- name = "sendfile"
- out_fd = __int32($out_fd)
diff --git a/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch b/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
new file mode 100644
index 0000000000..28a7eae407
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/x32_abi_time.patch
@@ -0,0 +1,34 @@
+Fix time_t print because in x32 ABI is long long int instead of long int.
+
+Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+diff --git a/cache.cxx b/cache.cxx
+index 3546b30..19c77ca 100644
+--- a/cache.cxx
++++ b/cache.cxx
+@@ -294,7 +294,11 @@ clean_cache(systemtap_session& s)
+ {
+ //interval not passed, don't continue
+ if (s.verbose > 1)
++#if defined(__x86_64__) && defined (__ILP32__)
++ clog << _F("Cache cleaning skipped, interval not reached %lld s / %lu s.",
++#else
+ clog << _F("Cache cleaning skipped, interval not reached %lu s / %lu s.",
++#endif
+ (current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl;
+ return;
+ }
+@@ -302,7 +306,11 @@ clean_cache(systemtap_session& s)
+ {
+ //interval reached, continue
+ if (s.verbose > 1)
++#if defined(__x86_64__) && defined (__ILP32__)
++ clog << _F("Cleaning cache, interval reached %lld s > %lu s.",
++#else
+ clog << _F("Cleaning cache, interval reached %lu s > %lu s.",
++#endif
+ (current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl;
+ }
+
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index f81e8baf86..59a578daac 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,14 +1,14 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "8f0fcd995f7f650a2ee0a94539f90c99e6d19e1d"
-PV = "2.5+git${SRCPV}"
+SRCREV = "bf16266782e1f2588b519a50d9684279d4e21036"
+PV = "2.7+git${SRCPV}"
SRC_URI = "git://sourceware.org/git/systemtap.git \
file://docproc-build-fix.patch \
file://obsolete_automake_macros.patch \
file://system_map_location.patch \
- file://tapset-linux-sendfile-syscall.patch \
file://configure-allow-to-disable-libvirt.patch \
+ file://x32_abi_time.patch \
"
# systemtap doesn't support mips
diff --git a/meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch b/meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch
deleted file mode 100644
index faef049fec..0000000000
--- a/meta/recipes-kernel/trace-cmd/kernelshark/kernelshark-fix-syntax-error-of-shell.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-kernelshark: fix syntax error of shell
-
-Delete "<<<" syntax of bash in Makefile, else we would get following error:
-
- Syntax error: redirection unexpected
-
-Upstream-Status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- Makefile | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c1fa906..be84415 100644
---- a/Makefile
-+++ b/Makefile
-@@ -89,8 +89,7 @@ endif
-
- # $(call test-build, snippet, ret) -> ret if snippet compiles
- # -> empty otherwise
--test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \
-- <<<'$1' && echo y), $2)
-+test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2)
-
- # have udis86 disassembler library?
- udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
---
-1.7.9.5
-
diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb b/meta/recipes-kernel/trace-cmd/kernelshark_git.bb
index 28412c72d3..b2ef1fcf55 100644
--- a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
+++ b/meta/recipes-kernel/trace-cmd/kernelshark_git.bb
@@ -9,9 +9,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
DEPENDS = "gtk+ libxml2"
RDEPENDS_${PN} = "trace-cmd"
-SRC_URI_append = "file://kernelshark-fix-syntax-error-of-shell.patch"
-
-EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui"
+EXTRA_OEMAKE = "\
+ 'prefix=${prefix}' \
+ 'bindir_relative=${@oe.path.relative(prefix, bindir)}' \
+ 'libdir=${@oe.path.relative(prefix, libdir)}' \
+ NO_PYTHON=1 \
+ gui \
+"
do_compile_prepend() {
# Make sure the recompile is OK
@@ -19,8 +23,8 @@ do_compile_prepend() {
}
do_install() {
- oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui
- rm ${D}${bindir}/trace-cmd
- rm -rf ${D}${datadir}/trace-cmd
- rmdir ${D}${datadir}
+ oe_runmake DESTDIR="${D}" install_gui
+ rm ${D}${bindir}/trace-cmd
+ rm -rf ${D}${libdir}/trace-cmd
+ rmdir ${D}${libdir}
}
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/meta/recipes-kernel/trace-cmd/trace-cmd.inc
index fb8c5fa7f7..87e4a9c603 100644
--- a/meta/recipes-kernel/trace-cmd/trace-cmd.inc
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd.inc
@@ -1,14 +1,12 @@
-SRCREV = "7055ffd37beeb44714e86a4abc703f7e175a0db5"
-PR = "r3"
-PV = "1.2+git${SRCPV}"
+SRCREV = "0813335d2e49291e7ab6a4365cec2baa05813eda"
+PV = "2.5.3+git${SRCPV}"
-inherit pkgconfig pythonnative
+inherit pkgconfig
FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \
- file://addldflags.patch \
- file://make-docs-optional.patch \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.5 \
file://blktrace-api-compatibility.patch \
"
+
S = "${WORKDIR}/git"
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch
deleted file mode 100644
index 14730db905..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-trace-cmd: Cross-compile fixes for LDFLAGS and include path
-
-Add ability for the Makefile to respect LDFLAGS.
-Also remove hardcoded /usr/local/include include path.
-
-Upstream-Status: Accepted [Post 1.2: 5f576e9af7ad706774d9764a9ae3989376797c0e]
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-
----
- Makefile | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-Index: git/Makefile
-===================================================================
---- git.orig/Makefile
-+++ git/Makefile
-@@ -202,12 +202,13 @@ export Q VERBOSE
- TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION)
- KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION)
-
--INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES)
-+INCLUDES = -I. $(CONFIG_INCLUDES)
-
- include features.mk
-
- # Set compile option CFLAGS if not set elsewhere
- CFLAGS ?= -g -Wall
-+LDFLAGS ?=
-
- ifndef NO_PTRACE
- ifneq ($(call try-cc,$(SOURCE_PTRACE),),y)
-@@ -251,7 +252,7 @@ do_fpic_compile = \
-
- do_app_build = \
- ($(print_app_build) \
-- $(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS))
-+ $(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
-
- do_compile_shared_library = \
- ($(print_shared_lib_compile) \
-@@ -263,7 +264,7 @@ do_compile_plugin_obj = \
-
- do_plugin_build = \
- ($(print_plugin_build) \
-- $(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<)
-+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $<)
-
- do_build_static_lib = \
- ($(print_static_lib_build) \
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch
deleted file mode 100644
index 8402426c5f..0000000000
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Disable building docs until we have asciidocs available as a recipe.
-
-Upstream-Status: Inappropriate [Account for missing dependency, the lazy way]
-
-Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-
----
- Makefile | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-Index: git/Makefile
-===================================================================
---- git.orig/Makefile
-+++ git/Makefile
-@@ -327,7 +327,9 @@ TARGETS = $(CMD_TARGETS) $(GUI_TARGETS)
- # If you want kernelshark, then do: make gui
- ###
-
--all: all_cmd doc show_gui_make
-+# Make doc optional
-+#all: all_cmd doc show_gui_make
-+all: all_cmd show_gui_make
-
- all_cmd: $(CMD_TARGETS)
-
-@@ -503,7 +505,9 @@ install_python: $(PYTHON_SO_INSTALL) $(P
- install_cmd: all_cmd install_plugins install_python
- $(Q)$(call do_install,trace-cmd,$(bindir_SQ))
-
--install: install_cmd install_doc
-+# Make doc optional
-+#install: install_cmd install_doc
-+install: install_cmd
- @echo "Note: to install the gui, type \"make install_gui\""
-
- install_gui: install_cmd gui
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
index a4d5382aaf..b1ac7892dd 100644
--- a/meta/recipes-kernel/trace-cmd/trace-cmd_2.3.2.bb
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
@@ -6,13 +6,7 @@ require trace-cmd.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \
file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \
- file://trace-input.c;beginline=5;endine=8;md5=dafd8a1cade30b847a8686dd3628cea4 \
-"
-SRCREV = "79e08f8edb38c4c5098486caaa87ca90ba00f547"
-
-PV = "2.3.2+git${SRCPV}"
-
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git;branch=trace-cmd-stable-v2.3 \
+ file://trace-input.c;beginline=5;endline=8;md5=3ec82f43bbe0cfb5951ff414ef4d44d0 \
"
EXTRA_OEMAKE = "\