Subject: port-sh3/11441: sh3 kernel can't compile with SH4 and without SH4_PCMCIA
To: None <gnats-bugs@gnats.netbsd.org>
From: None <bsh@hh.iij4u.or.jp>
List: netbsd-bugs
Date: 11/07/2000 15:30:14
>Number:         11441
>Category:       port-sh3
>Synopsis:       sh3 kernel can't compile with SH4  and without SH4_PCMCIA
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-sh3-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 07 15:30:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Hiroyuki Bessho
>Release:        1.5G
>Organization:
>Environment:
NetBSD 1.5G (RAMDISK) #0: Tue Nov 7 02:39:32 JST 2000
  bsh@grotto.iijnet.or.jp:/u0/work/current/dreamcast/compile/RAMDISK
>Description:
got compile error:

/u1/proj/netbsd/current/sys/arch/sh3/sh3/trap.c: In function `tlb_handler':
/u1/proj/netbsd/current/sys/arch/sh3/sh3/trap.c:668: `PG_PCMCIA' undeclared (first use in this function)
/u1/proj/netbsd/current/sys/arch/sh3/sh3/trap.c:668: (Each undeclared identifier is reported only once
/u1/proj/netbsd/current/sys/arch/sh3/sh3/trap.c:668: for each function it appears in.)
/u1/proj/netbsd/current/sys/arch/sh3/sh3/trap.c:677: `PG_PCMCIA_IO' undeclared (first use in this function)
/u1/proj/netbsd/current/sys/arch/sh3/sh3/trap.c:679: `PG_PCMCIA_MEM' undeclared (first use in this function)
/u1/proj/netbsd/current/sys/arch/sh3/sh3/trap.c:682: `PG_PCMCIA_ATT' undeclared (first use in this function)
>How-To-Repeat:
compile kernel with option SH4 and without SH4_PCMCIA
>Fix:
diff -u -r1.1.1.1 trap.c
--- trap.c	2000/10/11 00:30:47	1.1.1.1
+++ trap.c	2000/11/07 13:21:30
@@ -819,6 +823,7 @@
 #endif
 
 #ifdef SH4
+#ifdef SH4_PCMCIA
 				if (pte & PG_PCMCIA) {
 					int pcmtype;
 					unsigned long ptea = 0;
@@ -841,7 +846,9 @@
 						& ~PG_N;
 
 					SHREG_PTEA = ptea;
-				} else {
+				} else
+#endif
+				{
 					if ( /*1 ||*/ (va >= SH3_P1SEG_BASE)) {
 						SHREG_PTEL = 
 							(pte & PTEL_VALIDBITS)

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