[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090613194027.GA25439@elte.hu>
Date: Sat, 13 Jun 2009 21:40:27 +0200
From: Ingo Molnar <mingo@...e.hu>
To: David Miller <davem@...emloft.net>
Cc: linux-kernel@...r.kernel.org, sparclinux@...r.kernel.org,
rostedt@...dmis.org
Subject: Re: [PATCH] Bring sparc64 dynamic ftrace up to snuff...
* David Miller <davem@...emloft.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists