All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Nicolas Schichan <nschichan@freebox.fr>
Cc: linux-mips@linux-mips.org
Subject: Re: [patch] [RFC] Kexec on MIPS
Date: Wed, 18 Oct 2006 23:38:39 +0100	[thread overview]
Message-ID: <20061018223839.GA11263@linux-mips.org> (raw)
In-Reply-To: <200610182321.21299.nschichan@freebox.fr>

On Wed, Oct 18, 2006 at 11:21:21PM +0200, Nicolas Schichan wrote:

One more problem:

+       sys     sys_kexec_load          1

The last column is the number of arguments slots of the syscall as counted
by the MIPS argument passing conventions, so this should actually be 4.
Not this was actually a harmless bug; it does hurt for syscalls that need
more than 4 slots.

Then buglets with O32 / N32 ABIs on 64-bit kernels:

diff -Nru linux-orig/arch/mips/kernel/scall64-n32.S linux-work/arch/mips/kernel/scall64-n32.S
--- linux-orig/arch/mips/kernel/scall64-n32.S   2006-10-14 05:34:03.000000000 +0200
+++ linux-work/arch/mips/kernel/scall64-n32.S   2006-10-17 15:58:59.000000000 +0200
@@ -392,3 +392,4 @@
        PTR     sys_tee
        PTR     sys_vmsplice                    /* 6271 */
        PTR     sys_move_pages
+       PTR     sys_kexec_load
diff -Nru linux-orig/arch/mips/kernel/scall64-o32.S linux-work/arch/mips/kernel/scall64-o32.S
--- linux-orig/arch/mips/kernel/scall64-o32.S   2006-10-14 05:34:03.000000000 +0200
+++ linux-work/arch/mips/kernel/scall64-o32.S   2006-10-17 15:59:23.000000000 +0200
@@ -514,4 +514,5 @@
        PTR     sys_tee
        PTR     sys_vmsplice
        PTR     compat_sys_move_pages
+       PTR     sys_kexec_load
        .size   sys_call_table,.-sys_call_table

That is these two being 32-bit syscalls on a 64-bit kernel need to use the
compat_sys_kexec_load syscall wrapper to work right.

And finally there are the syscall numbers.  The ones you've picked are
already taken, so I've choosen:

	O32 ABI: 4311
	N64 ABI: 5270
	N32 ABI: 6270

Note I'll allocate these syscalls immediately to give ABI stability - it's
a standard Linux syscall afterall.  So you can drop the unistd.h bits from
your patch.

And finally:

diff -Nru linux-orig/Makefile linux-work/Makefile
--- linux-orig/Makefile 2006-10-14 05:34:03.000000000 +0200
+++ linux-work/Makefile 2006-10-17 16:09:02.000000000 +0200

You may want to drop that part from your patch, too ;-)

  Ralf

  parent reply	other threads:[~2006-10-18 22:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18 13:14 [patch] [RFC] Kexec on MIPS Nicolas Schichan
2006-10-18 14:31 ` Ralf Baechle
2006-10-18 21:21   ` Nicolas Schichan
2006-10-18 21:37     ` Nicolas Schichan
2006-10-18 22:38     ` Ralf Baechle [this message]
2006-10-19 14:16       ` Nicolas Schichan

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=20061018223839.GA11263@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=nschichan@freebox.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.