Sat Feb 2 14:06:58 2013 UTC ()
Remove __BEGIN_DECLS/__END_DECLS
Allow pmap_kenter_pa to be a macro.


(matt)
diff -r1.37 -r1.38 src/sys/uvm/uvm_pmap.h

cvs diff -r1.37 -r1.38 src/sys/uvm/uvm_pmap.h (expand / switch to unified diff)

--- src/sys/uvm/uvm_pmap.h 2011/06/30 00:49:14 1.37
+++ src/sys/uvm/uvm_pmap.h 2013/02/02 14:06:58 1.38
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: uvm_pmap.h,v 1.37 2011/06/30 00:49:14 matt Exp $ */ 1/* $NetBSD: uvm_pmap.h,v 1.38 2013/02/02 14:06:58 matt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1991, 1993 4 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * The Mach Operating System project at Carnegie-Mellon University. 8 * The Mach Operating System project at Carnegie-Mellon University.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -127,27 +127,26 @@ extern struct pmap *const kernel_pmap_pt @@ -127,27 +127,26 @@ extern struct pmap *const kernel_pmap_pt
127#define PMAP_WIRED 0x00000010 /* wired mapping */ 127#define PMAP_WIRED 0x00000010 /* wired mapping */
128#define PMAP_CANFAIL 0x00000020 /* can fail if resource shortage */ 128#define PMAP_CANFAIL 0x00000020 /* can fail if resource shortage */
129#if defined(PMAP_ENABLE_PMAP_KMPAGE) 129#if defined(PMAP_ENABLE_PMAP_KMPAGE)
130#define PMAP_KMPAGE 0x00000040 /* [PA] page used for kernel memory */ 130#define PMAP_KMPAGE 0x00000040 /* [PA] page used for kernel memory */
131#else 131#else
132#define PMAP_KMPAGE 0x00000000 132#define PMAP_KMPAGE 0x00000000
133#endif /* PMAP_ENABLE_PMAP_KMPAGE */ 133#endif /* PMAP_ENABLE_PMAP_KMPAGE */
134 134
135#define PMAP_MD_MASK 0xff000000 /* [BOTH] Machine-dependent bits */ 135#define PMAP_MD_MASK 0xff000000 /* [BOTH] Machine-dependent bits */
136#define PMAP_PROT_MASK 0x0000000f /* [BOTH] VM_PROT_* bit mask */ 136#define PMAP_PROT_MASK 0x0000000f /* [BOTH] VM_PROT_* bit mask */
137 137
138#ifndef PMAP_EXCLUDE_DECLS /* Used in Sparc port to virtualize pmap mod */ 138#ifndef PMAP_EXCLUDE_DECLS /* Used in Sparc port to virtualize pmap mod */
139#ifdef _KERNEL 139#ifdef _KERNEL
140__BEGIN_DECLS 
141void pmap_activate(struct lwp *); 140void pmap_activate(struct lwp *);
142void pmap_deactivate(struct lwp *); 141void pmap_deactivate(struct lwp *);
143void pmap_unwire(pmap_t, vaddr_t); 142void pmap_unwire(pmap_t, vaddr_t);
144 143
145#if !defined(pmap_clear_modify) 144#if !defined(pmap_clear_modify)
146bool pmap_clear_modify(struct vm_page *); 145bool pmap_clear_modify(struct vm_page *);
147#endif 146#endif
148#if !defined(pmap_clear_reference) 147#if !defined(pmap_clear_reference)
149bool pmap_clear_reference(struct vm_page *); 148bool pmap_clear_reference(struct vm_page *);
150#endif 149#endif
151 150
152#if !defined(pmap_copy) 151#if !defined(pmap_copy)
153void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t); 152void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t);
@@ -155,27 +154,29 @@ void pmap_copy(pmap_t, pmap_t, vaddr_t, @@ -155,27 +154,29 @@ void pmap_copy(pmap_t, pmap_t, vaddr_t,
155#if !defined(pmap_copy_page) 154#if !defined(pmap_copy_page)
156void pmap_copy_page(paddr_t, paddr_t); 155void pmap_copy_page(paddr_t, paddr_t);
157#endif 156#endif
158struct pmap *pmap_create(void); 157struct pmap *pmap_create(void);
159void pmap_destroy(pmap_t); 158void pmap_destroy(pmap_t);
160int pmap_enter(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int); 159int pmap_enter(pmap_t, vaddr_t, paddr_t, vm_prot_t, u_int);
161bool pmap_extract(pmap_t, vaddr_t, paddr_t *); 160bool pmap_extract(pmap_t, vaddr_t, paddr_t *);
162#if defined(PMAP_GROWKERNEL) 161#if defined(PMAP_GROWKERNEL)
163vaddr_t pmap_growkernel(vaddr_t); 162vaddr_t pmap_growkernel(vaddr_t);
164#endif 163#endif
165 164
166void pmap_init(void); 165void pmap_init(void);
167 166
 167#if !defined(pmap_kenter_pa)
168void pmap_kenter_pa(vaddr_t, paddr_t, vm_prot_t, u_int); 168void pmap_kenter_pa(vaddr_t, paddr_t, vm_prot_t, u_int);
 169#endif
169void pmap_kremove(vaddr_t, vsize_t); 170void pmap_kremove(vaddr_t, vsize_t);
170#if !defined(pmap_is_modified) 171#if !defined(pmap_is_modified)
171bool pmap_is_modified(struct vm_page *); 172bool pmap_is_modified(struct vm_page *);
172#endif 173#endif
173#if !defined(pmap_is_referenced) 174#if !defined(pmap_is_referenced)
174bool pmap_is_referenced(struct vm_page *); 175bool pmap_is_referenced(struct vm_page *);
175#endif 176#endif
176 177
177void pmap_page_protect(struct vm_page *, vm_prot_t); 178void pmap_page_protect(struct vm_page *, vm_prot_t);
178 179
179#if !defined(pmap_phys_address) 180#if !defined(pmap_phys_address)
180paddr_t pmap_phys_address(paddr_t); 181paddr_t pmap_phys_address(paddr_t);
181#endif 182#endif
@@ -201,18 +202,17 @@ long pmap_wired_count(pmap_t); @@ -201,18 +202,17 @@ long pmap_wired_count(pmap_t);
201#endif 202#endif
202#if !defined(pmap_zero_page) 203#if !defined(pmap_zero_page)
203void pmap_zero_page(paddr_t); 204void pmap_zero_page(paddr_t);
204#endif 205#endif
205 206
206void pmap_virtual_space(vaddr_t *, vaddr_t *); 207void pmap_virtual_space(vaddr_t *, vaddr_t *);
207#if defined(PMAP_STEAL_MEMORY) 208#if defined(PMAP_STEAL_MEMORY)
208vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *); 209vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *);
209#endif 210#endif
210 211
211#if defined(PMAP_FORK) 212#if defined(PMAP_FORK)
212void pmap_fork(pmap_t, pmap_t); 213void pmap_fork(pmap_t, pmap_t);
213#endif 214#endif
214__END_DECLS 
215#endif /* kernel*/ 215#endif /* kernel*/
216#endif /* PMAP_EXCLUDE_DECLS */ 216#endif /* PMAP_EXCLUDE_DECLS */
217 217
218#endif /* _PMAP_VM_ */ 218#endif /* _PMAP_VM_ */