summaryrefslogtreecommitdiffstats
path: root/package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch
diff options
context:
space:
mode:
authorThomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>2013-03-12 19:10:55 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2013-03-18 22:19:51 +0100
commit145794b56fd0b5df0d6e2ff12c23ad859f40e4a8 (patch)
treec7acde220a72ea24a2a459d237139141a12978f7 /package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch
parentf5fca1330ce572bcfcc3d783b34ba1517b9b41b6 (diff)
downloadbuildroot-novena-145794b56fd0b5df0d6e2ff12c23ad859f40e4a8.tar.gz
buildroot-novena-145794b56fd0b5df0d6e2ff12c23ad859f40e4a8.zip
oprofile: upstep 0.9.7 patches to 0.9.8
The patches to oprofile 0.9.7 seem still relevant for 0.9.8, but for some reason they were not upstepped. [Peter: drop version number from patch filenames] Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch')
-rw-r--r--package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch
new file mode 100644
index 000000000..7c4138946
--- /dev/null
+++ b/package/oprofile/oprofile-001-avr32-enable-lookup_dcookie.patch
@@ -0,0 +1,24 @@
+Index: oprofile-0.9.4/daemon/opd_cookie.c
+===================================================================
+--- oprofile-0.9.4.orig/daemon/opd_cookie.c 2008-07-25 16:00:17.000000000 +0200
++++ oprofile-0.9.4/daemon/opd_cookie.c 2008-07-25 16:00:20.000000000 +0200
+@@ -78,6 +78,19 @@
+ (unsigned long)(cookie & 0xffffffff),
+ (unsigned long)(cookie >> 32), buf, size);
+ }
++#elif (defined(__avr32__))
++static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size)
++{
++ /* On avr32, the first 64bit arg (cookie) is expected to be in
++ * r11(MSW)/r10(LSW) which normally hold arg 2 and arg 3. The second arg
++ * (buf) is then expected to be in r12 which normally holds the first
++ * arg. Third arg (size) is at the right position.
++ */
++ return syscall(__NR_lookup_dcookie, buf,
++ (unsigned long)(cookie >> 32),
++ (unsigned long)(cookie & 0xffffffff),
++ size);
++}
+ #else
+ static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size)
+ {