linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Indan Zupancic <indan@nul.nu>
Cc: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>,
	linux-kernel@vger.kernel.org, masami.hiramatsu.pt@hitachi.com,
	rostedt@goodmis.org, fweisbec@gmail.com, mingo@redhat.com,
	jbaron@redhat.com, yrl.pp-manager.tt@hitachi.com,
	mcgrathr@google.com
Subject: Re: [PATCH] ARM: Wire up HAVE_SYSCALL_TRACEPOINTS
Date: Thu, 2 Feb 2012 11:10:07 +0000	[thread overview]
Message-ID: <20120202111007.GF889@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <06cd49dcb5a124722e042c308144d5b7.squirrel@webmail.greenhost.nl>

On Thu, Feb 02, 2012 at 12:00:30PM +0100, Indan Zupancic wrote:
> On Thu, February 2, 2012 10:21, Takuo Koguchi wrote:
> > Right.  As Russel King suggested, this patch depends on those configs
> > until very large NR_syscalls is properly handled by ftrace.
> 
> It has nothing to do with large NR_syscalls. Supporting OABI is hard,

That's rubbish if you're doing things correctly, where correctly is
defined as 'not assuming that the syscall number is in r7, but reading
it from the thread_info->syscall member.

> e.g. it doesn't put the syscall nr in r7, it's encoded as part of the
> syscall instruction. Also the ABI for some system calls is different,
> with different arg layouts (alignment of 64 bit args is different).

OABI is a lot more simple because you know how the args are layed out
without needing a table to work out where the padding is.  You know
if you have a 64-bit argument that it follows immediately after a
32-bit argument without needing any alignment.

So:

next_arg_reg(current_arg_reg, next_size, oabi)
{
	if (oabi) {
		/* OABI case */
		next_arg_reg = current_arg_reg + 1;
	} else {
		/* EABI case */
		next_arg_reg = current_arg_reg + 1;
		if (next_size == 64 && next_arg_reg & 1)
			next_arg_reg++;
	}
	return next_arg_reg;
}

Notice how the EABI case is a lot more complicated by the alignment
rules than the OABI - not only do you need something like the above
but also you need a table to describe the size of the arguments for
every syscall in the system.

  reply	other threads:[~2012-02-02 11:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01 11:01 [PATCH] ARM: Wire up HAVE_SYSCALL_TRACEPOINTS takuo.koguchi.sw
2012-02-01  1:47 ` Indan Zupancic
2012-02-01  2:09   ` Steven Rostedt
2012-02-02  9:21   ` Takuo Koguchi
2012-02-02 11:00     ` Indan Zupancic
2012-02-02 11:10       ` Russell King - ARM Linux [this message]
2012-02-02 23:38         ` Indan Zupancic
2012-02-02 23:41           ` Roland McGrath
2012-02-03  0:32           ` Russell King - ARM Linux
2012-02-03  1:58             ` Indan Zupancic
2012-02-01  9:46 ` Russell King - ARM Linux

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=20120202111007.GF889@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=fweisbec@gmail.com \
    --cc=indan@nul.nu \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mcgrathr@google.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=takuo.koguchi.sw@hitachi.com \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /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;
as well as URLs for NNTP newsgroup(s).