NetBSD Problem Report #8817
Received: (qmail 26375 invoked from network); 17 Nov 1999 15:47:54 -0000
Message-Id: <199911171547.PAA28107@shark1.cambridge.arm.com>
Date: Wed, 17 Nov 1999 15:47:05 GMT
From: Richard Earnshaw <rearnsha@cambridge.arm.com>
Reply-To: rearnsha@cambridge.arm.com
To: gnats-bugs@gnats.netbsd.org
Subject: pmap.c won't compile
X-Send-Pr-Version: 3.95
>Number: 8817
>Category: port-arm32
>Synopsis: pmap.c won't compile
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-arm32-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 17 07:48:01 +0000 1999
>Closed-Date: Wed Nov 17 22:50:46 +0000 1999
>Last-Modified: Wed Nov 17 22:52:51 +0000 1999
>Originator: Richard Earnshaw
>Release: -current<NetBSD-current source date>
>Organization:
ARM
--
>Environment:
System: NetBSD shark1 1.4K NetBSD 1.4K (SHARK) #46: Thu Sep 30 18:19:47 BST 1999 rearnsha@shark1:/usr/src/sys/arch/arm32/compile/SHARK arm32
>Description:
It's not a good idea to add a function argument with the same name
as an existing local variable, especially if you need to use both.
Did anyone try to compile this file before it was committed?
>How-To-Repeat:
try to recompile arm32/pmap.c
>Fix:
Patch appended.
Index: pmap.c
===================================================================
RCS file: /home/rearnsha/netbsd/cvs/src/sys/arch/arm32/arm32/pmap.c,v
retrieving revision 1.1.1.26
diff -u -r1.1.1.26 pmap.c
--- pmap.c 1999/11/17 11:00:50 1.1.1.26
+++ pmap.c 1999/11/17 15:40:02
@@ -1973,7 +1973,7 @@
/*
* void pmap_enter(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_prot_t prot,
- * int flags)
+ * int pmap_flags)
*
* Insert the given physical page (p) at
* the specified virtual address (v) in the
@@ -1988,12 +1988,12 @@
*/
int
-pmap_enter(pmap, va, pa, prot, flags)
+pmap_enter(pmap, va, pa, prot, pmap_flags)
pmap_t pmap;
vm_offset_t va;
vm_offset_t pa;
vm_prot_t prot;
- int flags;
+ int pmap_flags;
{
pt_entry_t *pte;
u_int npte;
@@ -2001,7 +2001,7 @@
struct pv_entry *pv = NULL;
vm_offset_t opa;
int flags;
- boolean_t wired = (flags & PMAP_WIRED) != 0;
+ boolean_t wired = (pmap_flags & PMAP_WIRED) != 0;
PDEBUG(5, printf("pmap_enter: V%08lx P%08lx in pmap %p prot=%08x, wired = %d\n",
va, pa, pmap, prot, wired));
@@ -2154,14 +2154,14 @@
if (bank != -1) {
#ifdef DIAGNOSTIC
- if ((flags & VM_PROT_ALL) & ~prot)
+ if ((pmap_flags & VM_PROT_ALL) & ~prot)
panic("pmap_enter: access_type exceeds prot");
#endif
npte |= PT_C | PT_B;
- if (flags & VM_PROT_WRITE) {
+ if (pmap_flags & VM_PROT_WRITE) {
npte |= L2_SPAGE | PT_AP(AP_W);
vm_physmem[bank].pmseg.attrs[off] |= PT_H | PT_M;
- } else if (flags & VM_PROT_ALL) {
+ } else if (pmap_flags & VM_PROT_ALL) {
npte |= L2_SPAGE;
vm_physmem[bank].pmseg.attrs[off] |= PT_H;
} else
@@ -2177,7 +2177,7 @@
#ifdef MYCROFT_HACK
if (mycroft_hack)
- printf("pmap_enter: pmap=%p va=%lx pa=%lx prot=%x wired=%d access_type=%x npte=%08x\n", pmap, va, pa, prot, wired, flags & VM_PROT_ALL, npte);
+ printf("pmap_enter: pmap=%p va=%lx pa=%lx prot=%x wired=%d access_type=%x npte=%08x\n", pmap, va, pa, prot, wired, pmap_flags & VM_PROT_ALL, npte);
#endif
*pte = npte;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mrg
State-Changed-When: Wed Nov 17 14:50:46 PST 1999
State-Changed-Why:
i applied a similar patch (renamed the local variable so that all
pmap_enter() functions would contain the same "flags" variable)
yesterday.... this was part of a set of changes to every pmap.c
(as pmap_enter() changed) and could not be fully tested on all
ports....
>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.