Linux IA64 platform development
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: linux-ia64@vger.kernel.org
Subject: Re: testing a new syscall
Date: Mon, 22 Mar 2004 12:15:44 +0000	[thread overview]
Message-ID: <20040322121544.GB25059@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040322021555.7b6f9317.akpm@osdl.org>

On Mon, Mar 22, 2004 at 02:15:55AM -0800, Andrew Morton wrote:
> I'm trying to work out how to test the new remap_file_pages() syscall on
> ia64 and have conceded defeat.
> 
> I got this far, but it segfaults:
> 
> #elif __ia64__
> #define __NR_sys_remap_file_pages 1259
> ...
> _syscall5(long, sys_remap_file_pages, unsigned long, start, unsigned long, len,
>         unsigned long, prot, unsigned long, pgoff, int, flags);
> 
> ....
> 
> #if defined(__ia64__)
> 
> asm(
> "	.text\n"

Argh!  Assembler!  Run away ;-)

Here's the better way to do it (cribbed from manfred's mqueue work):

static inline long remap_file_pages(unsigned long start, unsigned long len,
		unsigned long prot, unsigned long pgoff, int flags)
{
	return syscall(__NR_sys_remap_file_pages, start, len, prot, pgoff,
			flags);
}

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

      reply	other threads:[~2004-03-22 12:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22 10:15 testing a new syscall Andrew Morton
2004-03-22 12:15 ` Matthew Wilcox [this message]

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=20040322121544.GB25059@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=linux-ia64@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