Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Maynard Johnson <maynardj@us...> - 2008-07-18 20:44:14
|
Voss, Nikolaus wrote: > Hi, > > this patch makes the lookup_dcookie system call work on AVR32. > > Signed-off-by: Nikolaus Voss <n.voss@...> > > Index: daemon/opd_cookie.c > =================================================================== > RCS file: /cvsroot/oprofile/oprofile/daemon/opd_cookie.c,v > retrieving revision 1.23 > diff -u -r1.23 opd_cookie.c > --- daemon/opd_cookie.c 21 May 2008 12:30:15 -0000 1.23 > +++ daemon/opd_cookie.c 18 Jul 2008 09:53:04 -0000 > @@ -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); > +} The patch looks OK as far as I can tell -- that is to say it's not going to break anything else. But I'd like a second opinion on the validity of the code for avr32, so I'm asking the person who contributed the initial avr32 support. *Haavard*, can you please review this patch? Thanks. -Maynard > #else > static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size) > { > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > oprofile-list mailing list > oprofile-list@... > https://lists.sourceforge.net/lists/listinfo/oprofile-list |