mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
	rostedt@goodmis.org
Subject: Re: [PATCH] Bring sparc64 dynamic ftrace up to snuff...
Date: Sat, 13 Jun 2009 21:40:27 +0200	[thread overview]
Message-ID: <20090613194027.GA25439@elte.hu> (raw)
In-Reply-To: <20090613.011020.214065340.davem@davemloft.net>


* 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

  parent reply	other threads:[~2009-06-13 22:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-13  8:10 David Miller
2009-06-13 13:51 ` Steven Rostedt
2009-06-13 18:30   ` Ingo Molnar
2009-06-13 19:40 ` Ingo Molnar [this message]
2009-06-13 23:56   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090613194027.GA25439@elte.hu \
    --to=mingo@elte.hu \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®