Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Richard Hirst <rhirst@linuxcare.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] pread/pwrite
Date: Wed, 11 Apr 2001 11:30:39 +0100	[thread overview]
Message-ID: <20010411113039.U6992@linuxcare.com> (raw)
In-Reply-To: <20010410213005.D25123@parcelfarce.linux.theplanet.co.uk>; from matthew@wil.cx on Tue, Apr 10, 2001 at 09:30:05PM +0100

Hi Willy,

> Could those who're having problems with pread/pwrite try the following patch?

  I don't see how this is supposed to work with a 32 bit userspace and 64
bit kernel.  Do we also need syscall wrappers for pread/pwrite, something
like this:

Index: arch/parisc/kernel/sys_parisc32.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/sys_parisc32.c,v
retrieving revision 1.4
diff -u -r1.4 sys_parisc32.c
--- sys_parisc32.c	2001/04/10 20:05:24	1.4
+++ sys_parisc32.c	2001/04/11 10:18:17
@@ -2727,3 +2727,19 @@
 	}
 	sys_fcntl(fd, cmd, arg);
 }
+
+
+asmlinkage int sys32_pread(int fd, void *buf, size_t count, unsigned int high, unsigned int low)
+{
+	extern asmlinkage ssize_t sys_pread(unsigned int, char *, size_t, loff_t);
+
+	return sys_pread(fd, buf, count, (loff_t)high << 32 | low);
+}
+
+asmlinkage int sys32_pwrite(int fd, void *buf, size_t count, unsigned int high, unsigned int low)
+{
+	extern asmlinkage ssize_t sys_pwrite(unsigned int, char *, size_t, loff_t);
+
+	return sys_pwrite(fd, buf, count, (loff_t)high << 32 | low);
+}
+
Index: arch/parisc/kernel/syscall.S
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/syscall.S,v
retrieving revision 1.60
diff -u -r1.60 syscall.S
--- syscall.S	2001/04/10 20:05:24	1.60
+++ syscall.S	2001/04/11 10:18:18
@@ -441,8 +441,8 @@
 	ENTRY_SAME(getitimer)	/* 105 */
 	ENTRY_SAME(capget)
 	ENTRY_SAME(capset)
-	ENTRY_SAME(pread)
-	ENTRY_SAME(pwrite)
+	ENTRY_DIFF(pread)
+	ENTRY_DIFF(pwrite)
 	ENTRY_SAME(getcwd)		/* 110 */
 	ENTRY_SAME(vhangup)
 	ENTRY_SAME(fstat64)

      reply	other threads:[~2001-04-11 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-10 20:30 [parisc-linux] pread/pwrite Matthew Wilcox
2001-04-11 10:30 ` Richard Hirst [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=20010411113039.U6992@linuxcare.com \
    --to=rhirst@linuxcare.com \
    --cc=matthew@wil.cx \
    --cc=parisc-linux@parisc-linux.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