diff options
author | Jon Medhurst <tixy@linaro.org> | 2012-03-05 12:11:14 +0000 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2012-03-05 18:17:53 +0000 |
commit | 63d75ee336d34a602c1480dfdf7e4f7383918a03 (patch) | |
tree | 0ddec77aa94c8e8dc16eccc53a48db24bdeef8dc | |
parent | b2727589541e5164ea8fe5a87be5b70829f2dff3 (diff) |
gator-module-5.9-3: Fix building for Linux 3.3 + build with Mali support
Signed-off-by: Jon Medhurst <tixy@linaro.org>
4 files changed, 118 insertions, 0 deletions
diff --git a/gator-module-5.9/debian/changelog b/gator-module-5.9/debian/changelog index 8a63437..6a14a74 100644 --- a/gator-module-5.9/debian/changelog +++ b/gator-module-5.9/debian/changelog @@ -1,3 +1,13 @@ +gator-module (5.9-3) oneiric; urgency=low + + [ Wade Cherry ] + * Fix build failure on Linux 3.3 + + [ Jon Medhurst ] + * Hack makefile to search for Mali trace headers + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Mon, 05 Mar 2012 12:06:31 +0000 + gator-module (5.9-2) oneiric; urgency=low * Update kernel flavours for 2012.02 release. diff --git a/gator-module-5.9/debian/patches/gator-driver-fix-build-failure-on-linux-3.3.patch b/gator-module-5.9/debian/patches/gator-driver-fix-build-failure-on-linux-3.3.patch new file mode 100644 index 0000000..207ad2c --- /dev/null +++ b/gator-module-5.9/debian/patches/gator-driver-fix-build-failure-on-linux-3.3.patch @@ -0,0 +1,82 @@ +diff --git a/gator_events_meminfo.c b/gator_events_meminfo.c +index 8af9cfc..c763634 100644 +--- a/gator_events_meminfo.c ++++ b/gator_events_meminfo.c +@@ -28,11 +28,19 @@ static void wq_sched_handler(struct work_struct *wsptr); + + DECLARE_WORK(work, wq_sched_handler); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + GATOR_DEFINE_PROBE(mm_page_free_direct, TP_PROTO(struct page *page, unsigned int order)) { ++#else ++GATOR_DEFINE_PROBE(mm_page_free, TP_PROTO(struct page *page, unsigned int order)) { ++#endif + mem_event++; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + GATOR_DEFINE_PROBE(mm_pagevec_free, TP_PROTO(struct page *page, int cold)) { ++#else ++GATOR_DEFINE_PROBE(mm_page_free_batched, TP_PROTO(struct page *page, int cold)) { ++#endif + mem_event++; + } + +@@ -83,20 +91,36 @@ static int gator_events_meminfo_start(void) + if (meminfo_global_enabled == 0) + return 0; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + if (GATOR_REGISTER_TRACE(mm_page_free_direct)) +- goto mm_page_free_direct_exit; ++#else ++ if (GATOR_REGISTER_TRACE(mm_page_free)) ++#endif ++ goto mm_page_free_exit; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + if (GATOR_REGISTER_TRACE(mm_pagevec_free)) +- goto mm_pagevec_free_exit; ++#else ++ if (GATOR_REGISTER_TRACE(mm_page_free_batched)) ++#endif ++ goto mm_page_free_batched_exit; + if (GATOR_REGISTER_TRACE(mm_page_alloc)) + goto mm_page_alloc_exit; + + return 0; + + mm_page_alloc_exit: ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + GATOR_UNREGISTER_TRACE(mm_pagevec_free); +-mm_pagevec_free_exit: ++#else ++ GATOR_UNREGISTER_TRACE(mm_page_free_batched); ++#endif ++mm_page_free_batched_exit: ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + GATOR_UNREGISTER_TRACE(mm_page_free_direct); +-mm_page_free_direct_exit: ++#else ++ GATOR_UNREGISTER_TRACE(mm_page_free); ++#endif ++mm_page_free_exit: + return -1; + } + +@@ -105,8 +129,13 @@ static void gator_events_meminfo_stop(void) + int i; + + if (meminfo_global_enabled) { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) + GATOR_UNREGISTER_TRACE(mm_page_free_direct); + GATOR_UNREGISTER_TRACE(mm_pagevec_free); ++#else ++ GATOR_UNREGISTER_TRACE(mm_page_free); ++ GATOR_UNREGISTER_TRACE(mm_page_free_batched); ++#endif + GATOR_UNREGISTER_TRACE(mm_page_alloc); + } + +-- +1.7.9 + diff --git a/gator-module-5.9/debian/patches/gator-driver-hack-makefile-to-search-for-mali-trace-headers.patch b/gator-module-5.9/debian/patches/gator-driver-hack-makefile-to-search-for-mali-trace-headers.patch new file mode 100644 index 0000000..b626dd0 --- /dev/null +++ b/gator-module-5.9/debian/patches/gator-driver-hack-makefile-to-search-for-mali-trace-headers.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile b/Makefile +index e521b99..8824f8e 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,6 +16,16 @@ gator-y := gator_main.o \ + + gator-y += gator_events_mmaped.o + ++ifeq ($(GATOR_WITH_MALI_SUPPORT),) ++ifeq ($(GATOR_MALI_INCLUDE),) ++GATOR_MALI_INCLUDE = $(abspath $(shell find -L . -name "mali_linux_trace.h" | sed -n -e '1s,\(.*\)/linux/mali_linux_trace.h$$,\1,p')) ++endif ++ifneq ($(GATOR_MALI_INCLUDE),) ++GATOR_WITH_MALI_SUPPORT = MALI_400 # for now, assume all devices with Mali have the Mali-400 ++EXTRA_CFLAGS += -I$(GATOR_MALI_INCLUDE) ++endif ++endif ++ + ifneq ($(GATOR_WITH_MALI_SUPPORT),) + ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx) + gator-y += gator_events_mali_t6xx.o +-- +1.7.9 + diff --git a/gator-module-5.9/debian/patches/series b/gator-module-5.9/debian/patches/series index e69de29..8eb5625 100644 --- a/gator-module-5.9/debian/patches/series +++ b/gator-module-5.9/debian/patches/series @@ -0,0 +1,2 @@ +gator-driver-fix-build-failure-on-linux-3.3.patch +gator-driver-hack-makefile-to-search-for-mali-trace-headers.patch |