lkml.org 
[lkml]   [2009]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Bring sparc64 dynamic ftrace up to snuff...

* David Miller <davem@davemloft.net> wrote:

> int ftrace_update_ftrace_func(ftrace_func_t func)
> {
> unsigned long ip = (unsigned long)(&ftrace_call);
> - unsigned char old[MCOUNT_INSN_SIZE], *new;
> + u32 old, new;
>
> - memcpy(old, &ftrace_call, MCOUNT_INSN_SIZE);
> + old = *(u32 *) &ftrace_call;

btw., just one (really stupid) question here: can ftrace_call be
misaligned, and is misalignment a problem on Sparc? If it's not a
problem then disregard the rest of the mail.

I dont see a particular alignment done in mcount.S:

ftrace_caller:
mov %i7, %o1
mov %o7, %o0
.globl ftrace_call
ftrace_call:
call ftrace_stub

so replacing an memcpy (which can copy misaligned buffers) with a
direct assignment (which cannot) - wont that cause misalignment on
Sparc?

Ingo


\
 
 \ /
  Last update: 2009-06-14 00:09    [W:0.052 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site