Subject: port-arm32/8817: pmap.c won't compile
To: None <gnats-bugs@gnats.netbsd.org>
From: Richard Earnshaw <rearnsha@cambridge.arm.com>
List: netbsd-bugs
Date: 11/17/1999 07:49:01
>Number: 8817
>Category: port-arm32
>Synopsis: pmap.c won't compile
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: port-arm32-maintainer (NetBSD/arm32 Portmaster)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 17 07:48:01 1999
>Last-Modified:
>Originator: Richard Earnshaw
>Organization:
ARM
--
>Release: -current<NetBSD-current source date>
>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;
>Audit-Trail:
>Unformatted: