From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: linux-mips@fnet.fr, linux@cthulhu.engr.sgi.com
Subject: Re: One good and some bad news
Date: Sun, 12 Jul 1998 20:55:23 +0200 [thread overview]
Message-ID: <19980712205523.42509@alpha.franken.de> (raw)
In-Reply-To: <19980712112949.25350@alpha.franken.de>; from Thomas Bogendoerfer on Sun, Jul 12, 1998 at 11:29:49AM +0200
On Sun, Jul 12, 1998 at 11:29:49AM +0200, Thomas Bogendoerfer wrote:
> This was the first bad news. To get XF68_FBDev to work, I had to
> discover, that the logic with MAP_MASK is broken. When you look in
ok, I've found a solution for this problem by just using what the other
ports are using for MAP_NR(). I also fixed the mk_pte_phys(), which was
broken, too. Below is the patch I'm currently using. The problem with
the dbe after quiting the X server, didn't happen again.
Thomas.
Index: include/asm/page.h
===================================================================
RCS file: /var/mips/linus/cvs/linux/include/asm-mips/page.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 page.h
--- page.h 1997/06/01 03:17:11 1.1.1.1
+++ page.h 1998/07/12 18:50:11
@@ -76,8 +76,7 @@
#define PAGE_OFFSET 0x80000000UL
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
-#define MAP_MASK 0x1fffffffUL
-#define MAP_NR(addr) ((((unsigned long)(addr)) & MAP_MASK) >> PAGE_SHIFT)
+#define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT)
#endif /* defined (__KERNEL__) */
Index: include/asm/pgtable.h
===================================================================
RCS file: /var/mips/linus/cvs/linux/include/asm-mips/pgtable.h,v
retrieving revision 1.11
diff -u -r1.11 pgtable.h
--- pgtable.h 1998/03/17 22:16:15 1.11
+++ pgtable.h 1998/07/12 17:57:22
@@ -346,7 +346,7 @@
extern inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
{
- return __pte((physpage - PAGE_OFFSET) | pgprot_val(pgprot));
+ return __pte(physpage | pgprot_val(pgprot));
}
extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
--
See, you not only have to be a good coder to create a system like Linux,
you have to be a sneaky bastard too ;-)
[Linus Torvalds in <4rikft$7g5@linux.cs.Helsinki.FI>]
prev parent reply other threads:[~1998-07-12 19:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-12 9:29 One good and some bad news Thomas Bogendoerfer
1998-07-12 17:01 ` ralf
1998-07-12 21:53 ` Thomas Bogendoerfer
1998-07-13 0:36 ` ralf
1998-07-13 22:08 ` Thomas Bogendoerfer
1998-07-12 18:55 ` Thomas Bogendoerfer [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=19980712205523.42509@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=linux-mips@fnet.fr \
--cc=linux@cthulhu.engr.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