linux-mips-fnet
[Top] [All Lists]

Re: Memory corruption: is anybody who remeber why ?!

To: "Vladimir A. Roganov" <roganov@niisi.msk.ru>
Subject: Re: Memory corruption: is anybody who remeber why ?!
From: Ralf Baechle <ralf@uni-koblenz.de>
Date: Thu, 25 May 2000 18:41:44 +0200
Cc: linux-mips@fnet.fr
In-reply-to: <392CF17D.5A7DC4EA@niisi.msk.ru>; from roganov@niisi.msk.ru on Thu, May 25, 2000 at 01:25:17PM +0400
References: <XFMail.990707230857.Harald.Koerfgen@home.ivm.de> <392CF17D.5A7DC4EA@niisi.msk.ru>
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 
> linux/include/asm-mips
> 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
Index: include/asm-mips/page.h
===================================================================
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__) */
[ralf@lappi linux-sgi-2.2]$

Voila, the oracle has always right :-)

  Ralf

<Prev in Thread] Current Thread [Next in Thread>