Deleted Added
full compact
pmap.h (212715) pmap.h (212722)
1/*-
2 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com>
3 * All rights reserved.
4 *
5 * Adapted for Freescale's e500 core CPUs.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 12 unchanged lines hidden (view full) ---

21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
23 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
1/*-
2 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com>
3 * All rights reserved.
4 *
5 * Adapted for Freescale's e500 core CPUs.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 12 unchanged lines hidden (view full) ---

21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
23 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/powerpc/include/pmap.h 212715 2010-09-16 00:22:25Z nwhitehorn $
29 * $FreeBSD: head/sys/powerpc/include/pmap.h 212722 2010-09-16 03:46:17Z nwhitehorn $
30 */
31/*-
32 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
33 * Copyright (C) 1995, 1996 TooLs GmbH.
34 * All rights reserved.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions

--- 50 unchanged lines hidden (view full) ---

88
89struct slbtnode;
90
91struct pmap {
92 struct mtx pm_mtx;
93
94 #ifdef __powerpc64__
95 struct slbtnode *pm_slb_tree_root;
30 */
31/*-
32 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
33 * Copyright (C) 1995, 1996 TooLs GmbH.
34 * All rights reserved.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions

--- 50 unchanged lines hidden (view full) ---

88
89struct slbtnode;
90
91struct pmap {
92 struct mtx pm_mtx;
93
94 #ifdef __powerpc64__
95 struct slbtnode *pm_slb_tree_root;
96 struct slb *pm_slb;
96 struct slb **pm_slb;
97 int pm_slb_len;
97 #else
98 register_t pm_sr[16];
99 #endif
100 cpumask_t pm_active;
101 uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
102 u_int pm_retries;
103
104 struct pmap *pmap_phys;

--- 32 unchanged lines hidden (view full) ---

137 * NB: The PMAP MUST be locked already.
138 */
139uint64_t va_to_vsid(pmap_t pm, vm_offset_t va);
140
141/* Lock-free, non-allocating lookup routines */
142uint64_t kernel_va_to_slbv(vm_offset_t va);
143struct slb *user_va_to_slb_entry(pmap_t pm, vm_offset_t va);
144
98 #else
99 register_t pm_sr[16];
100 #endif
101 cpumask_t pm_active;
102 uint32_t pm_gen_count; /* generation count (pmap lock dropped) */
103 u_int pm_retries;
104
105 struct pmap *pmap_phys;

--- 32 unchanged lines hidden (view full) ---

138 * NB: The PMAP MUST be locked already.
139 */
140uint64_t va_to_vsid(pmap_t pm, vm_offset_t va);
141
142/* Lock-free, non-allocating lookup routines */
143uint64_t kernel_va_to_slbv(vm_offset_t va);
144struct slb *user_va_to_slb_entry(pmap_t pm, vm_offset_t va);
145
145uint64_t allocate_vsid(pmap_t pm, uint64_t esid, int large);
146uint64_t allocate_user_vsid(pmap_t pm, uint64_t esid, int large);
146void free_vsid(pmap_t pm, uint64_t esid, int large);
147void free_vsid(pmap_t pm, uint64_t esid, int large);
147void slb_insert(pmap_t pm, struct slb *dst, struct slb *);
148void slb_insert_user(pmap_t pm, struct slb *slb);
149void slb_insert_kernel(uint64_t slbe, uint64_t slbv);
148
149struct slbtnode *slb_alloc_tree(void);
150void slb_free_tree(pmap_t pm);
150
151struct slbtnode *slb_alloc_tree(void);
152void slb_free_tree(pmap_t pm);
151struct slb *slb_alloc_user_cache(void);
152void slb_free_user_cache(struct slb *);
153struct slb **slb_alloc_user_cache(void);
154void slb_free_user_cache(struct slb **);
153
154#else
155
156struct pmap {
157 struct mtx pm_mtx; /* pmap mutex */
158 tlbtid_t pm_tid[MAXCPU]; /* TID to identify this pmap entries in TLB */
159 cpumask_t pm_active; /* active on cpus */
160 int pm_refs; /* ref count */

--- 76 unchanged lines hidden ---
155
156#else
157
158struct pmap {
159 struct mtx pm_mtx; /* pmap mutex */
160 tlbtid_t pm_tid[MAXCPU]; /* TID to identify this pmap entries in TLB */
161 cpumask_t pm_active; /* active on cpus */
162 int pm_refs; /* ref count */

--- 76 unchanged lines hidden ---