NetBSD Problem Report #8830
Received: (qmail 1062 invoked from network); 20 Nov 1999 02:17:04 -0000
Message-Id: <199911200216.LAA03537@mirage.ceres.dti.ne.jp>
Date: Sat, 20 Nov 1999 11:16:55 +0900 (JST)
From: tsutsui@ceres.dti.ne.jp
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@gnats.netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: sun3x/pmap.c cannot compile after pmap_enter() API change
X-Send-Pr-Version: 3.95
>Number: 8830
>Category: port-sun3
>Synopsis: sun3x/pmap.c cannot compile after pmap_enter() API change
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-sun3-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 19 18:18:00 +0000 1999
>Closed-Date: Fri Dec 17 12:04:36 +0000 1999
>Last-Modified: Fri Dec 17 12:05:14 +0000 1999
>Originator: Izumi Tsutsui
>Release: NetBSD-current 19991119
>Organization:
Izumi Tsutsui Himeji City, JAPAN
>Environment:
System: NetBSD 1.4P sun3/80
>Description:
pmap_enter() API change causes variable name conflicts
in sun3x/pmap.c:pmap_enter() so it cannot compile.
>How-To-Repeat:
config and build a sun3x kernel:
[...]
cc -O2 -fno-defer-pop -msoft-float -Werror -Wall -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Wno-main -nostdinc -I. \
-I../../../../arch -I../../../.. -I../../../../../gnu/sys \
-undef -D__NetBSD__ -Dm68k -Dmc68000 -D_KERNEL -Dsun3 -D_SUN3X_ \
-DLKM -DDIAGNOSTIC -DNKMEMCLUSTERS="(2 * 2048 * 1024 / CLBYTES)" \
-DMAXUSERS=8 -c ../../../../arch/sun3/sun3x/pmap.c
cc1: warnings being treated as errors
../../../../arch/sun3/sun3x/pmap.c: In function `pmap_enter':
../../../../arch/sun3/sun3x/pmap.c:1695: warning: declaration of `flags' shadows a parameter
*** Error code 1
Stop.
>Fix:
Change local 'flags' variable name.
diff -u -r1.1.1.4 pmap.c
--- pmap.c 1999/11/19 21:32:27 1.1.1.4
+++ pmap.c 1999/11/20 02:03:16
@@ -1682,7 +1682,7 @@
boolean_t insert, managed; /* Marks the need for PV insertion.*/
u_short nidx; /* PV list index */
int s; /* Used for splimp()/splx() */
- int flags; /* Mapping flags. eg. Cache inhibit */
+ int mflags; /* Mapping flags. eg. Cache inhibit */
u_int a_idx, b_idx, pte_idx; /* table indices */
a_tmgr_t *a_tbl; /* A: long descriptor table manager */
b_tmgr_t *b_tbl; /* B: short descriptor table manager */
@@ -1701,7 +1701,7 @@
return (KERN_SUCCESS);
}
- flags = (pa & ~MMU_PAGE_MASK);
+ mflags = (pa & ~MMU_PAGE_MASK);
pa &= MMU_PAGE_MASK;
/*
@@ -1710,7 +1710,7 @@
* device and hence it would be disasterous to cache its contents.
*/
if ((managed = is_managed(pa)) == FALSE)
- flags |= PMAP_NC;
+ mflags |= PMAP_NC;
/*
* For user mappings we walk along the MMU tables of the given
@@ -2000,7 +2000,7 @@
* bits found on the lower order of the physical address.)
* mark the PTE as a cache inhibited page.
*/
- if (flags & PMAP_NC)
+ if (mflags & PMAP_NC)
c_pte->attr.raw |= MMU_SHORT_PTE_CI;
/*
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: jeremy
State-Changed-When: Fri Dec 17 04:04:36 PST 1999
State-Changed-Why:
Fixed in recent commit.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.