On Thu, May 25, 2000 at 01:25:17PM +0400, Vladimir A. Roganov wrote:
> Few months ago some developers of linux-mips on R3K
> (not all, but only _happy members_, having mips boxes with hard disks :-)
> were discussing a swap functionality problem.
> Discussion (see msg. below) was focused on random user program crashes
> occurred in the system working with swapping turned on.
> Unfortunately, we plug in a (SCSI) hard disk into our BAGET/R3081E just now,
> and today we are looking to above problem. It looks that problem was fixed
> in 2.3.xx, but our most 'production' version is still 2.2.1.
> Looking a differences we found a lot of interesting fixes in
> since 2.2.1, but we have no time to investigate/migrate the code.
> (customers are waiting a coolest dual-board baget computer, and only
> this problem hold us before deadline :-)
> Q: Maybe somebody remember a hint which was a key point for fixing this bug ?
Lemme ask the oracle for you ...
[ralf@lappi linux-sgi-2.2]$ head /dev/random
RCS file: /home/pub/cvs/linux/include/asm-mips/page.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- include/asm-mips/page.h 1998/08/25 09:21:59 1.4
+++ include/asm-mips/page.h 1998/08/28 23:24:03 1.5
@@ -1,4 +1,4 @@
-/* $Id: page.h,v 1.3 1998/07/13 23:29:09 tsbogend Exp $
+/* $Id: page.h,v 1.4 1998/08/25 09:21:59 ralf Exp $
* Definitions for page handling
@@ -129,8 +129,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__) */
Voila, the oracle has always right :-)