Subject: port-m68k/14099: typo in pmap.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tanh@tk.airnet.ne.jp>
List: netbsd-bugs
Date: 09/30/2001 03:37:49
>Number:         14099
>Category:       port-m68k
>Synopsis:       typo in pmap.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-m68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 29 11:40:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Hiroki Tanikawa
>Release:        NetBSD-current Sep 22 2001
>Organization:
>Environment:
System: NetBSD misa 1.5Y NetBSD 1.5Y (MISA) #32: Mon Sep 24 02:40:31 JST 2001
Architecture: m68k
Machine: mac68k

Macintosh Centris 650 with 68040 and 72MB RAM

>Description:

Kernel panics while making current.

panic: MMU fault
Stopped in pid 209 (make) at _cpu_Debugger+0x6: unlk a6
db> t
_cpu_Debugger(f4582008,8,6e17d84,37290,6e17d70) + 6
_panic(f0ea1,5,66960,0,0) + 9c
_trap(8,545,f4585019) + 238
_uvmfault_anonget(6e17f0c,6df2a2c,66960) + 4c
_uvm_fault(882b40,a7c000,0,3) + 5c2
_trap(8,481,a7cffc) + 4f0
faultstkadj() + 0

>How-To-Repeat:

make build or rsync /usr/src from another machine.
If one process uses the memory which is about 10MB, kernel panics.

>Fix:

This is a patch for mac68k.
I think a same fix is needed for 
other ports (amiga, atari, cesfic, hp300, luna68k, news68k, next68k).

Index: pmap.c
===================================================================
RCS file: /cvs/cvsroot/syssrc/sys/arch/mac68k/mac68k/pmap.c,v
retrieving revision 1.79
diff -c -r1.79 pmap.c
*** pmap.c      2001/09/10 21:19:17     1.79
--- pmap.c      2001/09/29 16:28:55
***************
*** 1400,1406 ****
                                 */
  
                                *pte = PG_NV;
!                               TBIS(va);
                        }
                        pte++;
                        sva += NBPG;
--- 1400,1406 ----
                                 */
  
                                *pte = PG_NV;
!                               TBIS(sva);
                        }
                        pte++;
                        sva += NBPG;

>Release-Note:
>Audit-Trail:
>Unformatted: