From: Jun Sun <jsun@mvista.com>
To: Ralf Baechle <ralf@oss.sgi.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: Should /dev/kmem support above 0x80000000 area?
Date: Mon, 11 Dec 2000 23:38:36 -0800 [thread overview]
Message-ID: <3A35D5FC.11372085@mvista.com> (raw)
In-Reply-To: 20001209003222.A10669@bacchus.dhis.org
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
Ralf Baechle wrote:
>
> Send me the patch and I'll comment.
>
> Ralf
Here is my patch. I think it should be safe for mips64. Please double check
it.
Jun
[-- Attachment #2: linux-mips-kmem-kseg.patch --]
[-- Type: text/plain, Size: 711 bytes --]
diff -Nru linux/drivers/char/mem.c.orig linux/drivers/char/mem.c
--- linux/drivers/char/mem.c.orig Mon Dec 11 22:07:19 2000
+++ linux/drivers/char/mem.c Mon Dec 11 22:38:11 2000
@@ -258,6 +258,14 @@
count -= read;
}
+#if defined(__mips__)
+ if (KSEGX(p)) {
+ if (copy_to_user(buf, (char*)p, count))
+ return -EFAULT;
+ return count+read;
+ }
+#endif
+
kbuf = (char *)__get_free_page(GFP_KERNEL);
if (!kbuf)
return -ENOMEM;
@@ -288,6 +296,12 @@
size_t count, loff_t *ppos)
{
unsigned long p = *ppos;
+
+#if defined(__mips__)
+ if (KSEGX(p)) {
+ return do_write_mem(file, (void*)p, p, buf, count, ppos);
+ }
+#endif
if (p >= (unsigned long) high_memory)
return 0;
next prev parent reply other threads:[~2000-12-11 23:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-08 3:13 Should /dev/kmem support above 0x80000000 area? Jun Sun
2000-12-08 23:32 ` Ralf Baechle
2000-12-11 11:28 ` Maciej W. Rozycki
2000-12-11 12:41 ` Guido Guenther
2000-12-12 2:26 ` Jun Sun
2000-12-11 18:56 ` Guido Guenther
2000-12-11 19:05 ` Maciej W. Rozycki
2000-12-12 6:16 ` Jun Sun
2000-12-12 11:58 ` Maciej W. Rozycki
2000-12-12 18:53 ` Jun Sun
2000-12-12 7:38 ` Jun Sun [this message]
2000-12-12 13:23 ` Maciej W. Rozycki
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=3A35D5FC.11372085@mvista.com \
--to=jsun@mvista.com \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@oss.sgi.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