Skip to content

Commit 151fd53

Browse files
committed
turn pmap_phys_address() into a macro since all the function ever did was
to cast its parameter to paddr_t and return it approved by mrg
1 parent 178bb7f commit 151fd53

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

sys/arch/sparc/include/pmap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pmap.h,v 1.79 2007/03/04 22:12:43 mrg Exp $ */
1+
/* $NetBSD: pmap.h,v 1.80 2007/07/16 16:36:06 macallan Exp $ */
22

33
/*
44
* Copyright (c) 1996
@@ -264,7 +264,7 @@ pmap_t pmap_create(void);
264264
void pmap_destroy(pmap_t);
265265
void pmap_init(void);
266266
vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
267-
paddr_t pmap_phys_address(int);
267+
#define pmap_phys_address(x) (x)
268268
void pmap_reference(pmap_t);
269269
void pmap_remove(pmap_t, vaddr_t, vaddr_t);
270270
#define pmap_update(pmap) /* nothing (yet) */

sys/arch/sparc/sparc/pmap.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: pmap.c,v 1.316 2007/05/28 21:24:18 mrg Exp $ */
1+
/* $NetBSD: pmap.c,v 1.317 2007/07/16 16:36:06 macallan Exp $ */
22

33
/*
44
* Copyright (c) 1996
@@ -56,7 +56,7 @@
5656
*/
5757

5858
#include <sys/cdefs.h>
59-
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.316 2007/05/28 21:24:18 mrg Exp $");
59+
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.317 2007/07/16 16:36:06 macallan Exp $");
6060

6161
#include "opt_ddb.h"
6262
#include "opt_kgdb.h"
@@ -7284,18 +7284,6 @@ pmap_copy_page_hypersparc(paddr_t src, paddr_t dst)
72847284
}
72857285
#endif /* SUN4M || SUN4D */
72867286

7287-
/*
7288-
* Turn a cdevsw d_mmap value into a byte address for pmap_enter.
7289-
* XXX this should almost certainly be done differently, and
7290-
* elsewhere, or even not at all
7291-
*/
7292-
paddr_t
7293-
pmap_phys_address(int x)
7294-
{
7295-
7296-
return ((paddr_t)x);
7297-
}
7298-
72997287
/*
73007288
* Turn off cache for a given (va, number of pages).
73017289
*

0 commit comments

Comments
 (0)